[FIX] web: wrong tooltip display for long menus
authorVidhin Mehta <vme@openerp.com>
Thu, 24 Jul 2014 07:31:58 +0000 (13:01 +0530)
committerRichard Mathot <rim@openerp.com>
Thu, 24 Jul 2014 13:21:32 +0000 (15:21 +0200)
Due to the switch to Bootstrap 3.2 in this version, tooltip auto placement works erroneously (see https://github.com/twbs/bootstrap/issues/13897).
This is a workaround, waiting for a fix in Bootstrap assets.

(Closes #1341)

addons/web/static/src/js/chrome.js

index b035b22..ef3aedb 100644 (file)
@@ -910,7 +910,7 @@ instance.web.Menu =  instance.web.Widget.extend({
         }
         // add a tooltip to cropped menu items
         this.$secondary_menus.find('.oe_secondary_submenu li a span').each(function() {
-            $(this).tooltip(this.scrollWidth > this.clientWidth ? {title: $(this).text().trim(), placement: 'auto right'} :'destroy');
+            $(this).tooltip(this.scrollWidth > this.clientWidth ? {title: $(this).text().trim(), placement: 'right'} :'destroy');
        });
     },
     /**