color picker + fileview

This commit is contained in:
Xuan Sang LE
2017-08-25 00:18:35 +02:00
parent 8f9dd68213
commit 2284f50523
15 changed files with 252 additions and 12 deletions

View File

@ -6,7 +6,7 @@ class DummyApp extends this.OS.GUI.BaseApplication
self = @
@on "btclick", (e)->
#_GUI.pushService "Budgy"
self.openDialog "CalendarDialog", (d) -> console.log d
self.openDialog "ColorPickerDialog", (d) -> console.log d
@on "resize", (w,h)->
console.log "#{self.name}: resize"
#@on "listselect", (i)->

View File

@ -1,12 +1,12 @@
<afx-app-window apptitle="Preview" width="600" height="400">
<afx-app-window apptitle="Preview" width="650" height="500">
<afx-vbox>
<afx-tree-view data-id="mytree"> </afx-tree-view>
<afx-hbox>
<afx-button data-height="50" text="Read more" iconclass="fa fa-camera-retro fa-lg" id="button">
<afx-button data-height="40" text="Read more" iconclass="fa fa-camera-retro fa-lg" id="button">
</afx-button>
<afx-calendar-view></afx-calendar-view>
<afx-list-view data-id = "mylist" dropdown = "true" width="200" data-height = "50"></afx-list-view>
<afx-color-picker></afx-color-picker>
<afx-list-view data-id = "mylist" dropdown = "true" width="200" data-height = "40"></afx-list-view>
</afx-hbox>
</afx-vbox>
</afx-app-window>

View File

@ -0,0 +1,33 @@
coffee_files = main.coffee
jsfiles =
cssfiles = main.css
copyfiles = scheme.html package.json
BLUE=\033[1;34m
NC=\033[0m
main: title clean js css copy
title:
@echo "$(BLUE)======= Package Files =======$(NC)"
coffee:
- mkdir build
for f in $(coffee_files); do (coffee -cs < $$f >build/"$$f.js");done
for f in build/*.coffee.js; do (cat "$${f}"; echo) >> build/main.js; done
- rm build/*.coffee.js
js: coffee
for f in $(jsfiles); do (cat "$${f}"; echo) >> build/main.js; done
css:
for f in $(cssfiles); do (cat "$${f}"; echo) >> build/main.css; done
copy:
cp -rf $(copyfiles) build/
clean:
- rm -rf build/*

View File

@ -0,0 +1,17 @@
_GUI = this.OS.GUI
class Files extends this.OS.GUI.BaseApplication
constructor: () ->
super "Files"
main: () ->
me = @
@scheme.set "apptitle", "Files manager"
@view = @find "fileview"
@scheme.contextmenuHandler = (e, m) ->
mdata = [ { text: " Child 1" }, { text: "child2", child: [{text: "sub child", child:[{text:"sub sub child"}] }]}]
m.set "items", mdata
m.show(e)
samples: () ->
this.OS.register "Files",Files

View File

View File

@ -0,0 +1,12 @@
{
"app":"Files",
"name":"Files manager",
"description":"System files manager",
"author":{
"name": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"category":"System",
"iconclass":"fa fa-archive",
"mimes":["*"]
}

View File

@ -0,0 +1,5 @@
<afx-app-window apptitle="Preview" width="600" height="400">
<afx-vbox>
<afx-file-view data-id = "fileview"></afx-file-view>
</afx-vbox>
</afx-app-window>