summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core.js
diff options
context:
space:
mode:
authorFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>2014-08-25 16:42:57 +0200
committerFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>2014-08-25 16:42:57 +0200
commitd7f93defb899b2b48a14d679e5dffffdb4a00eff (patch)
treef8572183b480477622917a1f504cf49a8e202f6e /addons/web/static/src/js/core.js
parent2b67528fe9e366829d44d8aba756bc6e359b4c61 (diff)
parent36146b3fadc47543f4b696ab75c31b3459afb15b (diff)
Merge branch 'master' into master-pos-new-payment-screen-fva
Conflicts: addons/point_of_sale/point_of_sale.py addons/point_of_sale/point_of_sale_view.xml
Diffstat (limited to 'addons/web/static/src/js/core.js')
-rw-r--r--addons/web/static/src/js/core.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js
index 23645e22bf1..169547d78c0 100644
--- a/addons/web/static/src/js/core.js
+++ b/addons/web/static/src/js/core.js
@@ -311,9 +311,8 @@ instance.web.Session.include( /** @lends instance.web.Session# */{
self.module_list = all_modules;
var loaded = self.load_translations();
- var datejs_locale = "/web/static/lib/datejs/globalization/" + self.user_context.lang.replace("_", "-") + ".js";
-
- var file_list = [ datejs_locale ];
+ var locale = "/web/webclient/locale/" + self.user_context.lang || 'en_US';
+ var file_list = [ locale ];
if(to_load.length) {
loaded = $.when(
loaded,
@@ -772,7 +771,7 @@ instance.web.unblockUI = function() {
/* Bootstrap defaults overwrite */
$.fn.tooltip.Constructor.DEFAULTS.placement = 'auto top';
$.fn.tooltip.Constructor.DEFAULTS.html = true;
-$.fn.tooltip.Constructor.DEFAULTS.container = 'body';
+$.fn.tooltip.Constructor.DEFAULTS.trigger = 'hover focus click';
//overwrite bootstrap tooltip method to prevent showing 2 tooltip at the same time
var bootstrap_show_function = $.fn.tooltip.Constructor.prototype.show;
$.fn.tooltip.Constructor.prototype.show = function () {
@@ -786,6 +785,18 @@ $.fn.tooltip.Constructor.prototype.show = function () {
if (e.isDefaultPrevented() || !inDom) return;
return bootstrap_show_function.call(this);
};
+//overwrite bootstrap tooltip init method in order to check if tooltip is in a modal or not and
+//if so it needs to have a container body in order to be visible
+var bootstrap_init_tooltip_fnct = $.fn.tooltip.Constructor.prototype.init;
+$.fn.tooltip.Constructor.prototype.init = function (type, element, options) {
+ options = options || {}
+ if ($('.modal[aria-hidden="false"]').length !== 0){
+ if (options && !options.container){
+ options = _.extend({container: 'body'},options);
+ }
+ }
+ return bootstrap_init_tooltip_fnct.call(this, type, element, options);
+}
/**
* Registry for all the client actions key: tag value: widget