diff options
author | nztqa <nztqa@users.noreply.github.com> | 2017-09-25 20:27:54 +0900 |
---|---|---|
committer | nztqa <nztqa@users.noreply.github.com> | 2017-09-25 20:27:54 +0900 |
commit | 61ee107c27ea4b5be3b8b9bcb6d6a36de65dfcd1 (patch) | |
tree | f530b4a5c3f8bf657e5d071d90e198d421514407 /client/components/cards | |
parent | b503ba1144454234c3b9f852aefcde6e4a262a63 (diff) | |
download | wekan-61ee107c27ea4b5be3b8b9bcb6d6a36de65dfcd1.tar.gz wekan-61ee107c27ea4b5be3b8b9bcb6d6a36de65dfcd1.tar.bz2 wekan-61ee107c27ea4b5be3b8b9bcb6d6a36de65dfcd1.zip |
Disable button when "Hide system messages" in user profile setting is valid
Diffstat (limited to 'client/components/cards')
-rw-r--r-- | client/components/cards/cardDetails.jade | 5 | ||||
-rw-r--r-- | client/components/cards/cardDetails.js | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index 3a144557..60b20a8a 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -89,7 +89,10 @@ template(name="cardDetails") h2 {{ _ 'activity'}} .material-toggle-switch span.toggle-switch-title {{_ 'hide-system-messages'}} - input.toggle-switch(type="checkbox" id="toggleButton") + if hiddenSystemMessages + input.toggle-switch(type="checkbox" id="toggleButton" checked="checked" disabled) + else + input.toggle-switch(type="checkbox" id="toggleButton") label.toggle-label(for="toggleButton") if currentUser.isBoardMember +commentForm diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index d622c912..ed23b359 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -28,6 +28,11 @@ BlazeComponent.extendComponent({ return card.findWatcher(Meteor.userId()); }, + hiddenSystemMessages() { + console.log('doo:', Meteor.user().hasHiddenSystemMessages()); + return Meteor.user().hasHiddenSystemMessages(); + }, + canModifyCard() { return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly(); }, |