summaryrefslogtreecommitdiffstats
path: root/client/components/swimlanes/swimlanes.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-02-03 02:18:35 +0200
committerLauri Ojansivu <x@xet7.org>2019-02-03 02:18:35 +0200
commit7ba8f72d7bee175d30ecf79cbde34fdbdb9e9c30 (patch)
tree97d5d7529fa17af5dea397a60f9ffa4d8b659c7b /client/components/swimlanes/swimlanes.js
parentd0f74d7a9908a20d7caaeb0323b2529384f0a7f5 (diff)
downloadwekan-7ba8f72d7bee175d30ecf79cbde34fdbdb9e9c30.tar.gz
wekan-7ba8f72d7bee175d30ecf79cbde34fdbdb9e9c30.tar.bz2
wekan-7ba8f72d7bee175d30ecf79cbde34fdbdb9e9c30.zip
- [Fix: Not displaying card content of public board: Snap, Docker and Sandstorm Shared Wekan Board
Link](https://github.com/wekan/wekan/issues/1623) with [code from ChronikEwok](https://github.com/ChronikEwok/wekan/commit/cad9b20451bb6149bfb527a99b5001873b06c3de). Thanks to ChronikEwok ! Closes #1623
Diffstat (limited to 'client/components/swimlanes/swimlanes.js')
-rw-r--r--client/components/swimlanes/swimlanes.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js
index 71317714..bf53fd28 100644
--- a/client/components/swimlanes/swimlanes.js
+++ b/client/components/swimlanes/swimlanes.js
@@ -3,14 +3,20 @@ const { calculateIndex, enableClickOnTouch } = Utils;
function currentCardIsInThisList(listId, swimlaneId) {
const currentCard = Cards.findOne(Session.get('currentCard'));
const currentUser = Meteor.user();
- if (currentUser.profile.boardView === 'board-view-lists')
- return currentCard && currentCard.listId === listId;
- else if (currentUser.profile.boardView === 'board-view-swimlanes')
+ if (currentUser && currentUser.profile.boardView === 'board-view-swimlanes')
return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
else if (currentUser.profile.boardView === 'board-view-cal')
return currentCard;
- else
- return false;
+ else // Default view: board-view-lists
+ return currentCard && currentCard.listId === listId;
+ // https://github.com/wekan/wekan/issues/1623
+ // https://github.com/ChronikEwok/wekan/commit/cad9b20451bb6149bfb527a99b5001873b06c3de
+ // TODO: In public board, if you would like to switch between List/Swimlane view, you could
+ // 1) If there is no view cookie, save to cookie board-view-lists
+ // board-view-lists / board-view-swimlanes / board-view-cal
+ // 2) If public user changes clicks board-view-lists then change view and
+ // then change view and save cookie with view value
+ // without using currentuser above, because currentuser is null.
}
function initSortable(boardComponent, $listsDom) {