add SDK application

This commit is contained in:
Xuan Sang LE
2018-03-19 00:36:55 +01:00
parent b4428d0188
commit 129633844f
13 changed files with 598 additions and 6 deletions

View File

@ -47,6 +47,8 @@ class BaseApplication extends this.OS.GUI.BaseModel
switch d.e.item.data.dataid
when "#{me.name}-about" then me.openDialog "AboutDialog", ()->
when "#{me.name}-exit" then me.trigger "exit"
@loadScheme()
loadScheme: () ->
#now load the scheme
path = "#{@meta().path}/scheme.html"
@.render path

View File

@ -37,6 +37,7 @@ self.OS.GUI =
]
htmlToScheme: (html, app, parent) ->
scheme = $.parseHTML html
$(app.scheme).remove() if app.scheme
($ parent).append scheme
riot.mount ($ scheme), { observable: app.observable }
app.scheme = scheme[0]

View File

@ -62,8 +62,7 @@
}
else
{
$(this)
.css("flex-grow","1")
$(this).css("flex-grow","1")
auto_width.push(this)
}
})

View File

@ -9,6 +9,7 @@
//self.parent = $(self.root).parent().parent()
var tagname = $(self.parent.root).prop("tagName")
self.resizable = $(self.root).prev().length == 1 ? $(self.root).prev()[0]: undefined
//self.nextel = $(self.root).next().length == 1 ? $(self.root).next()[0]: undefined
if(tagname == "AFX-HBOX")
{
self.dir = "hz"
@ -32,7 +33,8 @@
//$(self.root).css("cursor", "normal")
self.dir = "none"
}
if(!self.minsize)
self.minsize = 10
enable_dragging()
})

View File

@ -64,8 +64,7 @@
}
else
{
$(this)
.css("flex-grow","1")
$(this).css("flex-grow","1")
auto_height.push(this)
}
})