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
This commit is contained in:
Phil Hughes
2016-06-21 08:35:11 +01:00
parent a8957458f7
commit a4d4a7e635
3 changed files with 6 additions and 5 deletions
@@ -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')
-1
View File
@@ -35,7 +35,6 @@ class @Project
$(@).parents('.no-password-message').remove()
e.preventDefault()
@projectSelectDropdown()
projectSelectDropdown: ->
+2 -1
View File
@@ -101,7 +101,8 @@
.notifications-btn {
.fa-bell {
.fa-bell,
.fa-spinner {
margin-right: 6px;
}