summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2016-05-19 21:24:21 +0200
committerMaxime Quandalle <maxime@quandalle.com>2016-07-18 18:14:46 +0200
commit81a35be8562cb6c28848afc2cb24ae9ec145ce47 (patch)
tree14b8dd3c6c32de6b47967b27f258e118b816abe0 /client/components
parent35c6b51a3f7fe878983620e6755ea35a1cf670c8 (diff)
downloadwekan-81a35be8562cb6c28848afc2cb24ae9ec145ce47.tar.gz
wekan-81a35be8562cb6c28848afc2cb24ae9ec145ce47.tar.bz2
wekan-81a35be8562cb6c28848afc2cb24ae9ec145ce47.zip
Fix move to top
If the minOrder is 0, the previous code does not work. This code is now doing the obvious stuff to change the order.
Diffstat (limited to 'client/components')
-rw-r--r--client/components/cards/cardDetails.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 299bbf34..5dd0b762 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -147,12 +147,12 @@ Template.cardDetailsActionsPopup.events({
'click .js-move-card-to-top'(evt) {
evt.preventDefault();
const minOrder = _.min(this.list().cards().map((c) => c.sort));
- this.move(this.listId, minOrder / 2);
+ this.move(this.listId, minOrder - 1);
},
'click .js-move-card-to-bottom'(evt) {
evt.preventDefault();
const maxOrder = _.max(this.list().cards().map((c) => c.sort));
- this.move(this.listId, Math.floor(maxOrder) + 1);
+ this.move(this.listId, maxOrder + 1);
},
'click .js-archive'(evt) {
evt.preventDefault();