summaryrefslogtreecommitdiffstats
path: root/client/components/boards/boardsList.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/boardsList.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/boardsList.js')
-rw-r--r--client/components/boards/boardsList.js94
1 files changed, 50 insertions, 44 deletions
diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js
index 0fb80230..cc586b1f 100644
--- a/client/components/boards/boardsList.js
+++ b/client/components/boards/boardsList.js
@@ -21,11 +21,14 @@ BlazeComponent.extendComponent({
},
boards() {
- return Boards.find({
- archived: false,
- 'members.userId': Meteor.userId(),
- type: 'board',
- }, { sort: ['title'] });
+ return Boards.find(
+ {
+ archived: false,
+ 'members.userId': Meteor.userId(),
+ type: 'board',
+ },
+ { sort: ['title'] },
+ );
},
isStarred() {
const user = Meteor.user();
@@ -48,46 +51,49 @@ BlazeComponent.extendComponent({
},
events() {
- return [{
- 'click .js-add-board': Popup.open('createBoard'),
- 'click .js-star-board'(evt) {
- const boardId = this.currentData()._id;
- Meteor.user().toggleBoardStar(boardId);
- evt.preventDefault();
- },
- 'click .js-clone-board'(evt) {
- Meteor.call('cloneBoard',
- this.currentData()._id,
- Session.get('fromBoard'),
- (err, res) => {
- if (err) {
- this.setError(err.error);
- } else {
- Session.set('fromBoard', null);
- Utils.goBoardId(res);
+ return [
+ {
+ 'click .js-add-board': Popup.open('createBoard'),
+ 'click .js-star-board'(evt) {
+ const boardId = this.currentData()._id;
+ Meteor.user().toggleBoardStar(boardId);
+ evt.preventDefault();
+ },
+ 'click .js-clone-board'(evt) {
+ Meteor.call(
+ 'cloneBoard',
+ this.currentData()._id,
+ Session.get('fromBoard'),
+ (err, res) => {
+ if (err) {
+ this.setError(err.error);
+ } else {
+ Session.set('fromBoard', null);
+ Utils.goBoardId(res);
+ }
+ },
+ );
+ evt.preventDefault();
+ },
+ 'click .js-archive-board'(evt) {
+ const boardId = this.currentData()._id;
+ Meteor.call('archiveBoard', boardId);
+ evt.preventDefault();
+ },
+ 'click .js-accept-invite'() {
+ const boardId = this.currentData()._id;
+ Meteor.user().removeInvite(boardId);
+ },
+ 'click .js-decline-invite'() {
+ const boardId = this.currentData()._id;
+ Meteor.call('quitBoard', boardId, (err, ret) => {
+ if (!err && ret) {
+ Meteor.user().removeInvite(boardId);
+ FlowRouter.go('home');
}
- }
- );
- evt.preventDefault();
- },
- 'click .js-archive-board'(evt) {
- const boardId = this.currentData()._id;
- Meteor.call('archiveBoard', boardId);
- evt.preventDefault();
- },
- 'click .js-accept-invite'() {
- const boardId = this.currentData()._id;
- Meteor.user().removeInvite(boardId);
- },
- 'click .js-decline-invite'() {
- const boardId = this.currentData()._id;
- Meteor.call('quitBoard', boardId, (err, ret) => {
- if (!err && ret) {
- Meteor.user().removeInvite(boardId);
- FlowRouter.go('home');
- }
- });
+ });
+ },
},
- }];
+ ];
},
}).register('boardList');