summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core.js
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2014-04-29 14:42:37 +0200
committerSimon Lejeune <sle@openerp.com>2014-04-29 14:42:37 +0200
commit6bef64f513ee744ac016e2dd98e9e29bad947f94 (patch)
tree5613064dcf2c9e7558f8a4010930fbb025457d9a /addons/web/static/src/js/core.js
parent545e8ae52923ba7f0daa8810036a3a169c32cf6a (diff)
parent6f51331d52bed117f5a060addf4ee12608ea2236 (diff)
[MERGE] trunk
bzr revid: sle@openerp.com-20140422123804-dnjnwfyfrpxjgrlo bzr revid: sle@openerp.com-20140424124720-ihcrqojmnmj0k66q bzr revid: sle@openerp.com-20140428162227-sbvq5ogtshpz0vw6 bzr revid: sle@openerp.com-20140429124237-dhk3378fvche068v
Diffstat (limited to 'addons/web/static/src/js/core.js')
-rw-r--r--addons/web/static/src/js/core.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js
index b7e15f9eaa0..74866112d99 100644
--- a/addons/web/static/src/js/core.js
+++ b/addons/web/static/src/js/core.js
@@ -787,8 +787,19 @@ instance.web.unblockUI = function() {
/* Bootstrap defaults overwrite */
-$.fn.tooltip.Constructor.DEFAULTS.placement = 'bottom';
+$.fn.tooltip.Constructor.DEFAULTS.placement = 'auto top';
$.fn.tooltip.Constructor.DEFAULTS.html = true;
+$.fn.tooltip.Constructor.DEFAULTS.container = 'body';
+//overwrite bootstrap tooltip method to fix bug when using placement
+//auto and the parent element does not exist anymore resulting in
+//an error. This should be remove once bootstrap fix the bug
+var bootstrap_show_function = $.fn.tooltip.Constructor.prototype.show;
+$.fn.tooltip.Constructor.prototype.show = function (e) {
+ if (this.$element.parent().length === 0){
+ return;
+ }
+ return bootstrap_show_function.call(this, e);
+};
/**
* Registry for all the client actions key: tag value: widget