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/js | |
| parent | c3665fb5c9c9c50e9a8fd2d52e83c50f52d603aa (diff) | |
| parent | 3a2147d95c8005ab7c1dbe4d94315e404ea5e5f9 (diff) | |
[MERGE] forward port branch saas-11 up to 3a2147d
Diffstat (limited to 'addons/website_quote/static/src/js')
| -rw-r--r-- | addons/website_quote/static/src/js/website_quotation.js | 17 |
1 files changed, 17 insertions, 0 deletions
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) { |
