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.js63
1 files changed, 36 insertions, 27 deletions
diff --git a/client/components/boards/boardArchive.js b/client/components/boards/boardArchive.js
index c8bbb341..d3e65bd8 100644
--- a/client/components/boards/boardArchive.js
+++ b/client/components/boards/boardArchive.js
@@ -4,36 +4,45 @@ BlazeComponent.extendComponent({
},
archivedBoards() {
- return Boards.find({ archived: true }, {
- sort: ['title'],
- });
+ return Boards.find(
+ { archived: true },
+ {
+ sort: ['title'],
+ },
+ );
},
events() {
- return [{
- 'click .js-restore-board'() {
- // TODO : Make isSandstorm variable global
- const isSandstorm = Meteor.settings && Meteor.settings.public &&
- Meteor.settings.public.sandstorm;
- if (isSandstorm && Session.get('currentBoard')) {
- const currentBoard = Boards.findOne(Session.get('currentBoard'));
- currentBoard.archive();
- }
- const board = this.currentData();
- board.restore();
- Utils.goBoardId(board._id);
+ return [
+ {
+ 'click .js-restore-board'() {
+ // TODO : Make isSandstorm variable global
+ const isSandstorm =
+ Meteor.settings &&
+ Meteor.settings.public &&
+ Meteor.settings.public.sandstorm;
+ if (isSandstorm && Session.get('currentBoard')) {
+ const currentBoard = Boards.findOne(Session.get('currentBoard'));
+ currentBoard.archive();
+ }
+ const board = this.currentData();
+ 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');
+ }),
},
- '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');