mirror of
https://github.com/wekan/wekan.git
synced 2025-12-24 03:10:12 +01:00
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.
This commit is contained in:
parent
6457615e6a
commit
2c0030da62
45 changed files with 883 additions and 933 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue