diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-08-20 17:18:31 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-08-20 17:18:31 +0200 |
| commit | 9ad5f26b3fb98cd14527de80d19bf6554a6981e2 (patch) | |
| tree | 771dc0267ad045abb1f2c4c77e814fbf7f3923d9 /addons/website_quote/static/src | |
| parent | c3665fb5c9c9c50e9a8fd2d52e83c50f52d603aa (diff) | |
| parent | 3a2147d95c8005ab7c1dbe4d94315e404ea5e5f9 (diff) | |
[MERGE] forward port branch saas-11 up to 3a2147d
Diffstat (limited to 'addons/website_quote/static/src')
| -rw-r--r-- | addons/website_quote/static/src/css/website_quotation.css | 18 | ||||
| -rw-r--r-- | addons/website_quote/static/src/js/website_quotation.js | 17 |
2 files changed, 19 insertions, 16 deletions
diff --git a/addons/website_quote/static/src/css/website_quotation.css b/addons/website_quote/static/src/css/website_quotation.css index f94ab7be174..ff8275a5f1b 100644 --- a/addons/website_quote/static/src/css/website_quotation.css +++ b/addons/website_quote/static/src/css/website_quotation.css @@ -1,17 +1,11 @@ .o_website_quote .bs-sidebar { - position: fixed; + position: relative; + width: 100%; z-index : 1; background-color: #f7f5fa; border-radius: 5px; } -/* mobile preview: the left menu overlaps the quote */ -@media (max-width: 992px) { - .o_website_quote .bs-sidebar { - position: relative; - } -} - .o_website_quote .bs-sidenav { padding-top: 10px; padding-bottom: 10px; @@ -60,14 +54,6 @@ .o_website_quote .bs-sidebar .nav > .active > ul { display: block; } - .o_website_quote .bs-sidebar { - width: 213px; - } -} -@media (min-width: 1200px) { - .o_website_quote .bs-sidebar { - width: 263px; - } } @media print { body { diff --git a/addons/website_quote/static/src/js/website_quotation.js b/addons/website_quote/static/src/js/website_quotation.js index 2ff25986179..798b1ec5a76 100644 --- a/addons/website_quote/static/src/js/website_quotation.js +++ b/addons/website_quote/static/src/js/website_quotation.js @@ -2,6 +2,7 @@ odoo.define('website_quote.website_quote', function (require) { 'use strict'; var ajax = require('web.ajax'); +var config = require('web.config'); var Widget = require('web.Widget'); var website = require('website.website'); @@ -175,6 +176,22 @@ if(!$('.o_website_quote').length) { nav_menu.setElement($('[data-id="quote_sidebar"]')); nav_menu.start($('body[data-target=".navspy"]')); + var $bs_sidebar = $(".o_website_quote .bs-sidebar"); + $(window).on('resize', _.throttle(adapt_sidebar_position, 200, {leading: false})); + adapt_sidebar_position(); + + function adapt_sidebar_position() { + $bs_sidebar.css({ + position: "", + width: "", + }); + if (config.device.size_class >= config.device.SIZES.MD) { + $bs_sidebar.css({ + position: "fixed", + width: $bs_sidebar.outerWidth(), + }); + } + } }); odoo.define('website_quote.payment_method', function (require) { |
