summaryrefslogtreecommitdiff
path: root/addons/web/static/lib
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2012-02-29 12:02:28 +0100
committerniv-openerp <nicolas.vanhoren@openerp.com>2012-02-29 12:02:28 +0100
commitff248a97cf89155b3c9bfd3a2f9dedb3229f9eb6 (patch)
tree94321e28647ba029ecad35381c04ffbf902572a8 /addons/web/static/lib
parent6dcc45a0bb50435eaf2c64e0fbc8eca4b99bedf3 (diff)
[imp] modified on and off
bzr revid: nicolas.vanhoren@openerp.com-20120229110228-15fi6jyj8z51rtmr
Diffstat (limited to 'addons/web/static/lib')
-rw-r--r--addons/web/static/lib/novajs/src/nova.js4
-rw-r--r--addons/web/static/lib/novajs/test/test.js8
2 files changed, 6 insertions, 6 deletions
diff --git a/addons/web/static/lib/novajs/src/nova.js b/addons/web/static/lib/novajs/src/nova.js
index c90a1ca2800..c03c23067a3 100644
--- a/addons/web/static/lib/novajs/src/nova.js
+++ b/addons/web/static/lib/novajs/src/nova.js
@@ -267,7 +267,7 @@ nova = (function() {
this.__edispatcherEvents = new lib.internal.Events();
this.__edispatcherRegisteredEvents = [];
},
- bind: function(events, dest, func) {
+ on: function(events, dest, func) {
var self = this;
events = events.split(/\s+/);
_.each(events, function(eventName) {
@@ -278,7 +278,7 @@ nova = (function() {
});
return this;
},
- unbind: function(events, dest, func) {
+ off: function(events, dest, func) {
var self = this;
events = events.split(/\s+/);
_.each(events, function(eventName) {
diff --git a/addons/web/static/lib/novajs/test/test.js b/addons/web/static/lib/novajs/test/test.js
index 363f2794fb9..924d085c9ac 100644
--- a/addons/web/static/lib/novajs/test/test.js
+++ b/addons/web/static/lib/novajs/test/test.js
@@ -65,16 +65,16 @@ test("base", function() {
var y = new Claz();
var tmp = 0;
var fct = function() {tmp = 1;};
- x.bind("test", y, fct);
+ x.on("test", y, fct);
equal(tmp, 0);
x.trigger("test");
equal(tmp, 1);
tmp = 0;
- x.unbind("test", y, fct);
+ x.off("test", y, fct);
x.trigger("test");
equal(tmp, 0);
tmp = 0;
- x.bind("test", y, fct);
+ x.on("test", y, fct);
y.destroy();
x.trigger("test");
equal(tmp, 0);
@@ -89,7 +89,7 @@ test("base", function() {
x.set({test: 1});
equal(x.get("test"), 1);
var tmp = 0;
- x.bind("change:test", y, function(model, options) {
+ x.on("change:test", y, function(model, options) {
tmp = 1;
equal(options.oldValue, 1);
equal(options.newValue, 2);