diff options
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/notifications_dropdown.js.coffee | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/notifications_dropdown.js.coffee b/app/assets/javascripts/notifications_dropdown.js.coffee index c13010f56ec..74d2298c1fa 100644 --- a/app/assets/javascripts/notifications_dropdown.js.coffee +++ b/app/assets/javascripts/notifications_dropdown.js.coffee @@ -9,14 +9,14 @@ class @NotificationsDropdown notificationLevel = $(@).data 'notification-level' label = $(@).data 'notification-title' - form = $(this).parents('form:first') + form = $(this).parents('.notification-form:first') form.find('.js-notification-loading').toggleClass 'fa-bell fa-spin fa-spinner' form.find('#notification_setting_level').val(notificationLevel) - form.submit(); + form.submit() $(document) - .off 'ajax:success', '#notification-form' - .on 'ajax:success', '#notification-form', (e, data) -> + .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) |