add more tagesr

This commit is contained in:
lxsang
2020-02-28 18:35:20 +01:00
parent 2a990491d9
commit 0de9f88dcf
12 changed files with 303 additions and 41 deletions

View File

@ -43,14 +43,14 @@ class ShowCase extends this.OS.GUI.BaseApplication
<afx-resizer data-width="5" />
<afx-vbox data-width="grow">
<afx-hbox min-height="50">
<afx-label text="__(This is the label)"
<afx-button text="__(This is the label)"
data-id="bttest"
iconclass="fa fa-camera-retro fa-lg"
icon="os://packages/DummyApp/icon.png"/>
</afx-hbox>
<afx-resizer data-height="5" />
<afx-hbox>
<div>box center 3</div>
<div>box center 4</div>
<afx-list-view data-id="list" />
</afx-hbox>
<afx-hbox data-height="150">
<div>box center 3</div>
@ -66,6 +66,9 @@ class ShowCase extends this.OS.GUI.BaseApplication
"""
($ "#desktop").append scheme[0]
obj = scheme[0].uify()
bt = $ "[data-id='bttest']", scheme[0]
bt[0].set "onbtclick", (e) ->
console.log "btclicked"
obj.set "resizable", true
obj.set "minimizable", false
obj.observable.on "exit", () ->
@ -73,5 +76,20 @@ class ShowCase extends this.OS.GUI.BaseApplication
obj.observable.off "*"
$(obj).remove()
obj.observable.on "btclick", (e) ->
console.log "button clicked"
list = $ "[data-id='list']", scheme[0]
list[0].set "data", [
{ text: "some thing with avery long text" },
{ text: "some thing 1" },
{ text: "some thing 2" },
{ text: "some thing 3" },
{ text: "some thing 4" },
{ text: "some thing 5" }
]
ShowCase.singleton = true
this.OS.register "ShowCase", ShowCase