summaryrefslogtreecommitdiffstats
path: root/collections/cards.js
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-05-29 23:35:30 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-05-30 03:50:14 +0200
commit2c0030da62b9a1e59a55e3429fe514bbd51e1ee3 (patch)
treeb2834702806e59cb05ea02e2c377266eb17d6c8f /collections/cards.js
parent6457615e6ac6717d2175be9483388d4d70ea1c4a (diff)
downloadwekan-2c0030da62b9a1e59a55e3429fe514bbd51e1ee3.tar.gz
wekan-2c0030da62b9a1e59a55e3429fe514bbd51e1ee3.tar.bz2
wekan-2c0030da62b9a1e59a55e3429fe514bbd51e1ee3.zip
Implement multi-selection
The UI and the internal APIs are still rough around the edges but the feature is basically working. You can now select multiple cards and move them together or (un|)assign them a label.
Diffstat (limited to 'collections/cards.js')
-rw-r--r--collections/cards.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/collections/cards.js b/collections/cards.js
index 538b6af4..374dcbc3 100644
--- a/collections/cards.js
+++ b/collections/cards.js
@@ -120,9 +120,15 @@ Cards.helpers({
});
return cardLabels;
},
+ hasLabel: function(labelId) {
+ return _.contains(this.labelIds, labelId);
+ },
user: function() {
return Users.findOne(this.userId);
},
+ isAssigned: function(memberId) {
+ return _.contains(this.members, memberId);
+ },
activities: function() {
return Activities.find({ type: 'card', cardId: this._id },
{ sort: { createdAt: -1 }});