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)