mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04:00
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.
This commit is contained in:
parent
35c6b51a3f
commit
81a35be856
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue