diff options
-rw-r--r-- | client/components/cards/cardDetails.jade | 4 | ||||
-rw-r--r-- | client/components/cards/cardDetails.js | 10 | ||||
-rw-r--r-- | i18n/en.i18n.json | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index 2ca032ef..734fc7e3 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -93,6 +93,10 @@ template(name="cardDetailsActionsPopup") 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 li: a.js-archive {{_ 'archive-card'}} diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 08a465bd..299bbf34 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -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(); diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index 0cfeeed2..f495c148 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -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", |