diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-06-15 17:16:56 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-06-16 14:30:21 +0200 |
commit | 5478fc93dbe3be14c4a38754881e00dc0b6a38f9 (patch) | |
tree | 8b40a29a3cbe07747112e809db3fd12b719ae3bf /client/components/lists/body.js | |
parent | a41e07b37ec9243191804ac2966e2d136ce79710 (diff) | |
download | wekan-5478fc93dbe3be14c4a38754881e00dc0b6a38f9.tar.gz wekan-5478fc93dbe3be14c4a38754881e00dc0b6a38f9.tar.bz2 wekan-5478fc93dbe3be14c4a38754881e00dc0b6a38f9.zip |
Improve the multi-selection experience
New features:
- select all filtered cards
- assign or unassign a member to selected cards
- archive selected cards
This commit also fix the card sort indexes calculation when a multi-
selection is drag-dropped.
Diffstat (limited to 'client/components/lists/body.js')
-rw-r--r-- | client/components/lists/body.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/components/lists/body.js b/client/components/lists/body.js index a91f0ca9..27864474 100644 --- a/client/components/lists/body.js +++ b/client/components/lists/body.js @@ -27,10 +27,12 @@ BlazeComponent.extendComponent({ var title = textarea.val(); var position = Blaze.getData(evt.currentTarget).position; var sortIndex; + var firstCard = this.find('.js-minicard:first'); + var lastCard = this.find('.js-minicard:last'); if (position === 'top') { - sortIndex = Utils.getSortIndex(null, this.find('.js-minicard:first')); + sortIndex = Utils.calculateIndex(null, firstCard).base; } else if (position === 'bottom') { - sortIndex = Utils.getSortIndex(this.find('.js-minicard:last'), null); + sortIndex = Utils.calculateIndex(lastCard, null).base; } if ($.trim(title)) { |