minor fix

This commit is contained in:
Xuan Sang LE 2018-01-28 17:55:21 +01:00
parent 60bae901a0
commit bd515642cd
3 changed files with 6 additions and 4 deletions

View File

@ -29,7 +29,7 @@ class BasicFileHandler
setPath: (p) -> setPath: (p) ->
@ready = false @ready = false
return unless p return unless p
@path = p @path = p.toString()
list = @path.split ":///" list = @path.split ":///"
@protocol = list[0] @protocol = list[0]
return unless list.length > 1 return unless list.length > 1

View File

@ -27,7 +27,7 @@ class PushNotification extends this.OS.GUI.BaseService
@nzone = @find "notifyzone" @nzone = @find "notifyzone"
@fzone = @find "feedzone" @fzone = @find "feedzone"
(@find "btclear").set "onbtclick", (e) -> me.mlist.set "items", [] (@find "btclear").set "onbtclick", (e) -> me.mlist.set "items", []
@subscribe "fail", (e) -> console.log e #@subscribe "fail", (e) -> console.log e
@subscribe "notification", (o) -> me.pushout 'INFO', o @subscribe "notification", (o) -> me.pushout 'INFO', o
@subscribe "fail", (o) -> me.pushout 'FAIL', o @subscribe "fail", (o) -> me.pushout 'FAIL', o
@subscribe "error", (o) -> me.pushout 'ERROR', o @subscribe "error", (o) -> me.pushout 'ERROR', o

View File

@ -22,7 +22,8 @@ class Files extends this.OS.GUI.BaseApplication
#console.log e #console.log e
me._gui.openWith e me._gui.openWith e
@favo.set "onlistselect", (e) -> me.chdir e.data.path @favo.set "onlistselect", (e) ->
me.chdir e.data.path
($ @find "btback").click () -> ($ @find "btback").click () ->
return if me.currdir.isRoot() return if me.currdir.isRoot()
@ -60,12 +61,13 @@ class Files extends this.OS.GUI.BaseApplication
@toggleSidebar @setting.sidebar @toggleSidebar @setting.sidebar
@toggleNav @setting.nav @toggleNav @setting.nav
chdir: (p, push) -> chdir: (p) ->
me = @ me = @
dir = if p then p.asFileHandler() else me.currdir dir = if p then p.asFileHandler() else me.currdir
dir.read (d) -> dir.read (d) ->
if(d.error) if(d.error)
return me.error "Resource not found #{p}" return me.error "Resource not found #{p}"
console.log "error"
me.currdir = dir me.currdir = dir
if not dir.isRoot() if not dir.isRoot()
p = dir.parent().asFileHandler() p = dir.parent().asFileHandler()