mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-11-08 05:58:22 +01:00
fix core api bug
This commit is contained in:
parent
ca647d31c0
commit
57971e4338
@ -21,4 +21,6 @@ _PM = self.OS.PM
|
||||
_OS = self.OS
|
||||
_courrier = self.OS.courrier
|
||||
this.onload = () ->
|
||||
($ document).on 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange', ()->
|
||||
_GUI.fullscreen = not _GUI.fullscreen
|
||||
self.OS.boot()
|
@ -36,6 +36,7 @@ class BaseModel
|
||||
evt = new _GUI.BaseEvent("exit", force)
|
||||
@onexit(evt)
|
||||
if not evt.prevent
|
||||
@observable.off "*"
|
||||
delete @.observable
|
||||
@dialog.quit() if @dialog
|
||||
_PM.kill @
|
||||
|
@ -34,7 +34,7 @@ self.OS or=
|
||||
courrier:
|
||||
observable: riot.observable()
|
||||
quota: 0
|
||||
listeners: new Object
|
||||
listeners: {}
|
||||
on: (e, f, a) ->
|
||||
_courrier.listeners[a.pid] = [] unless _courrier.listeners[a.pid]
|
||||
_courrier.listeners[a.pid].push { e: e, f: f }
|
||||
@ -111,6 +111,8 @@ self.OS or=
|
||||
console.log "Clean up system"
|
||||
_PM.killAll a, true for a, v of _PM.processes
|
||||
_courrier.observable.off("*") if _courrier.observable
|
||||
$(window).off('keydown')
|
||||
delete _courrier.observable
|
||||
($ "#wrapper").empty()
|
||||
_GUI.clearTheme()
|
||||
_courrier.observable = riot.observable()
|
||||
@ -142,6 +144,7 @@ self.OS or=
|
||||
exit: ->
|
||||
#do clean up first
|
||||
f() for n, f of _OS.cleanupHandlers
|
||||
_OS.cleanup()
|
||||
_API.handler.setting (r) ->
|
||||
_API.handler.logout()
|
||||
onexit: (n, f) ->
|
||||
|
@ -244,8 +244,6 @@ self.OS.GUI =
|
||||
.css("background-repeat", wp.repeat)
|
||||
|
||||
initDM: ->
|
||||
($ document).on 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange', ()->
|
||||
_GUI.fullscreen = not _GUI.fullscreen
|
||||
# check login first
|
||||
_API.resource "schemes/dm.html", (x) ->
|
||||
return null unless x
|
||||
@ -400,7 +398,6 @@ self.OS.GUI =
|
||||
return new _GUI.BasicDialog conf.name, conf.layout
|
||||
|
||||
login: () ->
|
||||
_OS.cleanup()
|
||||
_API.resource "schemes/login.html", (x) ->
|
||||
return null unless x
|
||||
scheme = $.parseHTML x
|
||||
|
Loading…
Reference in New Issue
Block a user