diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/components/boards/boardHeader.jade | 4 | ||||
-rw-r--r-- | client/lib/utils.js | 18 |
2 files changed, 15 insertions, 7 deletions
diff --git a/client/components/boards/boardHeader.jade b/client/components/boards/boardHeader.jade index 53346db4..1daf0618 100644 --- a/client/components/boards/boardHeader.jade +++ b/client/components/boards/boardHeader.jade @@ -99,10 +99,10 @@ template(name="boardHeaderBar") a.board-header-btn.js-toggle-board-view( title="{{_ 'board-view'}}") i.fa.fa-caret-down - if $eq boardView 'board-view-lists' - i.fa.fa-trello if $eq boardView 'board-view-swimlanes' i.fa.fa-th-large + if $eq boardView 'board-view-lists' + i.fa.fa-trello if $eq boardView 'board-view-cal' i.fa.fa-calendar span {{#if boardView}}{{_ boardView}}{{else}}{{_ 'board-view-swimlanes'}}{{/if}} 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'; } }, |