mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-04-08 09:36:45 +02:00
fix
This commit is contained in:
parent
b2db12e42f
commit
46cec340e2
@ -218,6 +218,9 @@
|
|||||||
self.root.observable.on("calibrate", function(e){
|
self.root.observable.on("calibrate", function(e){
|
||||||
calibre_size()
|
calibre_size()
|
||||||
})
|
})
|
||||||
|
/*self.root.observable.on("*", function(e){
|
||||||
|
console.log(e)
|
||||||
|
})*/
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
</afx-file-view>
|
</afx-file-view>
|
@ -4,9 +4,6 @@
|
|||||||
var self = this
|
var self = this
|
||||||
this.closable = opts.closable || false
|
this.closable = opts.closable || false
|
||||||
self.ontabselect = opts.ontabselect
|
self.ontabselect = opts.ontabselect
|
||||||
get_observable(){
|
|
||||||
return self.root.observable
|
|
||||||
}
|
|
||||||
|
|
||||||
self.root.get = function (k) {
|
self.root.get = function (k) {
|
||||||
return self.refs.list.root.get(k)
|
return self.refs.list.root.get(k)
|
||||||
|
@ -130,7 +130,6 @@ class AntOSDK extends this.OS.GUI.BaseApplication
|
|||||||
@tabarea.set "onitemclose", (e) ->
|
@tabarea.set "onitemclose", (e) ->
|
||||||
it = e.item.item
|
it = e.item.item
|
||||||
return false unless it
|
return false unless it
|
||||||
me.fileview.set "preventUpdate", true
|
|
||||||
return me.closeTab it unless it.dirty
|
return me.closeTab it unless it.dirty
|
||||||
me.openDialog "YesNoDialog", (d) ->
|
me.openDialog "YesNoDialog", (d) ->
|
||||||
return me.closeTab it if d
|
return me.closeTab it if d
|
||||||
@ -302,7 +301,6 @@ class AntOSDK extends this.OS.GUI.BaseApplication
|
|||||||
open: (file) ->
|
open: (file) ->
|
||||||
#find table
|
#find table
|
||||||
i = @findTabByFile file
|
i = @findTabByFile file
|
||||||
@fileview.set "preventUpdate", true
|
|
||||||
return @tabarea.set "selected", i if i isnt -1
|
return @tabarea.set "selected", i if i isnt -1
|
||||||
return @newtab file if file.path.toString() is "Untitled"
|
return @newtab file if file.path.toString() is "Untitled"
|
||||||
me = @
|
me = @
|
||||||
@ -391,6 +389,7 @@ class AntOSDK extends this.OS.GUI.BaseApplication
|
|||||||
#return if i is @tabarea.get "selidx"
|
#return if i is @tabarea.get "selidx"
|
||||||
file = (@tabarea.get "items")[i]
|
file = (@tabarea.get "items")[i]
|
||||||
return unless file
|
return unless file
|
||||||
|
@fileview.set "preventUpdate", true
|
||||||
@scheme.set "apptitle", file.text.toString()
|
@scheme.set "apptitle", file.text.toString()
|
||||||
#return if file is @currfile
|
#return if file is @currfile
|
||||||
if @currfile isnt file
|
if @currfile isnt file
|
||||||
|
@ -129,9 +129,8 @@ class NotePad extends this.OS.GUI.BaseApplication
|
|||||||
@open @currfile
|
@open @currfile
|
||||||
|
|
||||||
open: (file) ->
|
open: (file) ->
|
||||||
#find table
|
#find tab
|
||||||
i = @findTabByFile file
|
i = @findTabByFile file
|
||||||
@fileview.set "preventUpdate", true
|
|
||||||
return @tabarea.set "selected", i if i isnt -1
|
return @tabarea.set "selected", i if i isnt -1
|
||||||
return @newtab file if file.path.toString() is "Untitled"
|
return @newtab file if file.path.toString() is "Untitled"
|
||||||
me = @
|
me = @
|
||||||
@ -220,6 +219,7 @@ class NotePad extends this.OS.GUI.BaseApplication
|
|||||||
#return if i is @tabarea.get "selidx"
|
#return if i is @tabarea.get "selidx"
|
||||||
file = (@tabarea.get "items")[i]
|
file = (@tabarea.get "items")[i]
|
||||||
return unless file
|
return unless file
|
||||||
|
@fileview.set "preventUpdate", true
|
||||||
@scheme.set "apptitle", file.text.toString()
|
@scheme.set "apptitle", file.text.toString()
|
||||||
#return if file is @currfile
|
#return if file is @currfile
|
||||||
if @currfile isnt file
|
if @currfile isnt file
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "xsang.le@gmail.com"
|
"email": "xsang.le@gmail.com"
|
||||||
},
|
},
|
||||||
"version":"0.0.1-a",
|
"version":"0.0.2-a",
|
||||||
"category":"System",
|
"category":"System",
|
||||||
"iconclass":"fa fa-pencil-square-o",
|
"iconclass":"fa fa-pencil-square-o",
|
||||||
"mimes":[
|
"mimes":[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user