diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-04-16 18:34:56 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-04-16 18:34:56 +0200 |
| commit | 5f2d080cf85d54bc52895f9dbc4075b10989d324 (patch) | |
| tree | c925509b609fb07f6fbef8896710b756c3c6a86f /addons/board/static/src | |
| parent | 026be48ccbbb15daefda070697b135f089f49564 (diff) | |
| parent | ad825b673b57344a6a1571234f62a0b3aa543bf7 (diff) | |
[MERGE] forward port branch 11.0 up to ad825b673b5
Diffstat (limited to 'addons/board/static/src')
| -rw-r--r-- | addons/board/static/src/js/dashboard.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js index 2e56eb39685..5793908c02b 100644 --- a/addons/board/static/src/js/dashboard.js +++ b/addons/board/static/src/js/dashboard.js @@ -141,6 +141,31 @@ FormRenderer.include({ this._super.apply(this, arguments); this.noContentHelp = params.noContentHelp; this.actionsDescr = {}; + this._boardSubcontrollers = []; // for board: controllers of subviews + }, + /** + * Call `on_attach_callback` for each subview + * + * @override + */ + on_attach_callback: function () { + _.each(this._boardSubcontrollers, function (controller) { + if ('on_attach_callback' in controller) { + controller.on_attach_callback(); + } + }); + }, + /** + * Call `on_detach_callback` for each subview + * + * @override + */ + on_detach_callback: function () { + _.each(this._boardSubcontrollers, function (controller) { + if ('on_detach_callback' in controller) { + controller.on_detach_callback(); + } + }); }, //-------------------------------------------------------------------------- @@ -243,6 +268,7 @@ FormRenderer.include({ hasSelectors: false, }); return view.getController(self).then(function (controller) { + self._boardSubcontrollers.push(controller); return controller.appendTo(params.$node); }); }); |
