summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/bootstrap-datetimepicker/src
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-06-07 14:11:23 +0200
committerqsm-odoo <qsm@odoo.com>2017-06-07 16:09:16 +0200
commit3741603495532e218b66f3cfa0272e4536f1cf2c (patch)
tree07ccaac1d7b41a9b10323394aaae6873c618e7ea /addons/web/static/lib/bootstrap-datetimepicker/src
parentc0f81be3359eb87bbaf0fceee9282c0f68f740c5 (diff)
[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 <body/>. 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
Diffstat (limited to 'addons/web/static/lib/bootstrap-datetimepicker/src')
-rw-r--r--addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js6
1 files changed, 6 insertions, 0 deletions
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() &&