diff options
Diffstat (limited to 'client/components')
-rw-r--r-- | client/components/boards/boardArchive.jade | 10 | ||||
-rw-r--r-- | client/components/boards/boardArchive.js | 12 |
2 files changed, 22 insertions, 0 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'); |