Fixed switching if confirm returns false.

This commit is contained in:
Martin Edenhofer 2016-05-30 09:54:51 +02:00
parent 64492fb4fb
commit 32bb10bcf3

View file

@ -38,7 +38,9 @@ class Index extends App.ControllerContent
setMode: (e) =>
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.WebSocket.send(
event:'maintenance'