diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-01-27 12:23:09 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-01-27 12:23:09 +0100 |
| commit | 7e44ddcda3f21c7e6401173539dc0fe93f9a7dd2 (patch) | |
| tree | 322d7f2ce86ce328c27197c5c1b31c9f4a2b2c5c /addons/web/static/src/js/action_manager.js | |
| parent | 3c7b08c030daf84323279b3d87361214e4f1b729 (diff) | |
| parent | 6f923cbdcdc9a78d1999999b3bbd917eb8b4e921 (diff) | |
[MERGE] forward port of branch saas-7 up to 6f923cb
Diffstat (limited to 'addons/web/static/src/js/action_manager.js')
| -rw-r--r-- | addons/web/static/src/js/action_manager.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/addons/web/static/src/js/action_manager.js b/addons/web/static/src/js/action_manager.js index ec3441eee4c..2337583b7f9 100644 --- a/addons/web/static/src/js/action_manager.js +++ b/addons/web/static/src/js/action_manager.js @@ -228,9 +228,9 @@ var ActionManager = Widget.extend({ this.main_control_panel = new ControlPanel(this); // Listen to event "on_breadcrumb_click" trigerred on the control panel when // clicking on a part of the breadcrumbs. Call select_action for this breadcrumb. - this.main_control_panel.on("on_breadcrumb_click", this, function(action, index) { + this.main_control_panel.on("on_breadcrumb_click", this, _.debounce(function(action, index) { this.select_action(action, index); - }); + }, 200, true)); // Append the main control panel to the DOM (inside the ActionManager jQuery element) this.main_control_panel.appendTo(this.$el); @@ -788,10 +788,15 @@ var ActionManager = Widget.extend({ }); }, ir_actions_act_url: function (action) { + var url = action.url; + if (session.debug && url && url.length && url[0] === '/') { + url = $.param.querystring(url, 'debug'); + } + if (action.target === 'self') { - framework.redirect(action.url); + framework.redirect(url); } else { - window.open(action.url, '_blank'); + window.open(url, '_blank'); } return $.when(); }, |
