mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-12-26 04:08:21 +01:00
fix
This commit is contained in:
parent
e54a33605a
commit
d8d56ffef5
@ -10,7 +10,6 @@
|
||||
var me;
|
||||
me = this;
|
||||
this.editor = this.find("editor");
|
||||
this.stbar = this.find("statusbar");
|
||||
this.bindKey("ALT-N", function() {
|
||||
return me.newFile();
|
||||
});
|
||||
@ -20,7 +19,7 @@
|
||||
this.bindKey("CTRL-S", function() {
|
||||
return me.saveFile();
|
||||
});
|
||||
this.filehandler = null;
|
||||
this.filehandler = this.args && this.args.length > 0 ? this.args[0].asFileHandler() : null;
|
||||
$(this.editor).on('input', function(e) {
|
||||
if (me.filehandler.dirty === true) {
|
||||
return;
|
||||
@ -74,7 +73,7 @@
|
||||
return this.read();
|
||||
}
|
||||
|
||||
openFile(fi) {
|
||||
openFile() {
|
||||
var me;
|
||||
me = this;
|
||||
return this.openDialog("FileDiaLog", function(dir, fname, d) {
|
||||
|
@ -9,5 +9,5 @@
|
||||
"version":"0.0.1-a",
|
||||
"category":"Other",
|
||||
"iconclass":"fa fa-adn",
|
||||
"mimes":["none"]
|
||||
"mimes":["text/.*"]
|
||||
}
|
@ -5,11 +5,10 @@ class TinyEditor extends this.OS.GUI.BaseApplication
|
||||
main: () ->
|
||||
me = @
|
||||
@editor = @find "editor"
|
||||
@stbar = @find "statusbar"
|
||||
@bindKey "ALT-N", () -> me.newFile()
|
||||
@bindKey "ALT-O", () -> me.openFile()
|
||||
@bindKey "CTRL-S", () -> me.saveFile()
|
||||
@filehandler = null
|
||||
@filehandler = if @args and @args.length > 0 then @args[0].asFileHandler() else null
|
||||
$(@editor).on 'input', (e) ->
|
||||
return if me.filehandler.dirty is true
|
||||
me.filehandler.dirty = true
|
||||
@ -39,7 +38,7 @@ class TinyEditor extends this.OS.GUI.BaseApplication
|
||||
@filehandler = null
|
||||
@read()
|
||||
|
||||
openFile: (fi) ->
|
||||
openFile: () ->
|
||||
me = @
|
||||
@openDialog "FileDiaLog", ( dir, fname, d ) ->
|
||||
me.filehandler = "#{dir}/#{fname}".asFileHandler()
|
||||
|
@ -9,5 +9,5 @@
|
||||
"version":"0.0.1-a",
|
||||
"category":"Other",
|
||||
"iconclass":"fa fa-adn",
|
||||
"mimes":["none"]
|
||||
"mimes":["text/.*"]
|
||||
}
|
Loading…
Reference in New Issue
Block a user