mirror of
https://github.com/wekan/wekan.git
synced 2026-02-05 16:11:47 +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
|
|
@ -3,13 +3,9 @@ template(name="minicard")
|
|||
class="{{#if isLinkedCard}}linked-card{{/if}}"
|
||||
class="{{#if isLinkedBoard}}linked-board{{/if}}"
|
||||
class="minicard-{{colorClass}}")
|
||||
if isMiniScreen
|
||||
if isMiniScreenOrShowDesktopDragHandles
|
||||
.handle
|
||||
.fa.fa-arrows
|
||||
unless isMiniScreen
|
||||
if showDesktopDragHandles
|
||||
.handle
|
||||
.fa.fa-arrows
|
||||
if cover
|
||||
.minicard-cover(style="background-image: url('{{cover.url}}');")
|
||||
if labels
|
||||
|
|
|
|||
|
|
@ -75,16 +75,6 @@ BlazeComponent.extendComponent({
|
|||
}).register('minicard');
|
||||
|
||||
Template.minicard.helpers({
|
||||
showDesktopDragHandles() {
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
return (currentUser.profile || {}).showDesktopDragHandles;
|
||||
} else if (window.localStorage.getItem('showDesktopDragHandles')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
hiddenMinicardLabelText() {
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue