js modularized

This commit is contained in:
Ondrej Zara
2015-06-12 09:30:51 +02:00
parent c5a07ea2b0
commit b3bf2bd8ec
16 changed files with 2585 additions and 2584 deletions
+42
View File
@@ -0,0 +1,42 @@
/* -------------------- base visual element -------------------- */
SQL.Visual = OZ.Class(); /* abstract parent */
SQL.Visual.prototype.init = function() {
this._init();
this._build();
}
SQL.Visual.prototype._init = function() {
this.dom = {
container: null,
title: null
};
this.data = {
title:""
}
}
SQL.Visual.prototype._build = function() {}
SQL.Visual.prototype.toXML = function() {}
SQL.Visual.prototype.fromXML = function(node) {}
SQL.Visual.prototype.destroy = function() { /* "destructor" */
var p = this.dom.container.parentNode;
if (p && p.nodeType == 1) {
p.removeChild(this.dom.container);
}
}
SQL.Visual.prototype.setTitle = function(text) {
if (!text) { return; }
this.data.title = text;
this.dom.title.innerHTML = text;
}
SQL.Visual.prototype.getTitle = function() {
return this.data.title;
}
SQL.Visual.prototype.redraw = function() {}