mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
Merge pull request #530 from ForNeVeR/feature/move-to-end
Move cards to top / bottom
This commit is contained in:
commit
90428e7ba1
3 changed files with 16 additions and 0 deletions
|
@ -92,6 +92,10 @@ template(name="cardDetailsActionsPopup")
|
|||
li: a.js-labels {{_ 'card-edit-labels'}}
|
||||
li: a.js-attachments {{_ 'card-edit-attachments'}}
|
||||
hr
|
||||
ul.pop-over-list
|
||||
li: a.js-move-card-to-top {{_ 'moveCardToTop-title'}}
|
||||
li: a.js-move-card-to-bottom {{_ 'moveCardToBottom-title'}}
|
||||
hr
|
||||
ul.pop-over-list
|
||||
li: a.js-move-card {{_ 'moveCardPopup-title'}}
|
||||
unless archived
|
||||
|
|
|
@ -144,6 +144,16 @@ Template.cardDetailsActionsPopup.events({
|
|||
'click .js-labels': Popup.open('cardLabels'),
|
||||
'click .js-attachments': Popup.open('cardAttachments'),
|
||||
'click .js-move-card': Popup.open('moveCard'),
|
||||
'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);
|
||||
},
|
||||
'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);
|
||||
},
|
||||
'click .js-archive'(evt) {
|
||||
evt.preventDefault();
|
||||
this.archive();
|
||||
|
|
|
@ -215,6 +215,8 @@
|
|||
"menu": "Menu",
|
||||
"move-selection": "Move selection",
|
||||
"moveCardPopup-title": "Move Card",
|
||||
"moveCardToBottom-title": "Move to Bottom",
|
||||
"moveCardToTop-title": "Move to Top",
|
||||
"moveSelectionPopup-title": "Move selection",
|
||||
"multi-selection": "Multi-Selection",
|
||||
"multi-selection-on": "Multi-Selection is on",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue