BigW Consortium Gitlab

Commit 83446ce7 by Phil Hughes

Fixed bug with clicking custom again not opening modal

parent fd15e814
......@@ -4,6 +4,9 @@ class @NotificationsDropdown
.off 'click', '.update-notification'
.on 'click', '.update-notification', (e) ->
e.preventDefault()
return if $(this).is('.is-active') and $(this).data('notification-level') is 'custom'
notificationLevel = $(@).data 'notification-level'
label = $(@).data 'notification-title'
form = $(this).parents('form:first')
......
......@@ -8,6 +8,6 @@
%li.divider
%li
%a.update-notification{ href: "#", role: "button", data: { toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), notification_level: "custom", notification_title: "Custom" } }
%a.update-notification{ href: "#", role: "button", class: ("is-active" if notification_setting.level == "custom"), data: { toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), notification_level: "custom", notification_title: "Custom" } }
%strong.dropdown-menu-inner-title Custom
%span.dropdown-menu-inner-content= notification_description("custom")
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