summaryrefslogtreecommitdiffstats
path: root/js/window.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/window.js')
-rw-r--r--js/window.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/js/window.js b/js/window.js
index fd25bd6..c3cceae 100644
--- a/js/window.js
+++ b/js/window.js
@@ -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);