summaryrefslogtreecommitdiffstats
path: root/client/components/lists/body.js
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-06-15 17:16:56 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-06-16 14:30:21 +0200
commit5478fc93dbe3be14c4a38754881e00dc0b6a38f9 (patch)
tree8b40a29a3cbe07747112e809db3fd12b719ae3bf /client/components/lists/body.js
parenta41e07b37ec9243191804ac2966e2d136ce79710 (diff)
downloadwekan-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.js6
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)) {