Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2015-09-17 03:46:24 +0300
committerPatricio Cano <suprnova32@gmail.com>2015-09-17 03:46:24 +0300
commit4c98357f16b1acfa793d8a5b28c7147e21f20356 (patch)
tree4fac132cf08e07b89a44c5cc253727c4c2552924 /app/assets
parentde1ffce7391a9e6adf07a8be60cd36bbc95ef2f3 (diff)
Added Global to the drop downs and updated the label of the button to show the current level instead of `Notifications`
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/project.js.coffee12
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