diff options
author | Lauri Ojansivu <x@xet7.org> | 2016-11-20 23:31:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-20 23:31:50 +0200 |
commit | 1ad41072010fb59fdbace80a0aa049634074dac1 (patch) | |
tree | f3c444b06c6b38d80028d524d6e041c8a48de40e /client/components/users | |
parent | 693f615136319e0e6da370294270272691713f94 (diff) | |
parent | 4359f66ecee8003f0fa625fd5e293ba38cc133e3 (diff) | |
download | wekan-1ad41072010fb59fdbace80a0aa049634074dac1.tar.gz wekan-1ad41072010fb59fdbace80a0aa049634074dac1.tar.bz2 wekan-1ad41072010fb59fdbace80a0aa049634074dac1.zip |
Merge pull request #19 from mario-orlicky/hide-system-messages
New change settings option and possibility to hide system messagaes
Diffstat (limited to 'client/components/users')
-rw-r--r-- | client/components/users/userHeader.jade | 17 | ||||
-rw-r--r-- | client/components/users/userHeader.js | 13 |
2 files changed, 26 insertions, 4 deletions
diff --git a/client/components/users/userHeader.jade b/client/components/users/userHeader.jade index ce8cf1af..f7f6222a 100644 --- a/client/components/users/userHeader.jade +++ b/client/components/users/userHeader.jade @@ -12,10 +12,11 @@ template(name="memberMenuPopup") ul.pop-over-list with currentUser li: a.js-edit-profile {{_ 'edit-profile'}} - li: a.js-change-avatar {{_ 'edit-avatar'}} - li: a.js-change-password {{_ 'changePasswordPopup-title'}} - li: a.js-change-language {{_ 'changeLanguagePopup-title'}} - li: a.js-edit-notification {{_ 'editNotificationPopup-title'}} + li: a.js-change-settings {{_ 'change-settings'}} + li: a.js-change-avatar {{_ 'edit-avatar'}} + li: a.js-change-password {{_ 'changePasswordPopup-title'}} + li: a.js-change-language {{_ 'changeLanguagePopup-title'}} + li: a.js-edit-notification {{_ 'editNotificationPopup-title'}} hr ul.pop-over-list li: a.js-logout {{_ 'log-out'}} @@ -63,3 +64,11 @@ template(name="changeLanguagePopup") = name if isCurrentLanguage i.fa.fa-check + +template(name="changeSettingsPopup") + ul.pop-over-list + li + a.js-toggle-system-messages + | {{_ 'hide-system-messages'}} + if hiddenSystemMessages + i.fa.fa-check diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js index 17d9eb5f..1c390395 100644 --- a/client/components/users/userHeader.js +++ b/client/components/users/userHeader.js @@ -5,6 +5,7 @@ Template.headerUserBar.events({ Template.memberMenuPopup.events({ 'click .js-edit-profile': Popup.open('editProfile'), + 'click .js-change-settings': Popup.open('changeSettings'), 'click .js-change-avatar': Popup.open('changeAvatar'), 'click .js-change-password': Popup.open('changePassword'), 'click .js-change-language': Popup.open('changeLanguage'), @@ -89,3 +90,15 @@ Template.changeLanguagePopup.events({ evt.preventDefault(); }, }); + +Template.changeSettingsPopup.helpers({ + hiddenSystemMessages() { + return Meteor.user().hasHiddenSystemMessages(); + }, +}); + +Template.changeSettingsPopup.events({ + 'click .js-toggle-system-messages'() { + Meteor.call('toggleSystemMessages'); + }, +}); |