From 099ba54e28f5490b3316087e987015efeb5e477e Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Fri, 18 Apr 2014 19:00:36 +0530 Subject: [PATCH] [IMP]add tooltip to menu with bootstrap. bzr revid: vme@tinyerp.com-20140418133036-lspgwn0fywl5zrn3 --- addons/web/static/src/js/chrome.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 3c1f55df981..91e20d98603 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -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