mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-27 17:58:22 +01:00
fix gui
This commit is contained in:
parent
c63d2b45f8
commit
077b20e013
@ -126,7 +126,6 @@ self.OS.GUI =
|
||||
#ok app
|
||||
, "script"
|
||||
launch: (app, args) ->
|
||||
console.log "launching " + app
|
||||
if not _OS.APP[app]
|
||||
# first load it
|
||||
_GUI.loadApp app,
|
||||
@ -184,6 +183,19 @@ self.OS.GUI =
|
||||
|
||||
initDM: ->
|
||||
# check login first
|
||||
_API.resource "schemes/dm.html", (x) ->
|
||||
return null unless x
|
||||
scheme = $.parseHTML x
|
||||
($ "#wrapper").append scheme
|
||||
|
||||
# system menu and dock
|
||||
riot.mount ($ "#syspanel", $ "#wrapper")
|
||||
riot.mount ($ "#sysdock", $ "#wrapper"), { items: [] }
|
||||
|
||||
# context menu
|
||||
riot.mount ($ "#contextmenu")
|
||||
($ "#workspace").contextmenu (e) -> _GUI.bindContextMenu e
|
||||
|
||||
($ window).bind 'keydown', (event) ->
|
||||
app = ($ "#sysdock")[0].get "selectedApp"
|
||||
return true unless app
|
||||
@ -201,20 +213,6 @@ self.OS.GUI =
|
||||
return unless fnk
|
||||
r = app.shortcut fnk, c
|
||||
event.preventDefault() if not r
|
||||
|
||||
_API.resource "schemes/dm.html", (x) ->
|
||||
return null unless x
|
||||
scheme = $.parseHTML x
|
||||
($ "#wrapper").append scheme
|
||||
|
||||
# system menu and dock
|
||||
riot.mount ($ "#syspanel", $ "#wrapper")
|
||||
riot.mount ($ "#sysdock", $ "#wrapper"), { items: [] }
|
||||
|
||||
# context menu
|
||||
riot.mount ($ "#contextmenu")
|
||||
($ "#workspace").contextmenu (e) -> _GUI.bindContextMenu e
|
||||
|
||||
# desktop default file manager
|
||||
desktop = $ "#desktop"
|
||||
fp = _OS.setting.desktop.path.asFileHandler()
|
||||
@ -262,7 +260,7 @@ self.OS.GUI =
|
||||
return unless e.target is desktop[0]
|
||||
desktop[0].set "selected", -1
|
||||
($ "#sysdock").get(0).set "selectedApp", null
|
||||
console.log "desktop clicked"
|
||||
#console.log "desktop clicked"
|
||||
|
||||
desktop[0].contextmenuHandler = (e, m) ->
|
||||
desktop[0].set "selected", -1 if e.target is desktop[0]
|
||||
|
Loading…
Reference in New Issue
Block a user