Commit a4d4a7e6 authored by Phil Hughes's avatar Phil Hughes

Fixed issue with notification dropdownn not updating active

Changes bell icon to spinner to show the action is happening
Removed the flash message

Closes #18480
parent a8957458
class @NotificationsDropdown class @NotificationsDropdown
$ -> constructor: ->
$(document) $(document)
.off 'click', '.update-notification' .off 'click', '.update-notification'
.on 'click', '.update-notification', (e) -> .on 'click', '.update-notification', (e) ->
...@@ -18,7 +18,8 @@ class @NotificationsDropdown ...@@ -18,7 +18,8 @@ class @NotificationsDropdown
.off 'ajax:success', '.notification-form' .off 'ajax:success', '.notification-form'
.on 'ajax:success', '.notification-form', (e, data) -> .on 'ajax:success', '.notification-form', (e, data) ->
if data.saved if data.saved
new Flash('Notification settings saved', 'notice') $(e.currentTarget)
$(e.currentTarget).closest('.notification-dropdown').replaceWith(data.html) .closest('.notification-dropdown')
.replaceWith(data.html)
else else
new Flash('Failed to save new settings', 'alert') new Flash('Failed to save new settings', 'alert')
...@@ -35,7 +35,6 @@ class @Project ...@@ -35,7 +35,6 @@ class @Project
$(@).parents('.no-password-message').remove() $(@).parents('.no-password-message').remove()
e.preventDefault() e.preventDefault()
@projectSelectDropdown() @projectSelectDropdown()
projectSelectDropdown: -> projectSelectDropdown: ->
......
...@@ -101,7 +101,8 @@ ...@@ -101,7 +101,8 @@
.notifications-btn { .notifications-btn {
.fa-bell { .fa-bell,
.fa-spinner {
margin-right: 6px; margin-right: 6px;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment