mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Move card to top/bottom using now the same internal code logic
This commit is contained in:
parent
dcff70c983
commit
6b6bdddce6
1 changed files with 2 additions and 10 deletions
|
@ -679,21 +679,13 @@ Template.cardDetailsActionsPopup.events({
|
|||
'click .js-set-card-color': Popup.open('setCardColor'),
|
||||
'click .js-move-card-to-top'(event) {
|
||||
event.preventDefault();
|
||||
const minOrder = _.min(
|
||||
this.list()
|
||||
.cardsUnfiltered(this.swimlaneId)
|
||||
.map((c) => c.sort),
|
||||
);
|
||||
const minOrder = this.getMinSort();
|
||||
this.move(this.boardId, this.swimlaneId, this.listId, minOrder - 1);
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-move-card-to-bottom'(event) {
|
||||
event.preventDefault();
|
||||
const maxOrder = _.max(
|
||||
this.list()
|
||||
.cardsUnfiltered(this.swimlaneId)
|
||||
.map((c) => c.sort),
|
||||
);
|
||||
const maxOrder = this.getMaxSort();
|
||||
this.move(this.boardId, this.swimlaneId, this.listId, maxOrder + 1);
|
||||
Popup.back();
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue