mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-02-22 18:02:47 +01:00
shared file enable
This commit is contained in:
parent
e50cdc3620
commit
d26e8d281c
@ -282,7 +282,8 @@ class FileDiaLog extends BaseDialog
|
|||||||
location.set "items", ( i for i in @systemsetting.VFS.mountpoints when i.type isnt "app" )
|
location.set "items", ( i for i in @systemsetting.VFS.mountpoints when i.type isnt "app" )
|
||||||
location.set "selected", 0 unless location.get "selected"
|
location.set "selected", 0 unless location.get "selected"
|
||||||
fileview.set "onfileselect", (f) ->
|
fileview.set "onfileselect", (f) ->
|
||||||
($ filename).val f.filename if f.type is "file"
|
|
||||||
|
($ filename).val f.filename if f.type is "file"
|
||||||
(@find "bt-ok").set "onbtclick", (e) ->
|
(@find "bt-ok").set "onbtclick", (e) ->
|
||||||
f = fileview.get "selectedFile"
|
f = fileview.get "selectedFile"
|
||||||
return me.notify "Please select a file" unless f
|
return me.notify "Please select a file" unless f
|
||||||
@ -296,7 +297,7 @@ class FileDiaLog extends BaseDialog
|
|||||||
return me.notify "Only #{me.data.mimes.join(",")} could be selected" unless m
|
return me.notify "Only #{me.data.mimes.join(",")} could be selected" unless m
|
||||||
d = f.path
|
d = f.path
|
||||||
d = f.path.asFileHandler().parent() if f.type is "file"
|
d = f.path.asFileHandler().parent() if f.type is "file"
|
||||||
me.handler d, ($ filename).val() if me.handler
|
me.handler d, ($ filename).val(), f.path if me.handler
|
||||||
#sel = if me.data and me.data.selection then me.data.selection else "file"
|
#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.handler f, ($ filename).val() if me.handler and ((f.type is sel) or (sel is "*"))
|
||||||
me.quit()
|
me.quit()
|
||||||
|
@ -130,8 +130,8 @@ class Blogger extends this.OS.GUI.BaseApplication
|
|||||||
name: "image",
|
name: "image",
|
||||||
className: "fa fa-file-image-o",
|
className: "fa fa-file-image-o",
|
||||||
action: (e) ->
|
action: (e) ->
|
||||||
me.openDialog "FileDiaLog", (d, n) ->
|
me.openDialog "FileDiaLog", (d, n, p) ->
|
||||||
"#{d}/#{n}".asFileHandler().publish (r) ->
|
p.asFileHandler().publish (r) ->
|
||||||
return me.error "Cannot export file for embeding to text" if r.error
|
return me.error "Cannot export file for embeding to text" if r.error
|
||||||
doc = me.editor.codemirror.getDoc()
|
doc = me.editor.codemirror.getDoc()
|
||||||
doc.replaceSelection ""
|
doc.replaceSelection ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user