summaryrefslogtreecommitdiffstats
path: root/client/components/boards/boardArchive.js
diff options
context:
space:
mode:
authorJustin Reynolds <justinr1234@gmail.com>2019-06-28 12:52:09 -0500
committerJustin Reynolds <justinr1234@gmail.com>2019-06-28 12:56:51 -0500
commit3eb4d2c341b712268bd321173909e0a7b19a88c9 (patch)
tree25a8fcb088f3984e72a5bd3ded9e6a45376e0693 /client/components/boards/boardArchive.js
parenta0a482aa8efb3255a523de4524c8e09453d5571f (diff)
downloadwekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.gz
wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.bz2
wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.zip
Prettier & eslint project style update
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');