diff options
author | Ondrej Zara <ondrej.zara@firma.seznam.cz> | 2015-06-12 13:11:35 +0200 |
---|---|---|
committer | Ondrej Zara <ondrej.zara@firma.seznam.cz> | 2015-06-12 13:11:35 +0200 |
commit | 097b9e89c95e4de2c184f40a1e8ef5e05bda9ddc (patch) | |
tree | 4932604432d1a57d3c4933ed80337f388fa70f53 /js/wwwsqldesigner.js | |
parent | 6fb6ba452f2bd616b6fe8d2edd0273e63b6e3f62 (diff) | |
download | wwwsqldesigner-097b9e89c95e4de2c184f40a1e8ef5e05bda9ddc.zip wwwsqldesigner-097b9e89c95e4de2c184f40a1e8ef5e05bda9ddc.tar.gz wwwsqldesigner-097b9e89c95e4de2c184f40a1e8ef5e05bda9ddc.tar.bz2 |
no more OZ.Class(), dedicated pubsub, std bind
Diffstat (limited to 'js/wwwsqldesigner.js')
-rwxr-xr-x | js/wwwsqldesigner.js | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/js/wwwsqldesigner.js b/js/wwwsqldesigner.js index d1bd0a4..c860d79 100755 --- a/js/wwwsqldesigner.js +++ b/js/wwwsqldesigner.js @@ -1,15 +1,11 @@ -/* --------------------- www sql designer ------------ */ - -SQL.Designer = OZ.Class().extend(SQL.Visual); - -SQL.Designer.prototype.init = function() { +SQL.Designer = function() { SQL.Designer = this; this.tables = []; this.relations = []; this.title = document.title; - SQL.Visual.prototype.init.apply(this); + SQL.Visual.apply(this); new SQL.Toggle(OZ.$("toggle")); this.dom.container = OZ.$("area"); @@ -34,6 +30,7 @@ SQL.Designer.prototype.init = function() { this.requestLanguage(); this.requestDB(); } +SQL.Designer.prototype = Object.create(SQL.Visual.prototype); /* update area size */ SQL.Designer.prototype.sync = function() { @@ -59,7 +56,7 @@ SQL.Designer.prototype.requestLanguage = function() { /* get locale file */ var lang = this.getOption("locale") var bp = this.getOption("staticpath"); var url = bp + "locale/"+lang+".xml"; - OZ.Request(url, this.bind(this.languageResponse), {method:"get", xml:true}); + OZ.Request(url, this.languageResponse.bind(this), {method:"get", xml:true}); } SQL.Designer.prototype.languageResponse = function(xmlDoc) { @@ -79,7 +76,7 @@ SQL.Designer.prototype.requestDB = function() { /* get datatypes file */ var db = this.getOption("db"); var bp = this.getOption("staticpath"); var url = bp + "db/"+db+"/datatypes.xml"; - OZ.Request(url, this.bind(this.dbResponse), {method:"get", xml:true}); + OZ.Request(url, this.dbResponse.bind(this), {method:"get", xml:true}); } SQL.Designer.prototype.dbResponse = function(xmlDoc) { @@ -348,7 +345,3 @@ SQL.Designer.prototype.getFKTypeFor = function(typeIndex) { } return this.fkTypeFor[typeIndex]; } - -window.onbeforeunload = function(e) { - return ""; /* some browsers will show this text, some won't. */ -} |