Commit 83446ce7 authored by Phil Hughes's avatar Phil Hughes

Fixed bug with clicking custom again not opening modal

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