Fix ban.js throwing errors
This commit is contained in:
parent
7d2f1b1594
commit
580e645403
|
@ -1,5 +1,7 @@
|
||||||
$(document).on "DOMContentLoaded", ->
|
load = ->
|
||||||
parent = $ "#ban-control-super"
|
parent = $ "#ban-control-super"
|
||||||
|
return unless parent.length > 0
|
||||||
|
|
||||||
parent.find('#_ban').on "change", (event) ->
|
parent.find('#_ban').on "change", (event) ->
|
||||||
$t = $ this
|
$t = $ this
|
||||||
if $t.is(":checked")
|
if $t.is(":checked")
|
||||||
|
@ -56,3 +58,9 @@ $(document).on "DOMContentLoaded", ->
|
||||||
console.log jqxhr, status, error
|
console.log jqxhr, status, error
|
||||||
showNotification "An error occurred, a developer should check the console for details", false
|
showNotification "An error occurred, a developer should check the console for details", false
|
||||||
complete: (jqxhr, status) ->
|
complete: (jqxhr, status) ->
|
||||||
|
|
||||||
|
$(document).on "DOMContentLoaded", ->
|
||||||
|
load()
|
||||||
|
|
||||||
|
$(document).on "page:load", ->
|
||||||
|
load()
|
||||||
|
|
Loading…
Reference in New Issue