mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 21:47:10 -04:00
Use Meteor.subscribe instead of DOM manipulation for Hide system messages
This commit is contained in:
parent
e587964e82
commit
26aa9a4ac4
4 changed files with 3 additions and 5 deletions
|
@ -90,7 +90,7 @@ template(name="boardActivities")
|
|||
|
||||
template(name="cardActivities")
|
||||
each currentCard.activities
|
||||
.activity.js-card-activity
|
||||
.activity
|
||||
+userAvatar(userId=user._id)
|
||||
p.activity-desc
|
||||
+memberName(user=user)
|
||||
|
|
|
@ -90,7 +90,7 @@ template(name="cardDetails")
|
|||
.material-toggle-switch
|
||||
span.toggle-switch-title {{_ 'hide-system-messages'}}
|
||||
if hiddenSystemMessages
|
||||
input.toggle-switch(type="checkbox" id="toggleButton" checked="checked" disabled)
|
||||
input.toggle-switch(type="checkbox" id="toggleButton" checked="checked")
|
||||
else
|
||||
input.toggle-switch(type="checkbox" id="toggleButton")
|
||||
label.toggle-label(for="toggleButton")
|
||||
|
|
|
@ -104,7 +104,7 @@ BlazeComponent.extendComponent({
|
|||
this.parentComponent().mouseHasEnterCardDetails = true;
|
||||
},
|
||||
'click #toggleButton'() {
|
||||
$('div.activity.js-card-activity:not(:has(.activity-comment))').toggle();
|
||||
Meteor.call('toggleSystemMessages');
|
||||
},
|
||||
}];
|
||||
},
|
||||
|
|
|
@ -83,8 +83,6 @@ BlazeComponent.extendComponent({
|
|||
evt.stopImmediatePropagation();
|
||||
evt.preventDefault();
|
||||
Utils.goBoardId(Session.get('currentBoard'));
|
||||
} else if (!Meteor.user().hasHiddenSystemMessages()) {
|
||||
$('.toggle-switch').prop('checked', false);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue