no more OZ.Class(), dedicated pubsub, std bind

This commit is contained in:
Ondrej Zara
2015-06-12 13:11:35 +02:00
parent 6fb6ba452f
commit 097b9e89c9
16 changed files with 159 additions and 171 deletions
+5 -7
View File
@@ -1,8 +1,6 @@
/* --------------------- window ------------ */
SQL.Window = OZ.Class();
SQL.Window.prototype.init = function(owner) {
SQL.Window = function(owner) {
this.owner = owner;
this.dom = {
container:OZ.$("window"),
@@ -16,11 +14,11 @@ SQL.Window.prototype.init = function(owner) {
this.dom.ok.value = _("windowok");
this.dom.cancel.value = _("windowcancel");
this.dom.throbber.alt = this.dom.throbber.title = _("throbber");
OZ.Event.add(this.dom.ok, "click", this.bind(this.ok));
OZ.Event.add(this.dom.cancel, "click", this.bind(this.close));
OZ.Event.add(document, "keydown", this.bind(this.key));
OZ.Event.add(this.dom.ok, "click", this.ok.bind(this));
OZ.Event.add(this.dom.cancel, "click", this.close.bind(this));
OZ.Event.add(document, "keydown", this.key.bind(this));
this.sync = this.bind(this.sync);
this.sync = this.sync.bind(this);
OZ.Event.add(window, "scroll", this.sync);
OZ.Event.add(window, "resize", this.sync);