diff options
Diffstat (limited to 'app/assets/javascripts/project.js.coffee')
-rw-r--r-- | app/assets/javascripts/project.js.coffee | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/project.js.coffee b/app/assets/javascripts/project.js.coffee index e187ec6ab77..0ea8fffce07 100644 --- a/app/assets/javascripts/project.js.coffee +++ b/app/assets/javascripts/project.js.coffee @@ -27,8 +27,16 @@ class @Project $('.update-notification').on 'click', (e) -> e.preventDefault() - level = $(@).data 'notification-level' - $('#notification_level').val(level) + notification_level = $(@).data 'notification-level' + $('#notification_level').val(notification_level) $('#notification-form').submit() + label = null + switch notification_level + when 0 then label = ' Disabled ' + when 1 then label = ' Participating ' + when 2 then label = ' Watching ' + when 3 then label = ' Global ' + when 4 then label = ' On Mention ' + $('#notifications-button').empty().append("<i class='fa fa-bell'></i>" + label + "<i class='fa fa-angle-down'></i>") $(@).parents('ul').find('li.active').removeClass 'active' $(@).parent().addClass 'active'
\ No newline at end of file |