From 3741603495532e218b66f3cfa0272e4536f1cf2c Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 7 Jun 2017 14:11:23 +0200 Subject: [FIX] web: restore broken datepicker since lib update There were two main problems with the datepicker since the lib was updated: - it appeared broken in the search view "Filters" menu - it did not overflow the parent which scrolls Indeed, before the update, the datepicker was placed in the . Now this is a lib option. Unfortunately, the option is broken (I don't know why they broke it since it worked before the lib update...). As the lib does not expose its internal functions, the only found workaround was to patch the lib code itself. opw-745311 opw-745625 --- .../lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'addons/web/static/lib/bootstrap-datetimepicker') diff --git a/addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js b/addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js index 807bdff70dd..8f0724bbb00 100644 --- a/addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js +++ b/addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js @@ -421,6 +421,12 @@ element.children().first().after(widget); } + // !! ODOO FIX START !! + var parentOffset = parent.offset(); + position.top = offset.top - parentOffset.top; + position.left = offset.left - parentOffset.left; + // !! ODOO FIX END !! + // Top and bottom logic if (vertical === 'auto') { if (offset.top + widget.height() * 1.5 >= $(window).height() + $(window).scrollTop() && -- cgit v1.2.3