summaryrefslogtreecommitdiffstats
path: root/client/components/lists/body.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 /client/components/lists/body.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 'client/components/lists/body.js')
-rw-r--r--client/components/lists/body.js23
1 files changed, 7 insertions, 16 deletions
diff --git a/client/components/lists/body.js b/client/components/lists/body.js
index 8400af96..04f122cb 100644
--- a/client/components/lists/body.js
+++ b/client/components/lists/body.js
@@ -34,18 +34,17 @@ BlazeComponent.extendComponent({
}
if ($.trim(title)) {
- Cards.insert({
+ var _id = Cards.insert({
title: title,
listId: this.data()._id,
boardId: this.data().board()._id,
sort: sortIndex
- }, function(err, _id) {
- // In case the filter is active we need to add the newly inserted card
- // in the list of exceptions -- cards that are not filtered. Otherwise
- // the card will disappear instantly.
- // See https://github.com/libreboard/libreboard/issues/80
- Filter.addException(_id);
});
+ // In case the filter is active we need to add the newly inserted card in
+ // the list of exceptions -- cards that are not filtered. Otherwise the
+ // card will disappear instantly.
+ // See https://github.com/libreboard/libreboard/issues/80
+ Filter.addException(_id);
// We keep the form opened, empty it, and scroll to it.
textarea.val('').focus();
@@ -55,10 +54,6 @@ BlazeComponent.extendComponent({
}
},
- showNewCardForm: function(value) {
- this.newCardFormIsVisible.set(value);
- },
-
scrollToBottom: function() {
var container = this.firstNode();
$(container).animate({
@@ -66,14 +61,10 @@ BlazeComponent.extendComponent({
});
},
- onCreated: function() {
- this.newCardFormIsVisible = new ReactiveVar(true);
- },
-
events: function() {
return [{
submit: this.addCard,
- 'click .open-card-composer': this.scrollToBottom
+ 'click .open-minicard-composer': this.scrollToBottom
}];
}
}).register('listBody');