summaryrefslogtreecommitdiffstats
path: root/client/components/boards/boardArchive.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/boards/boardArchive.js')
-rw-r--r--client/components/boards/boardArchive.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/client/components/boards/boardArchive.js b/client/components/boards/boardArchive.js
index acb53149..c8bbb341 100644
--- a/client/components/boards/boardArchive.js
+++ b/client/components/boards/boardArchive.js
@@ -1,9 +1,3 @@
-Template.boardListHeaderBar.events({
- 'click .js-open-archived-board'() {
- Modal.open('archivedBoards');
- },
-});
-
BlazeComponent.extendComponent({
onCreated() {
this.subscribe('archivedBoards');
@@ -29,6 +23,17 @@ 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);
+ }
+ Boards.remove(this._id);
+ FlowRouter.go('home');
+ }),
}];
},
}).register('archivedBoards');