mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-07-27 03:09:45 +02:00
gui
This commit is contained in:
11
src/packages/ShowCase/Makefile
Normal file
11
src/packages/ShowCase/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
coffee_files = coffees/main.coffee
|
||||
|
||||
jsfiles =
|
||||
|
||||
cssfiles =
|
||||
|
||||
copyfiles = assets/scheme.html package.json
|
||||
|
||||
|
||||
PKG_NAME=ShowCase
|
||||
include ../pkg.mk
|
5
src/packages/ShowCase/assets/scheme.html
Normal file
5
src/packages/ShowCase/assets/scheme.html
Normal file
@ -0,0 +1,5 @@
|
||||
<afx-app-window apptitle="Preview" width="650" height="500">
|
||||
<afx-hbox>
|
||||
<afx-button data-height="30" toggle = "true" text="__(Read more)" iconclass="fa fa-camera-retro fa-lg" id="button"></afx-button>
|
||||
</afx-hbox>
|
||||
</afx-app-window>
|
36
src/packages/ShowCase/coffees/main.coffee
Normal file
36
src/packages/ShowCase/coffees/main.coffee
Normal file
@ -0,0 +1,36 @@
|
||||
Ant = this
|
||||
class ShowCase extends this.OS.GUI.BaseApplication
|
||||
constructor: (args) ->
|
||||
super "ShowCase", args
|
||||
|
||||
main:() ->
|
||||
me = @
|
||||
@announcer = new Ant.OS.API.Announcer()
|
||||
@announcer.on "evt1", (data) ->
|
||||
console.log "evt1", data
|
||||
@announcer.on "evt1", (data) ->
|
||||
console.log "evt1 fn1: ", data
|
||||
fn = (data) ->
|
||||
console.log "evt1 fn2: ", data
|
||||
@announcer.on "evt1", fn
|
||||
@announcer.on "evt2", (data) ->
|
||||
console.log "evt2", data
|
||||
@announcer.one "evt1", (data) ->
|
||||
console.log "evt1 only one", data
|
||||
@announcer.one "*", (data) ->
|
||||
console.log "evt1 only one*", data
|
||||
@announcer.on "*", fn
|
||||
|
||||
console.log me.announcer
|
||||
@on "btclick", (e) ->
|
||||
me.announcer.trigger("evt1", "Hello 1")
|
||||
me.announcer.off("*")
|
||||
me.announcer.trigger("evt2", "Hello 2")
|
||||
console.log me.announcer
|
||||
me.notify "Hello"
|
||||
tag = new Ant.OS.GUI.tags["afx-window"]()
|
||||
console.log tag
|
||||
|
||||
|
||||
ShowCase.singleton = false
|
||||
this.OS.register "ShowCase", ShowCase
|
13
src/packages/ShowCase/package.json
Normal file
13
src/packages/ShowCase/package.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"app":"ShowCase",
|
||||
"name": "ShowCase",
|
||||
"description":"AntOS 1.1.0a features showcase",
|
||||
"info":{
|
||||
"author": "Xuan Sang LE",
|
||||
"email": "xsang.le@gmail.com",
|
||||
"licences": "GPLv3"
|
||||
},
|
||||
"version":"0.0.1-a",
|
||||
"category":"Other",
|
||||
"mimes":["none"]
|
||||
}
|
Reference in New Issue
Block a user