fix stuff

This commit is contained in:
Xuan Sang LE 2018-03-21 19:05:08 +01:00
parent 278ee54b2e
commit 3922f3764d
4 changed files with 7 additions and 4 deletions

View File

@ -323,7 +323,7 @@ class FileDiaLog extends BaseDialog
return me.notify __("Only {0} could be selected", me.data.mimes.join(",")) unless m
d = f.path
d = f.path.asFileHandler().parent() if f.type is "file"
me.handler d, ($ filename).val(), f.path if me.handler
me.handler d, ($ filename).val(), f.path, f if me.handler
#sel = if me.data and me.data.selection then me.data.selection else "file"
#me.handler f, ($ filename).val() if me.handler and ((f.type is sel) or (sel is "*"))
me.quit()

View File

@ -41,12 +41,13 @@
{
if(!self.enable) return
opts.swon = !self.swon
self.swon = opts.swon
var data = {
id: self.rid,
data: opts.swon
}
if(self.onchange)
self.onchange(data)
if(opts.onchange)
opts.onchange(data)
if(self.root.observable)
self.root.observable.trigger("switch", data)

View File

@ -66,6 +66,8 @@ class DummyApp extends this.OS.GUI.BaseApplication
}
]
}
(@find "sw").set "onchange", (e) ->
console.log e, ((self.find "sw").get "swon")
tree.set "data",tdata
list = @find "mylist"

View File

@ -10,7 +10,7 @@
<afx-resizer data-width = "5" ></afx-resizer>
<afx-vbox>
<afx-button data-height="30" text="__(Read more)" iconclass="fa fa-camera-retro fa-lg" id="button"></afx-button>
<afx-switch enable= true data-height="30"></afx-switch>
<afx-switch data-id="sw" enable= true data-height="30"></afx-switch>
<afx-calendar-view></afx-calendar-view>
<afx-resizer data-height = "5" ></afx-resizer>
<afx-color-picker></afx-color-picker>