diff options
Diffstat (limited to 'client/components/boards/boardArchive.js')
-rw-r--r-- | client/components/boards/boardArchive.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/client/components/boards/boardArchive.js b/client/components/boards/boardArchive.js index acb53149..dbebdd70 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-board': Popup.afterConfirm('boardDelete', 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'); |