diff options
| author | Romain Derie <rde@odoo.com> | 2020-10-09 10:01:23 +0000 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2020-10-21 08:46:37 +0000 |
| commit | a06d91f4262074fcac713c80f8b3a26071dcace6 (patch) | |
| tree | 7eabbf1e757a5e914e3d8fe8bf7153608efbe30c | |
| parent | 231bdca3f26d96f578503694e5aec062de2317ed (diff) | |
[FIX] portal, sale: scroll correctly if fixed header
Depending of the configuration, on the portal, anchor do not consider the
header, so a part of the text is hidden by the navbar.
task-2290213
closes odoo/odoo#60408
X-original-commit: 2cd9a9d12f4cd7352430c166145a7488af0c120c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
| -rw-r--r-- | addons/portal/views/portal_templates.xml | 2 | ||||
| -rw-r--r-- | addons/sale/static/src/js/sale_portal_sidebar.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/addons/portal/views/portal_templates.xml b/addons/portal/views/portal_templates.xml index ef6876b1a0b..96ede773944 100644 --- a/addons/portal/views/portal_templates.xml +++ b/addons/portal/views/portal_templates.xml @@ -532,7 +532,7 @@ :pid : identifier of the partner signing the token --> <template id="message_thread"> - <div id="discussion" class="d-print-none o_portal_chatter o_not_editable p-0" + <div id="discussion" data-anchor="true" class="d-print-none o_portal_chatter o_not_editable p-0" t-att-data-token="token" t-att-data-res_model="object._name" t-att-data-pid="pid" t-att-data-hash="hash" t-att-data-res_id="object.id" t-att-data-pager_step="message_per_page or 10" t-att-data-allow_composer="'0' if disable_composer else '1'"> </div> </template> diff --git a/addons/sale/static/src/js/sale_portal_sidebar.js b/addons/sale/static/src/js/sale_portal_sidebar.js index 815c8254e18..bc18d3c98d6 100644 --- a/addons/sale/static/src/js/sale_portal_sidebar.js +++ b/addons/sale/static/src/js/sale_portal_sidebar.js @@ -88,7 +88,9 @@ publicWidget.registry.SalePortalSidebar = PortalSidebar.extend({ } break; } + el.setAttribute('data-anchor', true); }); + this.trigger_up('widgets_start_request', {$target: $bsSidenav}); }, /** * extract text of menu title for sidebar |
