Fixed switching if confirm returns false.
This commit is contained in:
parent
64492fb4fb
commit
32bb10bcf3
1 changed files with 3 additions and 1 deletions
|
@ -38,7 +38,9 @@ class Index extends App.ControllerContent
|
||||||
|
|
||||||
setMode: (e) =>
|
setMode: (e) =>
|
||||||
value = @modeSetting.prop('checked')
|
value = @modeSetting.prop('checked')
|
||||||
return if value && !confirm('Sure?')
|
if value && !confirm('Sure?')
|
||||||
|
@modeSetting.prop('checked', false)
|
||||||
|
return value
|
||||||
App.Setting.set('maintenance_mode', value)
|
App.Setting.set('maintenance_mode', value)
|
||||||
App.WebSocket.send(
|
App.WebSocket.send(
|
||||||
event:'maintenance'
|
event:'maintenance'
|
||||||
|
|
Loading…
Reference in a new issue