From 96abe3c6914ce37d9fb44da8fda375e40ad65c9e Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Mon, 18 Nov 2019 22:23:49 +0200 Subject: New feature: Now there is popup selection of Lists/Swimlanes/Calendar/Roles. New feature, not set visible yet, because switching to it does not work properly yet: Collapsible Swimlanes #2804 Fix: Public board now loads correctly. When you select one of Lists/Swimlanes/Calendar view and reload webbrowser page, it can change view. Closes #2311 Fix: List sorting commented out. Closes #2800 Fix: Errors hasHiddenMinicardText, hasShowDragHandles, showSort, hasSortBy, profile, FirefoxAndroid/IE11/Vivaldi/Chromium browsers not working by using cookies instead of database. More details at https://github.com/wekan/wekan/issues/2643#issuecomment-554907955 Note: Cookie changes are not always immediate, if there is no effect, you may need to reload webbrowser page. Closes #2643 . Thanks to xet7 ! --- client/components/lists/listHeader.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'client/components/lists/listHeader.js') diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js index b524d4e0..90946610 100644 --- a/client/components/lists/listHeader.js +++ b/client/components/lists/listHeader.js @@ -44,14 +44,16 @@ BlazeComponent.extendComponent({ }, limitToShowCardsCount() { - return Meteor.user().getLimitToShowCardsCount(); + const currentUser = Meteor.user(); + if (currentUser) { + return Meteor.user().getLimitToShowCardsCount(); + } }, cardsCount() { const list = Template.currentData(); let swimlaneId = ''; - const boardView = (Meteor.user().profile || {}).boardView; - if (boardView === 'board-view-swimlanes') + if (Utils.boardView() === 'board-view-swimlanes') swimlaneId = this.parentComponent() .parentComponent() .data()._id; @@ -100,7 +102,13 @@ BlazeComponent.extendComponent({ Template.listHeader.helpers({ showDesktopDragHandles() { - return Meteor.user().hasShowDesktopDragHandles(); + import { Cookies } from 'meteor/ostrio:cookies'; + const cookies = new Cookies(); + if (cookies.has('showDesktopDragHandles')) { + return true; + } else { + return false; + } }, }); -- cgit v1.2.3-1-g7c22