Fixed bug with clicking custom again not opening modal
This commit is contained in:
parent
fd15e81444
commit
83446ce7be
2 changed files with 4 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue