summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/abstract_web_client.js
diff options
context:
space:
mode:
authorMartin Geubelle <mge@odoo.com>2016-08-24 15:16:45 +0200
committerGéry Debongnie <ged@odoo.com>2016-09-28 16:55:51 +0200
commitb2aafa23b822e99b4c252cd6a3af0e4e1c246ba5 (patch)
tree3f413906fa9cfdb1695c66c33648ab58656932cc /addons/web/static/src/js/abstract_web_client.js
parent037b7063e27164adf9ff680c34f8f9baa3baaf65 (diff)
[IMP] web: trigger event when changing action
This comportement was added in the DebugManager to trigger an event. As this event could be useful in other situations (e.g. studio), we trigger the event directly in the ActionManager. By default, the WebClient does not use this event but an handler is added to be overwritten. This handler is overwritten in some widgets (DebugManager, Studio, etc.) that requires the Systray items instances so we add them in ´widgets´ in the Systray Menu. As the module dashboard uses multiple ActionManager, the event bubbling should be avoided in this case.
Diffstat (limited to 'addons/web/static/src/js/abstract_web_client.js')
-rw-r--r--addons/web/static/src/js/abstract_web_client.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/web/static/src/js/abstract_web_client.js b/addons/web/static/src/js/abstract_web_client.js
index c3985f4cf5c..e6dab38f61c 100644
--- a/addons/web/static/src/js/abstract_web_client.js
+++ b/addons/web/static/src/js/abstract_web_client.js
@@ -30,6 +30,9 @@ var WebClient = Widget.extend({
toggle_fullscreen: function (event) {
this.toggle_fullscreen(event.data.fullscreen);
},
+ current_action_updated: function (e) {
+ this.current_action_updated(e.data.action);
+ },
},
init: function(parent) {
this.client_options = {};
@@ -220,6 +223,9 @@ var WebClient = Widget.extend({
this.connection_notification = false;
}
},
+ // Handler to be overwritten
+ current_action_updated: function () {
+ },
// --------------------------------------------------------------
// Scrolltop handling
// --------------------------------------------------------------