mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-11-08 05:58:22 +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 "selected", 0 unless location.get "selected"
|
||||
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) ->
|
||||
f = fileview.get "selectedFile"
|
||||
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
|
||||
d = f.path
|
||||
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"
|
||||
#me.handler f, ($ filename).val() if me.handler and ((f.type is sel) or (sel is "*"))
|
||||
me.quit()
|
||||
|
@ -130,8 +130,8 @@ class Blogger extends this.OS.GUI.BaseApplication
|
||||
name: "image",
|
||||
className: "fa fa-file-image-o",
|
||||
action: (e) ->
|
||||
me.openDialog "FileDiaLog", (d, n) ->
|
||||
"#{d}/#{n}".asFileHandler().publish (r) ->
|
||||
me.openDialog "FileDiaLog", (d, n, p) ->
|
||||
p.asFileHandler().publish (r) ->
|
||||
return me.error "Cannot export file for embeding to text" if r.error
|
||||
doc = me.editor.codemirror.getDoc()
|
||||
doc.replaceSelection "![](#{me._api.handler.shared}/#{r.result})"
|
||||
|
Loading…
Reference in New Issue
Block a user