summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-04-18 18:25:34 +0300
committerLauri Ojansivu <x@xet7.org>2018-04-18 18:25:34 +0300
commit84fd00c5668caa7617aa094c9b7d47fe73926fd1 (patch)
tree66602d89991b84cf7981e83101b9a845772431f9 /client
parente402200b872026d0a01b89cf50578ab6b49bf103 (diff)
parentf41589ba823f84313b37ee1bde224500d2a778d7 (diff)
downloadwekan-84fd00c5668caa7617aa094c9b7d47fe73926fd1.tar.gz
wekan-84fd00c5668caa7617aa094c9b7d47fe73926fd1.tar.bz2
wekan-84fd00c5668caa7617aa094c9b7d47fe73926fd1.zip
Merge branch 'devel'
Diffstat (limited to 'client')
-rw-r--r--client/components/boards/boardBody.js10
-rw-r--r--client/components/boards/boardHeader.jade2
-rw-r--r--client/components/boards/boardHeader.js18
-rw-r--r--client/components/lists/listBody.js10
-rw-r--r--client/components/main/header.styl5
-rw-r--r--client/components/swimlanes/swimlanes.js7
6 files changed, 20 insertions, 32 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'() {
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js
index 6cc94371..52f34fab 100644
--- a/client/components/lists/listBody.js
+++ b/client/components/lists/listBody.js
@@ -37,11 +37,11 @@ BlazeComponent.extendComponent({
const labelIds = formComponent.labels.get();
const boardId = this.data().board()._id;
- const board = Boards.findOne(boardId);
let swimlaneId = '';
- if (board.view === 'board-view-swimlanes')
+ const boardView = Meteor.user().profile.boardView;
+ if (boardView === 'board-view-swimlanes')
swimlaneId = this.parentComponent().parentComponent().data()._id;
- else
+ else if (boardView === 'board-view-lists')
swimlaneId = Swimlanes.findOne({boardId})._id;
if (title) {
@@ -106,8 +106,8 @@ BlazeComponent.extendComponent({
},
idOrNull(swimlaneId) {
- const board = Boards.findOne(Session.get('currentBoard'));
- if (board.view === 'board-view-swimlanes')
+ const currentUser = Meteor.user();
+ if (currentUser.profile.boardView === 'board-view-swimlanes')
return swimlaneId;
return undefined;
},
diff --git a/client/components/main/header.styl b/client/components/main/header.styl
index 7993ce6a..f9455f8e 100644
--- a/client/components/main/header.styl
+++ b/client/components/main/header.styl
@@ -29,13 +29,12 @@
font-size: 0.9em
margin-right: 10px
-
.wekan-logo
- display: block
- margin: 3px auto 0
+ margin: 3px auto auto
width: 97px
opacity: 0.6
transition: opacity 0.15s
+ float: right
&:hover
opacity: 0.9
diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js
index f37e1e9c..7965c2bc 100644
--- a/client/components/swimlanes/swimlanes.js
+++ b/client/components/swimlanes/swimlanes.js
@@ -2,11 +2,10 @@ const { calculateIndex } = Utils;
function currentCardIsInThisList(listId, swimlaneId) {
const currentCard = Cards.findOne(Session.get('currentCard'));
- const currentBoardId = Session.get('currentBoard');
- const board = Boards.findOne(currentBoardId);
- if (board.view === 'board-view-lists')
+ const currentUser = Meteor.user();
+ if (currentUser.profile.boardView === 'board-view-lists')
return currentCard && currentCard.listId === listId;
- else if (board.view === 'board-view-swimlanes')
+ else if (currentUser.profile.boardView === 'board-view-swimlanes')
return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
else
return false;