diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-11-19 21:55:43 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-11-19 21:55:43 +0200 |
commit | 115d23f9293cad8a93f18f75a47a8a65756f71ce (patch) | |
tree | 1f3bdb5a56ac08745eeba73bb3b0274098ad84d8 /client | |
parent | 975258ef39787010d0ecb5d0f6b03ec3e0338e58 (diff) | |
download | wekan-115d23f9293cad8a93f18f75a47a8a65756f71ce.tar.gz wekan-115d23f9293cad8a93f18f75a47a8a65756f71ce.tar.bz2 wekan-115d23f9293cad8a93f18f75a47a8a65756f71ce.zip |
Use database when logged in. Continued.
Thanks to xet7 !
Diffstat (limited to 'client')
-rw-r--r-- | client/components/boards/boardBody.js | 3 | ||||
-rw-r--r-- | client/components/lists/list.js | 3 | ||||
-rw-r--r-- | client/components/lists/listBody.js | 12 | ||||
-rw-r--r-- | client/components/swimlanes/swimlanes.js | 6 | ||||
-rw-r--r-- | client/lib/utils.js | 12 |
5 files changed, 19 insertions, 17 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index f00b8b1d..b10f55ab 100644 --- a/client/components/boards/boardBody.js +++ b/client/components/boards/boardBody.js @@ -199,7 +199,8 @@ BlazeComponent.extendComponent({ let showDesktopDragHandles = false; currentUser = Meteor.user(); if (currentUser) { - showDesktopDragHandles = (currentUser.profile || {}).showDesktopDragHandles; + showDesktopDragHandles = (currentUser.profile || {}) + .showDesktopDragHandles; } else { if (cookies.has('showDesktopDragHandles')) { showDesktopDragHandles = true; diff --git a/client/components/lists/list.js b/client/components/lists/list.js index 7a51fc6e..d97f4404 100644 --- a/client/components/lists/list.js +++ b/client/components/lists/list.js @@ -122,7 +122,8 @@ BlazeComponent.extendComponent({ let showDesktopDragHandles = false; currentUser = Meteor.user(); if (currentUser) { - showDesktopDragHandles = (currentUser.profile || {}).showDesktopDragHandles; + showDesktopDragHandles = (currentUser.profile || {}) + .showDesktopDragHandles; } else { if (cookies.has('showDesktopDragHandles')) { showDesktopDragHandles = true; diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 46d2794e..b0974705 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -713,13 +713,11 @@ BlazeComponent.extendComponent({ .data()._id; } } - } else { - if (Utils.boardView() === 'board-view-swimlanes') { - this.swimlaneId = this.parentComponent() - .parentComponent() - .parentComponent() - .data()._id; - } + } else if (Utils.boardView() === 'board-view-swimlanes') { + this.swimlaneId = this.parentComponent() + .parentComponent() + .parentComponent() + .data()._id; } }, diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js index cad673aa..8618373c 100644 --- a/client/components/swimlanes/swimlanes.js +++ b/client/components/swimlanes/swimlanes.js @@ -102,7 +102,8 @@ function initSortable(boardComponent, $listsDom) { let showDesktopDragHandles = false; currentUser = Meteor.user(); if (currentUser) { - showDesktopDragHandles = (currentUser.profile || {}).showDesktopDragHandles; + showDesktopDragHandles = (currentUser.profile || {}) + .showDesktopDragHandles; } else { import { Cookies } from 'meteor/ostrio:cookies'; const cookies = new Cookies(); @@ -203,7 +204,8 @@ BlazeComponent.extendComponent({ let showDesktopDragHandles = false; currentUser = Meteor.user(); if (currentUser) { - showDesktopDragHandles = (currentUser.profile || {}).showDesktopDragHandles; + showDesktopDragHandles = (currentUser.profile || {}) + .showDesktopDragHandles; } else { import { Cookies } from 'meteor/ostrio:cookies'; const cookies = new Cookies(); diff --git a/client/lib/utils.js b/client/lib/utils.js index 80ec412c..ab5e3597 100644 --- a/client/lib/utils.js +++ b/client/lib/utils.js @@ -10,9 +10,9 @@ Utils = { cookies.set('boardView', 'board-view-lists'); //true } else if (view === 'board-view-swimlanes') { cookies.set('boardView', 'board-view-swimlanes'); //true - //} else if (view === 'board-view-collapse') { - // cookies.set('boardView', 'board-view-swimlane'); //true - // cookies.set('collapseSwimlane', 'true'); //true + //} else if (view === 'board-view-collapse') { + // cookies.set('boardView', 'board-view-swimlane'); //true + // cookies.set('collapseSwimlane', 'true'); //true } else if (view === 'board-view-cal') { cookies.set('boardView', 'board-view-cal'); //true } @@ -29,7 +29,7 @@ Utils = { boardView() { currentUser = Meteor.user(); if (currentUser) { - return (currentUser.profile || {}).boardView + return (currentUser.profile || {}).boardView; } else { import { Cookies } from 'meteor/ostrio:cookies'; const cookies = new Cookies(); @@ -40,8 +40,8 @@ Utils = { //&& !cookies.has('collapseSwimlane') ) { return 'board-view-swimlanes'; - //} else if (cookies.has('collapseSwimlane')) { - // return 'board-view-swimlanes'; + //} else if (cookies.has('collapseSwimlane')) { + // return 'board-view-swimlanes'; } else if (cookies.get('boardView') === 'board-view-cal') { return 'board-view-cal'; } else { |