From 48d3e6850a9403b89932422f16cfd291cacdf22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 2 Feb 2011 23:14:52 +0100 Subject: [PATCH] Change More hiding/showing to CSS class from explicit block/none. When theme wants to use something else than display: block; the old method did not work. --- js/functions.js | 7 +++---- themes/darkblue_orange/css/theme_right.css.php | 4 ++++ themes/original/css/theme_right.css.php | 4 ++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/js/functions.js b/js/functions.js index 94464855d..542305e32 100644 --- a/js/functions.js +++ b/js/functions.js @@ -2297,7 +2297,7 @@ function menuResize() for (var i = hide_start; i < li.length-1; i++) { $(li[i])[more_shown ? 'prependTo' : 'appendTo'](submenu_ul); } - submenu.show(); + submenu.addClass('shown'); } else if (more_shown) { w -= submenu_w; // nothing hidden, maybe something can be restored @@ -2308,7 +2308,7 @@ function menuResize() if (w+submenu_w < wmax || (i == li2.length-1 && w < wmax)) { $(li2[i]).insertBefore(submenu); if (i == li2.length-1) { - submenu.hide(); + submenu.removeClass('shown'); } continue; } @@ -2349,8 +2349,7 @@ $(function() { if ($(this).find('ul .tabactive').length == 0) { $(this).removeClass('submenuhover').find('> a').removeClass('tabactive'); } - }) - .hide(); + }); topmenu.append(submenu); // populate submenu and register resize event diff --git a/themes/darkblue_orange/css/theme_right.css.php b/themes/darkblue_orange/css/theme_right.css.php index f5ac5959d..e555da9ee 100644 --- a/themes/darkblue_orange/css/theme_right.css.php +++ b/themes/darkblue_orange/css/theme_right.css.php @@ -692,6 +692,10 @@ ul#topmenu ul a { ul#topmenu .submenu { position: relative; + display: none; +} +ul#topmenu .shown { + display: block; } ul#topmenu ul { diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 2e5d6f642..bc5f6ee1e 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -667,6 +667,10 @@ ul#topmenu ul a { ul#topmenu .submenu { position: relative; + display: none; +} +ul#topmenu .shown { + display: block; } ul#topmenu ul {