mirror of
https://github.com/wekan/wekan.git
synced 2026-01-04 16:48:49 +01:00
isMiniScreen and showDesktopDragHandles centralized in class Utils
- a lot of same code everywhere in many files, this is against the concept "don't repeat yourself"
This commit is contained in:
parent
cbc6463019
commit
b9178cfcb6
12 changed files with 14 additions and 126 deletions
|
|
@ -134,7 +134,7 @@ template(name="changeSettingsPopup")
|
|||
a.js-toggle-desktop-drag-handles
|
||||
i.fa.fa-arrows
|
||||
| {{_ 'show-desktop-drag-handles'}}
|
||||
if showDesktopDragHandles
|
||||
if isShowDesktopDragHandles
|
||||
i.fa.fa-check
|
||||
unless currentUser.isWorker
|
||||
li
|
||||
|
|
|
|||
|
|
@ -259,16 +259,6 @@ Template.changeLanguagePopup.events({
|
|||
});
|
||||
|
||||
Template.changeSettingsPopup.helpers({
|
||||
showDesktopDragHandles() {
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
return (currentUser.profile || {}).showDesktopDragHandles;
|
||||
} else if (window.localStorage.getItem('showDesktopDragHandles')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
hiddenSystemMessages() {
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue