mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Disable button when "Hide system messages" in user profile setting is valid
This commit is contained in:
parent
b503ba1144
commit
61ee107c27
4 changed files with 15 additions and 4 deletions
|
|
@ -89,6 +89,9 @@ template(name="cardDetails")
|
||||||
h2 {{ _ 'activity'}}
|
h2 {{ _ 'activity'}}
|
||||||
.material-toggle-switch
|
.material-toggle-switch
|
||||||
span.toggle-switch-title {{_ 'hide-system-messages'}}
|
span.toggle-switch-title {{_ 'hide-system-messages'}}
|
||||||
|
if hiddenSystemMessages
|
||||||
|
input.toggle-switch(type="checkbox" id="toggleButton" checked="checked" disabled)
|
||||||
|
else
|
||||||
input.toggle-switch(type="checkbox" id="toggleButton")
|
input.toggle-switch(type="checkbox" id="toggleButton")
|
||||||
label.toggle-label(for="toggleButton")
|
label.toggle-label(for="toggleButton")
|
||||||
if currentUser.isBoardMember
|
if currentUser.isBoardMember
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,11 @@ BlazeComponent.extendComponent({
|
||||||
return card.findWatcher(Meteor.userId());
|
return card.findWatcher(Meteor.userId());
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hiddenSystemMessages() {
|
||||||
|
console.log('doo:', Meteor.user().hasHiddenSystemMessages());
|
||||||
|
return Meteor.user().hasHiddenSystemMessages();
|
||||||
|
},
|
||||||
|
|
||||||
canModifyCard() {
|
canModifyCard() {
|
||||||
return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly();
|
return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -668,11 +668,11 @@ button
|
||||||
left: 20px
|
left: 20px
|
||||||
background-color: #179588
|
background-color: #179588
|
||||||
|
|
||||||
.toggle-switch:disabled ~ .toggle-label
|
.toggle-switch:checked:disabled ~ .toggle-label
|
||||||
background-color: #d5d5d5
|
background-color: #d5d5d5
|
||||||
pointer-events: none
|
pointer-events: none
|
||||||
|
|
||||||
&after
|
&:after
|
||||||
background-color: #bcbdbc
|
background-color: #bcbdbc
|
||||||
|
|
||||||
.toggle-switch
|
.toggle-switch
|
||||||
|
|
@ -682,6 +682,7 @@ button
|
||||||
margin: 0 0.5em
|
margin: 0 0.5em
|
||||||
display: flex
|
display: flex
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width: 800px)
|
@media screen and (max-width: 800px)
|
||||||
.edit-controls,
|
.edit-controls,
|
||||||
.add-controls
|
.add-controls
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,10 @@ BlazeComponent.extendComponent({
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
Utils.goBoardId(Session.get('currentBoard'));
|
Utils.goBoardId(Session.get('currentBoard'));
|
||||||
} else {
|
} else {
|
||||||
|
if (!Meteor.user().hasHiddenSystemMessages()) {
|
||||||
$('.toggle-switch').prop('checked', false);
|
$('.toggle-switch').prop('checked', false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
cardIsSelected() {
|
cardIsSelected() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue