diff options
| author | Martin Geubelle <mge@odoo.com> | 2016-08-24 15:16:45 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2016-09-28 16:55:51 +0200 |
| commit | b2aafa23b822e99b4c252cd6a3af0e4e1c246ba5 (patch) | |
| tree | 3f413906fa9cfdb1695c66c33648ab58656932cc /addons/web/static/src/js/widgets/systray_menu.js | |
| parent | 037b7063e27164adf9ff680c34f8f9baa3baaf65 (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/widgets/systray_menu.js')
| -rw-r--r-- | addons/web/static/src/js/widgets/systray_menu.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/web/static/src/js/widgets/systray_menu.js b/addons/web/static/src/js/widgets/systray_menu.js index 025d8c83970..0d0e18476b0 100644 --- a/addons/web/static/src/js/widgets/systray_menu.js +++ b/addons/web/static/src/js/widgets/systray_menu.js @@ -11,6 +11,7 @@ var SystrayMenu = Widget.extend({ init: function(parent) { this._super(parent); this.items = []; + this.widgets = []; this.load = $.Deferred(); }, start: function() { @@ -29,6 +30,7 @@ var SystrayMenu = Widget.extend({ }); _.each(SystrayMenu.Items, function(widgetCls) { var cur_systray_item = new widgetCls(self); + self.widgets.push(cur_systray_item); self.items.push(cur_systray_item.prependTo(self.$el)); }); }, |
