mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-07-19 23:40:00 +02:00
add extension to codepad
This commit is contained in:
@ -117,9 +117,9 @@ class BaseApplication extends this.OS.GUI.BaseModel
|
||||
# implement by subclasses
|
||||
# to add menu to application
|
||||
[]
|
||||
open:->
|
||||
open: () ->
|
||||
#implement by subclasses
|
||||
data:->
|
||||
data: ->
|
||||
#implement by subclasses
|
||||
# to return app data
|
||||
|
||||
|
@ -31,7 +31,9 @@ class SubWindow extends this.OS.GUI.BaseModel
|
||||
init: () ->
|
||||
main: () ->
|
||||
meta: () ->
|
||||
@parent.meta()
|
||||
return @parent.meta() if @parent and @parent.meta
|
||||
{}
|
||||
|
||||
show: () ->
|
||||
@trigger 'focus'
|
||||
($ @scheme).css "z-index", window._zindex + 2
|
||||
|
@ -98,7 +98,16 @@ class BaseModel
|
||||
mt = @meta()
|
||||
icon = undefined
|
||||
icon = "#{mt.path}/#{mt.icon}" if mt.icon
|
||||
Ant.OS.announcer.trigger t, { id: @pid, name: @name, data: { m: m, icon: icon, iconclass: mt.iconclass }, error: e }
|
||||
Ant.OS.announcer.trigger t, {
|
||||
id: @pid,
|
||||
name: @name,
|
||||
data: {
|
||||
m: m,
|
||||
icon: icon,
|
||||
iconclass: mt.iconclass,
|
||||
e: e
|
||||
}
|
||||
}
|
||||
|
||||
notify: (m) ->
|
||||
@publish "notification", m
|
||||
@ -115,7 +124,7 @@ class BaseModel
|
||||
throwe: () ->
|
||||
@_api.throwe @name
|
||||
|
||||
update:->
|
||||
update: () ->
|
||||
@scheme.update() if @scheme
|
||||
|
||||
find: (id) -> ($ "[data-id='#{id}']", @scheme)[0] if @scheme
|
||||
|
@ -307,16 +307,17 @@ Ant.OS.API =
|
||||
})
|
||||
.appendTo 'head'
|
||||
Ant.OS.API.shared[l] = true
|
||||
console.log "loaded css:", l
|
||||
console.log "Loaded :", l
|
||||
Ant.OS.announcer.trigger "sharedlibraryloaded", l
|
||||
resolve undefined
|
||||
.catch (e) -> reject e
|
||||
when "js"
|
||||
Ant.OS.API.script libfp.getlink()
|
||||
.then () ->
|
||||
.then (data) ->
|
||||
Ant.OS.API.shared[l] = true
|
||||
console.log "loaded javascript:", l
|
||||
console.log "Loaded :", l
|
||||
Ant.OS.announcer.trigger "sharedlibraryloaded", l
|
||||
resolve(l)
|
||||
resolve(data)
|
||||
.catch (e) ->
|
||||
reject e
|
||||
else
|
||||
|
@ -34,6 +34,9 @@ Ant.OS or=
|
||||
register: (name, x) ->
|
||||
if x.type is 3 then Ant.OS.GUI.subwindows[name] = x else Ant.OS.APP[name] = x
|
||||
|
||||
# import proprety from an App
|
||||
|
||||
|
||||
PM:
|
||||
pidalloc: 0
|
||||
processes: {}
|
||||
|
@ -51,6 +51,10 @@ class BaseFileHandle
|
||||
@basename = @genealogy[@genealogy.length - 1] unless @isRoot()
|
||||
@ext = @basename.split( "." ).pop() unless @basename.lastIndexOf(".") is 0 or @basename.indexOf( "." ) is -1
|
||||
|
||||
setCache: (v) ->
|
||||
@cache = v
|
||||
@
|
||||
|
||||
asFileHandle: () -> @
|
||||
|
||||
isRoot: () -> (not @genealogy) or (@genealogy.size is 0)
|
||||
|
Reference in New Issue
Block a user