diff options
| author | Fabien Meghazi <fme@openerp.com> | 2014-04-23 14:37:35 +0200 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2014-04-23 14:37:35 +0200 |
| commit | d4b534e7be3586fe17bbb237dd0fd7cdcdb7652c (patch) | |
| tree | 83ca6d215b4622dc23b6856f4429725c20f0a2ed /addons/web/static/src/js/core.js | |
| parent | bc1878e3e2d6bb8d76be6f02dfda0d844b5062c8 (diff) | |
| parent | 8ee8b7bde68a550e2950df75754ad387c8ae13b1 (diff) | |
[MERGE] upstream
bzr revid: fme@openerp.com-20140423123735-fc38fzp3mtai8xnb
Diffstat (limited to 'addons/web/static/src/js/core.js')
| -rw-r--r-- | addons/web/static/src/js/core.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 90c84ba9cda..a4bcd1922de 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -788,6 +788,22 @@ instance.web.unblockUI = function() { return $.unblockUI.apply($, arguments); }; + +/* Bootstrap defaults overwrite */ +$.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 */ |
