summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets/debug_manager.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-07-15 16:34:41 +0200
committerChristophe Simonis <chs@odoo.com>2016-07-15 16:34:41 +0200
commit5858dda75fd7e73642b74b000352e0762e59324a (patch)
tree4219a554abd553ad6af01c619577ab0ba6d3828c /addons/web/static/src/js/widgets/debug_manager.js
parent60e446351c3824a2946e02b4f2fe169b1a1fd430 (diff)
parenta62b8cfaeb8a426a876b7e86133f98851fa7287e (diff)
[MERGE] forward port branch saas-11 up to a62b8cf
Diffstat (limited to 'addons/web/static/src/js/widgets/debug_manager.js')
-rw-r--r--addons/web/static/src/js/widgets/debug_manager.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/addons/web/static/src/js/widgets/debug_manager.js b/addons/web/static/src/js/widgets/debug_manager.js
index f38c4a06656..4ebb1e775b2 100644
--- a/addons/web/static/src/js/widgets/debug_manager.js
+++ b/addons/web/static/src/js/widgets/debug_manager.js
@@ -49,7 +49,7 @@ var DebugManager = Widget.extend({
}
},
start: function () {
- core.bus.on('action_pushed', this, this.update);
+ core.bus.on('current_action_updated', this, this.update.bind(this, 'action'));
core.bus.on('rpc:result', this, function (req, resp) {
this._debug_events(resp.debug);
});
@@ -664,12 +664,20 @@ if (core.debug) {
start: function() {
var self = this;
return this._super().then(function () {
- // Override push_action so that it triggers an event each time a new action is pushed
+ // Override push_action and select_action so that it triggers
+ // an event each time a new action is pushed.
// The DebugManager listens to this event to keep itself up-to-date
var push_action = self.action_manager.push_action;
self.action_manager.push_action = function(widget, descr) {
return push_action.apply(self.action_manager, arguments).then(function () {
- core.bus.trigger('action_pushed', 'action', descr, widget);
+ core.bus.trigger('current_action_updated', descr, widget);
+ });
+ };
+ var select_action = self.action_manager.select_action;
+ self.action_manager.select_action = function() {
+ return select_action.apply(self.action_manager, arguments).then(function () {
+ var action = self.action_manager.get_inner_action();
+ core.bus.trigger('current_action_updated', action.action_descr, action.widget);
});
};
});