diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-04-16 19:50:50 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-04-16 19:50:50 +0200 |
| commit | 74033eb007749c88b84ea883b006a5877355306e (patch) | |
| tree | 8f8b6cb22cc2bf6046ba04e388ea29855a33c597 /addons/board/static/src/js | |
| parent | 71cdefd9f41881d9720433d5fc7732759098f9a4 (diff) | |
| parent | 90f8f17fb4fc795c2c12d68d21900e81f3d7a223 (diff) | |
[MERGE] forward port branch saas-11.2 up to 90f8f17fb4f
Diffstat (limited to 'addons/board/static/src/js')
| -rw-r--r-- | addons/board/static/src/js/board_view.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/addons/board/static/src/js/board_view.js b/addons/board/static/src/js/board_view.js index 6ceaafd7253..e5fd56ad049 100644 --- a/addons/board/static/src/js/board_view.js +++ b/addons/board/static/src/js/board_view.js @@ -134,6 +134,31 @@ var BoardRenderer = FormRenderer.extend({ 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(); + } + }); }, //-------------------------------------------------------------------------- @@ -235,6 +260,7 @@ var BoardRenderer = FormRenderer.extend({ hasSelectors: false, }); return view.getController(self).then(function (controller) { + self._boardSubcontrollers.push(controller); return controller.appendTo(params.$node); }); }); |
