diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-06-21 15:31:39 +0000 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-06-21 11:52:06 -0400 |
commit | 605e122952e7c5595b2e977d29c03dc70930a848 (patch) | |
tree | 9a1750b4863a5cdf0cd0f019e9d123c7ab4b25cc /app/assets | |
parent | 16b4218791958826896344fdc3403a2dcdc23a58 (diff) | |
download | gitlab-ce-605e122952e7c5595b2e977d29c03dc70930a848.tar.gz |
Merge branch 'notification-dropdown-active-fix' into 'master'
Fixed issue with notification dropdown not updating active
## What does this MR do?
This fixes an issue where the notification dropdown wouldn't correctly update the selected notification type in the dropdown. I've also added a spinner to show the action is happening & removed the flash message for success.
## What are the relevant issue numbers?
Closes #18480
## Screenshots (if relevant)
![notifications](/uploads/5ed5055d180c12450cea77543ae5f44e/notifications.gif)
See merge request !4615
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/notifications_dropdown.js.coffee | 7 | ||||
-rw-r--r-- | app/assets/javascripts/project.js.coffee | 1 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/projects.scss | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/app/assets/javascripts/notifications_dropdown.js.coffee b/app/assets/javascripts/notifications_dropdown.js.coffee index 74d2298c1fa..0bbd082c156 100644 --- a/app/assets/javascripts/notifications_dropdown.js.coffee +++ b/app/assets/javascripts/notifications_dropdown.js.coffee @@ -1,5 +1,5 @@ class @NotificationsDropdown - $ -> + constructor: -> $(document) .off 'click', '.update-notification' .on 'click', '.update-notification', (e) -> @@ -18,7 +18,8 @@ class @NotificationsDropdown .off 'ajax:success', '.notification-form' .on 'ajax:success', '.notification-form', (e, data) -> if data.saved - new Flash('Notification settings saved', 'notice') - $(e.currentTarget).closest('.notification-dropdown').replaceWith(data.html) + $(e.currentTarget) + .closest('.notification-dropdown') + .replaceWith(data.html) else new Flash('Failed to save new settings', 'alert') diff --git a/app/assets/javascripts/project.js.coffee b/app/assets/javascripts/project.js.coffee index 54c539d5f9b..96e10dd7e8a 100644 --- a/app/assets/javascripts/project.js.coffee +++ b/app/assets/javascripts/project.js.coffee @@ -35,7 +35,6 @@ class @Project $(@).parents('.no-password-message').remove() e.preventDefault() - @projectSelectDropdown() projectSelectDropdown: -> diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 093d5e18516..a2e5522d1a3 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -101,7 +101,8 @@ .notifications-btn { - .fa-bell { + .fa-bell, + .fa-spinner { margin-right: 6px; } |