diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-04-16 21:51:10 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-04-16 21:51:10 +0300 |
commit | 2cd1fbf9d92b46beaa9528d3dafaf3809451fb06 (patch) | |
tree | e5809e7226b71b845ee04e3b47e0ccd8c8c963d3 /client/components/boards | |
parent | ea289c781075c893a0e3a6f05e96f3b3263f0466 (diff) | |
parent | 29c3d939a77eac2199cdf6fa1b2c660d582022be (diff) | |
download | wekan-2cd1fbf9d92b46beaa9528d3dafaf3809451fb06.tar.gz wekan-2cd1fbf9d92b46beaa9528d3dafaf3809451fb06.tar.bz2 wekan-2cd1fbf9d92b46beaa9528d3dafaf3809451fb06.zip |
Merge branch 'andresmanelli-viewProfile' into devel
Diffstat (limited to 'client/components/boards')
-rw-r--r-- | client/components/boards/boardBody.js | 10 | ||||
-rw-r--r-- | client/components/boards/boardHeader.jade | 2 | ||||
-rw-r--r-- | client/components/boards/boardHeader.js | 18 |
3 files changed, 10 insertions, 20 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index aa7b6a75..456bf9b3 100644 --- a/client/components/boards/boardBody.js +++ b/client/components/boards/boardBody.js @@ -87,15 +87,13 @@ BlazeComponent.extendComponent({ }, isViewSwimlanes() { - const currentBoardId = Session.get('currentBoard'); - const board = Boards.findOne(currentBoardId); - return (board.view === 'board-view-swimlanes'); + const currentUser = Meteor.user(); + return (currentUser.profile.boardView === 'board-view-swimlanes'); }, isViewLists() { - const currentBoardId = Session.get('currentBoard'); - const board = Boards.findOne(currentBoardId); - return (board.view === 'board-view-lists'); + const currentUser = Meteor.user(); + return (currentUser.profile.boardView === 'board-view-lists'); }, openNewListForm() { diff --git a/client/components/boards/boardHeader.jade b/client/components/boards/boardHeader.jade index ce444c27..fe0771cb 100644 --- a/client/components/boards/boardHeader.jade +++ b/client/components/boards/boardHeader.jade @@ -95,7 +95,7 @@ template(name="boardHeaderBar") a.board-header-btn.js-toggle-board-view( title="{{_ 'board-view'}}") i.fa.fa-th-large - span {{_ currentBoard.view}} + span {{_ currentUser.profile.boardView}} if canModifyBoard a.board-header-btn.js-multiselection-activate( diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js index 64cb0a54..2b587831 100644 --- a/client/components/boards/boardHeader.js +++ b/client/components/boards/boardHeader.js @@ -77,19 +77,11 @@ BlazeComponent.extendComponent({ Modal.open('archivedBoards'); }, 'click .js-toggle-board-view'() { - const currentBoard = Boards.findOne(Session.get('currentBoard')); - if (currentBoard.view === 'board-view-swimlanes') { - Boards.update(currentBoard._id, { - $set: { - view: 'board-view-lists', - }, - }); - } else if (currentBoard.view === 'board-view-lists') { - Boards.update(currentBoard._id, { - $set: { - view: 'board-view-swimlanes', - }, - }); + const currentUser = Meteor.user(); + if (currentUser.profile.boardView === 'board-view-swimlanes') { + currentUser.setBoardView('board-view-lists'); + } else if (currentUser.profile.boardView === 'board-view-lists') { + currentUser.setBoardView('board-view-swimlanes'); } }, 'click .js-open-filter-view'() { |