(feat) can now copy selected cards

This commit is contained in:
Ludovic Marcotte committed 2015-08-10 09:48:47 -04:00
1 parent e13f7a267b
commit 5741d7f95c
4 files changed
+49 -8

No files matched your search

@@ -454,6 +454,17 @@
});
};
/**
* @function $copyCards
* @memberof AddressBook.prototype
* @desc Copy multiple cards from addressbook to an other one.
* @return a promise of the HTTP operation
*/
AddressBook.prototype.$copyCards = function(cards, folder) {
var uids = _.map(cards, function(card) { return card.id; });
return AddressBook.$$resource.post(this.id, 'copy', {uids: uids, folder: folder});
};
/**
* @function $save
* @memberof AddressBook.prototype