diff options
author | RJevnikar <12701645+rjevnikar@users.noreply.github.com> | 2018-06-06 15:27:05 +0000 |
---|---|---|
committer | RJevnikar <12701645+rjevnikar@users.noreply.github.com> | 2018-06-06 15:27:05 +0000 |
commit | de59758471f98d4cafc5db9de0d535031fcb2363 (patch) | |
tree | 9f31de968f36dcfa07470667020a527d351bde1c | |
parent | ea109cfdd77daa69c66220ca942a67e99255551b (diff) | |
download | wekan-de59758471f98d4cafc5db9de0d535031fcb2363.tar.gz wekan-de59758471f98d4cafc5db9de0d535031fcb2363.tar.bz2 wekan-de59758471f98d4cafc5db9de0d535031fcb2363.zip |
Add delete board to Recycle Bin, fix delete-board menu item on board menu
-rw-r--r-- | client/components/boards/boardArchive.jade | 10 | ||||
-rw-r--r-- | client/components/boards/boardArchive.js | 12 | ||||
-rw-r--r-- | i18n/en.i18n.json | 3 |
3 files changed, 24 insertions, 1 deletions
diff --git a/client/components/boards/boardArchive.jade b/client/components/boards/boardArchive.jade index 6576f742..a57b0bc6 100644 --- a/client/components/boards/boardArchive.jade +++ b/client/components/boards/boardArchive.jade @@ -9,6 +9,16 @@ template(name="archivedBoards") button.js-restore-board i.fa.fa-undo | {{_ 'restore-board'}} + button.js-delete-board + i.fa.fa-trash-o + | {{_ 'delete-board'}} = title else li.no-items-message {{_ 'no-archived-boards'}} + +template(name="deleteBoardPopup") + p {{_ 'delete-board-pop'}} + unless archived + p {{_ 'board-delete-suggest-archive'}} + button.js-confirm.negate.full(type="submit") {{_ 'delete'}} + diff --git a/client/components/boards/boardArchive.js b/client/components/boards/boardArchive.js index acb53149..f31d7d86 100644 --- a/client/components/boards/boardArchive.js +++ b/client/components/boards/boardArchive.js @@ -29,6 +29,18 @@ BlazeComponent.extendComponent({ board.restore(); Utils.goBoardId(board._id); }, + 'click .js-delete': Popup.afterConfirm('cardDelete', function() { + Popup.close(); + const isSandstorm = Meteor.settings && Meteor.settings.public && + Meteor.settings.public.sandstorm; + if (isSandstorm && Session.get('currentBoard')) { + const currentBoard = Boards.findOne(Session.get('currentBoard')); + Boards.remove(currentBoard._id); + } + const board = this.currentData(); + Boards.remove(board._id); + FlowRouter.go('home'); + }), }]; }, }).register('archivedBoards'); diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index d3edc6b2..f42d8fcc 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -474,5 +474,6 @@ "board-delete-notice": "Deleting is permanent. You will lose all lists, cards and actions associated with this board.", "board-delete-pop": "All lists, cards, labels, and activities will be removed and you won't be able to recover the board contents. There is no undo.", "board-delete-suggest-archive": "You can archive a board to remove it from the the active boards and preserve the activity.", - "deleteBoardPopup": "Delete Board?" + "deleteBoardPopup": "Delete Board?", + "delete-board": "Delete Board" } |