From 801344cb7e3bbf0acb8b36092153d72f0ef639f9 Mon Sep 17 00:00:00 2001 From: guruevi Date: Tue, 10 Feb 2009 20:29:45 +0000 Subject: [PATCH] 2009-02-10 Evi Vanoost * general/main_menu.php: Modified it to go with Esteban's idea * include/styles/menu.css: Modified it to go with Esteban's idea * include/javascript/jquery.pandora.js: Removed previous jquery stuff git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1441 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ pandora_console/general/main_menu.php | 14 +++++++------- .../include/javascript/jquery.pandora.js | 14 -------------- pandora_console/include/styles/menu.css | 15 +++++++++------ 4 files changed, 24 insertions(+), 27 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index ece72c5374..135f4e1d85 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2009-02-10 Evi Vanoost + + * general/main_menu.php: Modified it to go with Esteban's idea + + * include/styles/menu.css: Modified it to go with Esteban's idea + + * include/javascript/jquery.pandora.js: Removed previous jquery stuff + 2009-02-09 Evi Vanoost * general/logon_ok.php: No tr in thead causes safari to spit an error diff --git a/pandora_console/general/main_menu.php b/pandora_console/general/main_menu.php index a8edf31788..79b15f5eae 100644 --- a/pandora_console/general/main_menu.php +++ b/pandora_console/general/main_menu.php @@ -104,7 +104,7 @@ function temp_print_menu ($menu, $classtype) { //Print out the first level $output .= '
  • '; - $output .= ''.$main["text"].''; + $output .= ''.$main["text"].'toggle'; if ($submenu_output != '') { //WARNING: IN ORDER TO MODIFY THE VISIBILITY OF MENU'S AND SUBMENU'S (eg. with cookies) YOU HAVE TO ADD TO THIS ELSEIF. DON'T MODIFY THE CSS if ($visible || in_array ("selected", $classes)) { @@ -134,15 +134,15 @@ temp_print_menu ($menu, "godmode"); unset ($menu); require ("links_menu.php"); + +$config['jquery'][] = 'cookie'; +print_r ($_COOKIE); ?> diff --git a/pandora_console/include/javascript/jquery.pandora.js b/pandora_console/include/javascript/jquery.pandora.js index 247907d42b..9de1fbe70f 100644 --- a/pandora_console/include/javascript/jquery.pandora.js +++ b/pandora_console/include/javascript/jquery.pandora.js @@ -1,18 +1,4 @@ $(document).ready (function () { - /* Menu activation */ - $(".toggle").click (function () { - parents = $(this).parents ("li"); - if ($(parents).hasClass ("has_submenu_visible")) { - $(".submenu", parents).hide (); - $(parents).removeClass ("has_submenu_visible"); - $.cookie ($(parents).attr ("id"), null); - return; - } - $(parents).addClass ("has_submenu_visible"); - $(".submenu", parents).show (); - $.cookie ($(parents).attr ("id"), true); - }); - $.fn.check = function () { return this.each (function () { this.checked = true; diff --git a/pandora_console/include/styles/menu.css b/pandora_console/include/styles/menu.css index 9fb879a045..38646285b5 100644 --- a/pandora_console/include/styles/menu.css +++ b/pandora_console/include/styles/menu.css @@ -44,6 +44,7 @@ text-decoration:none; padding: 6px; margin-left: 23px; + white-space: nowrap; /* Breaking the text breaks the menu. */ } .menu a:hover { @@ -64,14 +65,16 @@ border-style: solid; border-color: #dadbdc; } -.menu li.has_submenu.selected > a, .menu li:hover.has_submenu > a { - background: transparent url(images/toggle.png) no-repeat 115px 5px; +.menu li img.toggle { + visibility: hidden; + float:right; + margin: -20px 2px 0 0; /* Positions it back where it should be */ } -/* -.menu li:hover.has_submenu ul.invisible { - display:block; +.menu li.has_submenu.selected > img.toggle, .menu li:hover.has_submenu > img.toggle { + visibility: visible; + z-index: 1; /* Positions it on top of the rest */ } -*/ + .menu li.links { background: #E9F3D2 url(../../images/link.png) no-repeat 4px 8px; border-width: 1px 0 0 1px;