mirror of
https://github.com/wekan/wekan.git
synced 2025-12-30 14:18:48 +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
|
|
@ -12,14 +12,16 @@ BlazeComponent.extendComponent({
|
|||
return 'boardComponent';
|
||||
},
|
||||
|
||||
onCreated: function() {
|
||||
this.draggingActive = new ReactiveVar(false);
|
||||
},
|
||||
|
||||
openNewListForm: function() {
|
||||
this.componentChildren('addListForm')[0].open();
|
||||
},
|
||||
|
||||
showNewCardForms: function(value) {
|
||||
_.each(this.componentChildren('list'), function(listComponent) {
|
||||
listComponent.showNewCardForm(value);
|
||||
});
|
||||
setIsDragging: function(bool) {
|
||||
this.draggingActive.set(bool);
|
||||
},
|
||||
|
||||
scrollLeft: function(position) {
|
||||
|
|
@ -79,8 +81,8 @@ BlazeComponent.extendComponent({
|
|||
helper: 'clone',
|
||||
items: '.js-list:not(.js-list-composer)',
|
||||
placeholder: 'list placeholder',
|
||||
start: function(event, ui) {
|
||||
$('.list.placeholder').height(ui.item.height());
|
||||
start: function(evt, ui) {
|
||||
ui.placeholder.height(ui.helper.height());
|
||||
Popup.close();
|
||||
},
|
||||
stop: function() {
|
||||
|
|
@ -97,6 +99,11 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
});
|
||||
|
||||
// Disable drag-dropping while in multi-selection mode
|
||||
self.autorun(function() {
|
||||
self.$(lists).sortable('option', 'disabled', MultiSelection.isActive());
|
||||
});
|
||||
|
||||
// If there is no data in the board (ie, no lists) we autofocus the list
|
||||
// creation form by clicking on the corresponding element.
|
||||
if (self.data().lists().count() === 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue