[IMP]add tooltip to menu with bootstrap.
authorVidhin Mehta (OpenERP) <vme@tinyerp.com>
Fri, 18 Apr 2014 13:30:36 +0000 (19:00 +0530)
committerVidhin Mehta (OpenERP) <vme@tinyerp.com>
Fri, 18 Apr 2014 13:30:36 +0000 (19:00 +0530)
bzr revid: vme@tinyerp.com-20140418133036-lspgwn0fywl5zrn3

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

index 3c1f55d..91e20d9 100644 (file)
@@ -859,6 +859,12 @@ instance.web.Menu =  instance.web.Widget.extend({
                 $clicked_menu.parent().addClass('active');
             }
         }
+        this.$secondary_menus.find('.oe_secondary_submenu li a span').each(function() {
+            var $el = $(this);
+            if (this.scrollWidth > this.clientWidth) {
+                $el.tooltip({title: $el.attr('title', $el.text().trim())});
+            }
+       });
     },
     /**
      * Call open_menu with the first menu_item matching an action_id