summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2016-06-16 14:07:26 +0200
committerGéry Debongnie <ged@odoo.com>2016-06-17 13:32:37 +0200
commit2254abbde72862e7842614c33e261571eaebae64 (patch)
tree2169616fccbc5037fc1c64f49941935781a95300 /addons/web/static/src/js
parentd56b35e26e4b578c5f6f434d336edd006d321860 (diff)
[REF] web: move Bus class to web.Bus
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/framework/bus.js16
-rw-r--r--addons/web/static/src/js/framework/core.js10
2 files changed, 17 insertions, 9 deletions
diff --git a/addons/web/static/src/js/framework/bus.js b/addons/web/static/src/js/framework/bus.js
new file mode 100644
index 00000000000..bf33c1fe01e
--- /dev/null
+++ b/addons/web/static/src/js/framework/bus.js
@@ -0,0 +1,16 @@
+odoo.define('web.Bus', function (require) {
+"use strict";
+
+var Class = require('web.Class');
+var mixins = require('web.mixins');
+
+/**
+ * Event Bus used to bind events scoped in the current instance
+ */
+return Class.extend(mixins.EventDispatcherMixin, {
+ init: function() {
+ mixins.EventDispatcherMixin.init.call(this, parent);
+ },
+});
+
+});
diff --git a/addons/web/static/src/js/framework/core.js b/addons/web/static/src/js/framework/core.js
index 29b461cbe8d..02a06408d9d 100644
--- a/addons/web/static/src/js/framework/core.js
+++ b/addons/web/static/src/js/framework/core.js
@@ -1,6 +1,7 @@
odoo.define('web.core', function (require) {
"use strict";
+var Bus = require('web.Bus');
var Class = require('web.Class');
var mixins = require('web.mixins');
var Registry = require('web.Registry');
@@ -13,15 +14,6 @@ var debug = $.deparam($.param.querystring()).debug !== undefined;
var _t = translation._t;
var _lt = translation._lt;
-/**
- * Event Bus used to bind events scoped in the current instance
- */
-var Bus = Class.extend(mixins.EventDispatcherMixin, {
- init: function() {
- mixins.EventDispatcherMixin.init.call(this, parent);
- },
-});
-
var bus = new Bus ();
_.each('click,dblclick,keydown,keypress,keyup'.split(','), function(evtype) {