diff options
author | Lauri Ojansivu <x@xet7.org> | 2020-06-08 19:12:17 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2020-06-08 19:12:17 +0300 |
commit | 39519d1cc944c567837be0f88ab4a037e2144c61 (patch) | |
tree | 080f635f9cd7aadb15e82ae609fc8f0b5647c51b /client/lib | |
parent | dcbf92b5b18426078facdb0d983c4747f73ee2d4 (diff) | |
download | wekan-39519d1cc944c567837be0f88ab4a037e2144c61.tar.gz wekan-39519d1cc944c567837be0f88ab4a037e2144c61.tar.bz2 wekan-39519d1cc944c567837be0f88ab4a037e2144c61.zip |
1) Public board default view to Swimlane.
2) When changing Public board view (sets view cookie), also reload page so view is changed immediately.
Thanks to xet7 !
Diffstat (limited to 'client/lib')
-rw-r--r-- | client/lib/utils.js | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/client/lib/utils.js b/client/lib/utils.js index c921fddc..754214c0 100644 --- a/client/lib/utils.js +++ b/client/lib/utils.js @@ -6,12 +6,18 @@ Utils = { currentUser = Meteor.user(); if (currentUser) { Meteor.user().setBoardView(view); - } else if (view === 'board-view-lists') { - cookies.set('boardView', 'board-view-lists'); //true } else if (view === 'board-view-swimlanes') { cookies.set('boardView', 'board-view-swimlanes'); //true + location.reload(); + } else if (view === 'board-view-lists') { + cookies.set('boardView', 'board-view-lists'); //true + location.reload(); } else if (view === 'board-view-cal') { cookies.set('boardView', 'board-view-cal'); //true + location.reload(); + } else { + cookies.set('boardView', 'board-view-swimlanes'); //true + location.reload(); } }, @@ -24,14 +30,16 @@ Utils = { currentUser = Meteor.user(); if (currentUser) { return (currentUser.profile || {}).boardView; - } else if (cookies.get('boardView') === 'board-view-lists') { - return 'board-view-lists'; } else if (cookies.get('boardView') === 'board-view-swimlanes') { return 'board-view-swimlanes'; + } else if (cookies.get('boardView') === 'board-view-lists') { + return 'board-view-lists'; } else if (cookies.get('boardView') === 'board-view-cal') { return 'board-view-cal'; } else { - return false; + cookies.set('boardView', 'board-view-swimlanes'); //true + location.reload(); + return 'board-view-swimlanes'; } }, |