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/cards/minicard.js | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'client/components/cards/minicard.js') diff --git a/client/components/cards/minicard.js b/client/components/cards/minicard.js index 4c76db46..5caea709 100644 --- a/client/components/cards/minicard.js +++ b/client/components/cards/minicard.js @@ -18,7 +18,13 @@ BlazeComponent.extendComponent({ }, { 'click .js-toggle-minicard-label-text'() { - Meteor.call('toggleMinicardLabelText'); + import { Cookies } from 'meteor/ostrio:cookies'; + const cookies = new Cookies(); + if (cookies.has('hiddenMinicardLabelText')) { + cookies.remove('hiddenMinicardLabelText'); //true + } else { + cookies.set('hiddenMinicardLabelText', 'true'); //true + } }, }, ]; @@ -27,9 +33,21 @@ BlazeComponent.extendComponent({ Template.minicard.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; + } }, hiddenMinicardLabelText() { - return Meteor.user().hasHiddenMinicardLabelText(); + import { Cookies } from 'meteor/ostrio:cookies'; + const cookies = new Cookies(); + if (cookies.has('hiddenMinicardLabelText')) { + return true; + } else { + return false; + } }, }); -- cgit v1.2.3-1-g7c22 From 351d4767d7e93c90ac798769d6071da8730d834f Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Tue, 19 Nov 2019 14:09:36 +0200 Subject: When logged in, use database for setting, so that changes are immediate. Only on public board use cookies. Comment out Collapse CSS that is not in use. Thanks to xet7 ! --- client/components/cards/minicard.js | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'client/components/cards/minicard.js') diff --git a/client/components/cards/minicard.js b/client/components/cards/minicard.js index 5caea709..a9f92dec 100644 --- a/client/components/cards/minicard.js +++ b/client/components/cards/minicard.js @@ -33,21 +33,31 @@ BlazeComponent.extendComponent({ Template.minicard.helpers({ showDesktopDragHandles() { - import { Cookies } from 'meteor/ostrio:cookies'; - const cookies = new Cookies(); - if (cookies.has('showDesktopDragHandles')) { - return true; + currentUser = Meteor.user(); + if (currentUser) { + return (currentUser.profile || {}).showDesktopDragHandles; } else { - return false; + import { Cookies } from 'meteor/ostrio:cookies'; + const cookies = new Cookies(); + if (cookies.has('showDesktopDragHandles')) { + return true; + } else { + return false; + } } }, hiddenMinicardLabelText() { - import { Cookies } from 'meteor/ostrio:cookies'; - const cookies = new Cookies(); - if (cookies.has('hiddenMinicardLabelText')) { - return true; + currentUser = Meteor.user(); + if (currentUser) { + return (currentUser.profile || {}).hiddenMinicardLabelText; } else { - return false; + import { Cookies } from 'meteor/ostrio:cookies'; + const cookies = new Cookies(); + if (cookies.has('hiddenMinicardLabelText')) { + return true; + } else { + return false; + } } }, }); -- cgit v1.2.3-1-g7c22 From 8898862d36b1f0fe8e7d7bdc80064e5106894d29 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Tue, 26 Nov 2019 02:29:36 +0200 Subject: Fix lint errors. --- client/components/cards/minicard.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'client/components/cards/minicard.js') diff --git a/client/components/cards/minicard.js b/client/components/cards/minicard.js index a9f92dec..1ea608f5 100644 --- a/client/components/cards/minicard.js +++ b/client/components/cards/minicard.js @@ -1,3 +1,5 @@ +import { Cookies } from 'meteor/ostrio:cookies'; +const cookies = new Cookies(); // Template.cards.events({ // 'click .member': Popup.open('cardMember') // }); @@ -18,8 +20,6 @@ BlazeComponent.extendComponent({ }, { 'click .js-toggle-minicard-label-text'() { - import { Cookies } from 'meteor/ostrio:cookies'; - const cookies = new Cookies(); if (cookies.has('hiddenMinicardLabelText')) { cookies.remove('hiddenMinicardLabelText'); //true } else { @@ -37,8 +37,6 @@ Template.minicard.helpers({ if (currentUser) { return (currentUser.profile || {}).showDesktopDragHandles; } else { - import { Cookies } from 'meteor/ostrio:cookies'; - const cookies = new Cookies(); if (cookies.has('showDesktopDragHandles')) { return true; } else { @@ -51,8 +49,6 @@ Template.minicard.helpers({ if (currentUser) { return (currentUser.profile || {}).hiddenMinicardLabelText; } else { - import { Cookies } from 'meteor/ostrio:cookies'; - const cookies = new Cookies(); if (cookies.has('hiddenMinicardLabelText')) { return true; } else { -- cgit v1.2.3-1-g7c22 From 2bf004120d5a43cd3c3c060fc7c0c30d1b01f220 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Fri, 3 Jan 2020 06:49:35 +0200 Subject: Add Worker role. Add more Font Awesome icons. Fix browser console errors when editing user profile name etc. Thanks to xet7 ! Closes #2788 --- client/components/cards/minicard.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'client/components/cards/minicard.js') diff --git a/client/components/cards/minicard.js b/client/components/cards/minicard.js index 1ea608f5..da36b87f 100644 --- a/client/components/cards/minicard.js +++ b/client/components/cards/minicard.js @@ -36,24 +36,20 @@ Template.minicard.helpers({ currentUser = Meteor.user(); if (currentUser) { return (currentUser.profile || {}).showDesktopDragHandles; + } else if (cookies.has('showDesktopDragHandles')) { + return true; } else { - if (cookies.has('showDesktopDragHandles')) { - return true; - } else { - return false; - } + return false; } }, hiddenMinicardLabelText() { currentUser = Meteor.user(); if (currentUser) { return (currentUser.profile || {}).hiddenMinicardLabelText; + } else if (cookies.has('hiddenMinicardLabelText')) { + return true; } else { - if (cookies.has('hiddenMinicardLabelText')) { - return true; - } else { - return false; - } + return false; } }, }); -- cgit v1.2.3-1-g7c22