diff options
| author | Aaron Bohy <aab@odoo.com> | 2018-03-08 14:57:43 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2018-03-10 09:01:46 +0100 |
| commit | 4e204ed2233ccd36b2eb7d3e56bfa741b9cb3e14 (patch) | |
| tree | a4c5dc6c77459b1590c601d4b21ca203ccc005f5 /addons/web/static/src/js/views/abstract_renderer.js | |
| parent | 1a99d22f19949cf8eb689a6e2d6eda859c963cf9 (diff) | |
[IMP] web: restore scroll position
This rev. improves the way the scroll position is restored when
coming back to a view (e.g. open a kanban view, scroll, click on a
record to open it in a form view, go back to kanban using the
breadcrumbs):
- generalize the scroll position handling from web_enterprise to
web to make it available in the community webclient as well
- also restore left scroll position, not only top (especially
useful for grouped Kanban views with a lot of columns)
- handle the case where the scrolling area is a sub element of
the view (e.g. the grouped Kanban view in mobile).
Task 34037
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Co-authored-by: Ankit Sathvara <asa@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/abstract_renderer.js')
| -rw-r--r-- | addons/web/static/src/js/views/abstract_renderer.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/abstract_renderer.js b/addons/web/static/src/js/views/abstract_renderer.js index 935fcc6643e..2394fb31a64 100644 --- a/addons/web/static/src/js/views/abstract_renderer.js +++ b/addons/web/static/src/js/views/abstract_renderer.js @@ -36,6 +36,14 @@ return Widget.extend({ this.$el.addClass(this.arch.attrs.class); return $.when(this._render(), this._super()); }, + /** + * Called each time the renderer is attached into the DOM. + */ + on_attach_callback: function () {}, + /** + * Called each time the renderer is detached from the DOM. + */ + on_detach_callback: function () {}, //-------------------------------------------------------------------------- // Public |
