diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-11-26 02:29:36 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-11-26 02:29:36 +0200 |
commit | 8898862d36b1f0fe8e7d7bdc80064e5106894d29 (patch) | |
tree | a00cd41e7893d16ae7291f3d3fbd8d7a15639066 /client/components/lists | |
parent | 2cc35077409886847870fa554449fd668c2353bf (diff) | |
download | wekan-8898862d36b1f0fe8e7d7bdc80064e5106894d29.tar.gz wekan-8898862d36b1f0fe8e7d7bdc80064e5106894d29.tar.bz2 wekan-8898862d36b1f0fe8e7d7bdc80064e5106894d29.zip |
Fix lint errors.
Diffstat (limited to 'client/components/lists')
-rw-r--r-- | client/components/lists/list.js | 23 | ||||
-rw-r--r-- | client/components/lists/listHeader.js | 22 |
2 files changed, 21 insertions, 24 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js index e58ea430..89d51e85 100644 --- a/client/components/lists/list.js +++ b/client/components/lists/list.js @@ -1,3 +1,5 @@ +import { Cookies } from 'meteor/ostrio:cookies'; +const cookies = new Cookies(); const { calculateIndex, enableClickOnTouch } = Utils; BlazeComponent.extendComponent({ @@ -22,9 +24,9 @@ BlazeComponent.extendComponent({ function userIsMember() { return ( - Meteor.user() - && Meteor.user().isBoardMember() - && !Meteor.user().isCommentOnly() + Meteor.user() && + Meteor.user().isBoardMember() && + !Meteor.user().isCommentOnly() ); } @@ -74,14 +76,14 @@ BlazeComponent.extendComponent({ const currentBoard = Boards.findOne(Session.get('currentBoard')); let swimlaneId = ''; if ( - Utils.boardView() === 'board-view-swimlanes' - || currentBoard.isTemplatesBoard() + Utils.boardView() === 'board-view-swimlanes' || + currentBoard.isTemplatesBoard() ) swimlaneId = Blaze.getData(ui.item.parents('.swimlane').get(0))._id; else if ( - Utils.boardView() === 'board-view-lists' - || Utils.boardView() === 'board-view-cal' - || !Utils.boardView + Utils.boardView() === 'board-view-lists' || + Utils.boardView() === 'board-view-cal' || + !Utils.boardView ) swimlaneId = currentBoard.getDefaultSwimline()._id; @@ -115,9 +117,6 @@ BlazeComponent.extendComponent({ // ugly touch event hotfix enableClickOnTouch(itemsSelector); - import { Cookies } from 'meteor/ostrio:cookies'; - const cookies = new Cookies(); - this.autorun(() => { let showDesktopDragHandles = false; currentUser = Meteor.user(); @@ -178,8 +177,6 @@ Template.list.helpers({ if (currentUser) { return (currentUser.profile || {}).showDesktopDragHandles; } else { - import { Cookies } from 'meteor/ostrio:cookies'; - const cookies = new Cookies(); if (cookies.has('showDesktopDragHandles')) { return true; } else { diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js index 34322fa9..570cc30f 100644 --- a/client/components/lists/listHeader.js +++ b/client/components/lists/listHeader.js @@ -1,3 +1,5 @@ +import { Cookies } from 'meteor/ostrio:cookies'; +const cookies = new Cookies(); let listsColors; Meteor.startup(() => { listsColors = Lists.simpleSchema()._schema.color.allowedValues; @@ -7,9 +9,9 @@ BlazeComponent.extendComponent({ canSeeAddCard() { const list = Template.currentData(); return ( - !list.getWipLimit('enabled') - || list.getWipLimit('soft') - || !this.reachedWipLimit() + !list.getWipLimit('enabled') || + list.getWipLimit('soft') || + !this.reachedWipLimit() ); }, @@ -66,8 +68,8 @@ BlazeComponent.extendComponent({ reachedWipLimit() { const list = Template.currentData(); return ( - list.getWipLimit('enabled') - && list.getWipLimit('value') <= list.cards().count() + list.getWipLimit('enabled') && + list.getWipLimit('value') <= list.cards().count() ); }, @@ -108,8 +110,6 @@ Template.listHeader.helpers({ if (currentUser) { return (currentUser.profile || {}).showDesktopDragHandles; } else { - import { Cookies } from 'meteor/ostrio:cookies'; - const cookies = new Cookies(); if (cookies.has('showDesktopDragHandles')) { return true; } else { @@ -177,8 +177,8 @@ BlazeComponent.extendComponent({ const list = Template.currentData(); if ( - list.getWipLimit('soft') - && list.getWipLimit('value') < list.cards().count() + list.getWipLimit('soft') && + list.getWipLimit('value') < list.cards().count() ) { list.setWipLimit(list.cards().count()); } @@ -189,8 +189,8 @@ BlazeComponent.extendComponent({ const list = Template.currentData(); // Prevent user from using previously stored wipLimit.value if it is less than the current number of cards in the list if ( - !list.getWipLimit('enabled') - && list.getWipLimit('value') < list.cards().count() + !list.getWipLimit('enabled') && + list.getWipLimit('value') < list.cards().count() ) { list.setWipLimit(list.cards().count()); } |