From 3363facfe41f5c60b0f617226a8286dc384d5612 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 3 Aug 2016 17:49:31 +0200 Subject: [PATCH] [IMP] website_quote: use affix to block the sidebar when scrolling Sometimes, the sidebar on quotation previews can overflow the footer if the window height is too small. To prevent that, the position of the sidebar is blocked before overflowing, thanks to affix. --- addons/website_quote/static/src/js/website_quotation.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/website_quote/static/src/js/website_quotation.js b/addons/website_quote/static/src/js/website_quotation.js index 2ff25986179..23378123f2f 100644 --- a/addons/website_quote/static/src/js/website_quotation.js +++ b/addons/website_quote/static/src/js/website_quotation.js @@ -175,6 +175,12 @@ if(!$('.o_website_quote').length) { nav_menu.setElement($('[data-id="quote_sidebar"]')); nav_menu.start($('body[data-target=".navspy"]')); + $(".o_website_quote .bs-sidebar").affix({ + offset: { + top: 0, + bottom: $('body').height() - $('#wrapwrap').outerHeight() + $("footer").outerHeight(), + }, + }); }); odoo.define('website_quote.payment_method', function (require) {