summaryrefslogtreecommitdiffstats
path: root/js/keymanager.js
diff options
context:
space:
mode:
authorOndrej Zara <ondrej.zara@firma.seznam.cz>2015-06-12 13:11:35 +0200
committerOndrej Zara <ondrej.zara@firma.seznam.cz>2015-06-12 13:11:35 +0200
commit097b9e89c95e4de2c184f40a1e8ef5e05bda9ddc (patch)
tree4932604432d1a57d3c4933ed80337f388fa70f53 /js/keymanager.js
parent6fb6ba452f2bd616b6fe8d2edd0273e63b6e3f62 (diff)
downloadwwwsqldesigner-097b9e89c95e4de2c184f40a1e8ef5e05bda9ddc.zip
wwwsqldesigner-097b9e89c95e4de2c184f40a1e8ef5e05bda9ddc.tar.gz
wwwsqldesigner-097b9e89c95e4de2c184f40a1e8ef5e05bda9ddc.tar.bz2
no more OZ.Class(), dedicated pubsub, std bind
Diffstat (limited to 'js/keymanager.js')
-rw-r--r--js/keymanager.js20
1 files changed, 9 insertions, 11 deletions
diff --git a/js/keymanager.js b/js/keymanager.js
index e053a0a..5e08e2a 100644
--- a/js/keymanager.js
+++ b/js/keymanager.js
@@ -1,8 +1,6 @@
/* ----------------- key manager ---------- */
-SQL.KeyManager = OZ.Class();
-
-SQL.KeyManager.prototype.init = function(owner) {
+SQL.KeyManager = function(owner) {
this.owner = owner;
this.dom = {
container:OZ.$("keys")
@@ -44,15 +42,15 @@ SQL.KeyManager.prototype.build = function() {
this.dom.type.appendChild(o);
}
- this.purge = this.bind(this.purge);
+ this.purge = this.purge.bind(this);
- OZ.Event.add(this.dom.list, "change", this.bind(this.listchange));
- OZ.Event.add(this.dom.type, "change", this.bind(this.typechange));
- OZ.Event.add(this.dom.name, "keyup", this.bind(this.namechange));
- OZ.Event.add(this.dom.keyadd, "click", this.bind(this.add));
- OZ.Event.add(this.dom.keyremove, "click", this.bind(this.remove));
- OZ.Event.add(this.dom.left, "click", this.bind(this.left));
- OZ.Event.add(this.dom.right, "click", this.bind(this.right));
+ OZ.Event.add(this.dom.list, "change", this.listchange.bind(this));
+ OZ.Event.add(this.dom.type, "change", this.typechange.bind(this));
+ OZ.Event.add(this.dom.name, "keyup", this.namechange.bind(this));
+ OZ.Event.add(this.dom.keyadd, "click", this.add.bind(this));
+ OZ.Event.add(this.dom.keyremove, "click", this.remove.bind(this));
+ OZ.Event.add(this.dom.left, "click", this.left.bind(this));
+ OZ.Event.add(this.dom.right, "click", this.right.bind(this));
this.dom.container.parentNode.removeChild(this.dom.container);
}