From dbf06b6a1ba2ea901351718aad8c1f92de286daa Mon Sep 17 00:00:00 2001 From: Aris Feryanto Date: Fri, 8 Jul 2011 15:22:27 +0800 Subject: [PATCH] Show/hide column: fix bug - hint is still shown when we can't toggle column visibility (i.e., when there is only 1 column available) --- js/makegrid.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/js/makegrid.js b/js/makegrid.js index 11bfa09f17..b51950f7f5 100644 --- a/js/makegrid.js +++ b/js/makegrid.js @@ -749,15 +749,17 @@ g.showHint(e); }); } - $(t).find('th:not(.draggable)') - .mouseenter(function(e) { - g.showColVisibHint = true; - g.showHint(e); - }) - .mouseleave(function(e) { - g.showColVisibHint = false; - g.showHint(e); - }); + if ($firstRowCols.length > 1) { + $(t).find('th:not(.draggable)') + .mouseenter(function(e) { + g.showColVisibHint = true; + g.showHint(e); + }) + .mouseleave(function(e) { + g.showColVisibHint = false; + g.showHint(e); + }); + } $(t).find('th.draggable a') .attr('title', '') // hide default tooltip for sorting .mouseenter(function(e) {