2009-02-10 Evi Vanoost <vanooste@rcbi.rochester.edu>

* 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
This commit is contained in:
guruevi 2009-02-10 20:29:45 +00:00
parent 2a44b35941
commit 801344cb7e
4 changed files with 24 additions and 27 deletions

View File

@ -1,3 +1,11 @@
2009-02-10 Evi Vanoost <vanooste@rcbi.rochester.edu>
* 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 <vanooste@rcbi.rochester.edu> 2009-02-09 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php: No tr in thead causes safari to spit an error * general/logon_ok.php: No tr in thead causes safari to spit an error

View File

@ -104,7 +104,7 @@ function temp_print_menu ($menu, $classtype) {
//Print out the first level //Print out the first level
$output .= '<li class="'.implode (" ", $classes).'" id="icon_'.$id.'">'; $output .= '<li class="'.implode (" ", $classes).'" id="icon_'.$id.'">';
$output .= '<a href="index.php?sec='.$mainsec.'&amp;sec2='.$main["sec2"].($main["refr"] ? '&amp;refr='.$main["refr"] : '').'"'.(($selected || in_array ("selected", $classes)) ? ' style="font-weight:bold;"' : '').'>'.$main["text"].'</a>'; $output .= '<a href="index.php?sec='.$mainsec.'&amp;sec2='.$main["sec2"].($main["refr"] ? '&amp;refr='.$main["refr"] : '').'"'.(($selected || in_array ("selected", $classes)) ? ' style="font-weight:bold;"' : '').'>'.$main["text"].'</a><img class="toggle" src="include/styles/images/toggle.png" alt="toggle" />';
if ($submenu_output != '') { 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 //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)) { if ($visible || in_array ("selected", $classes)) {
@ -134,15 +134,15 @@ temp_print_menu ($menu, "godmode");
unset ($menu); unset ($menu);
require ("links_menu.php"); require ("links_menu.php");
$config['jquery'][] = 'cookie';
print_r ($_COOKIE);
?> ?>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
$(document).ready( function() { $(document).ready( function() {
$("li.has_submenu").bind("mouseenter", function() { $("img.toggle").click (function() {
$(this).children("ul").slideDown ("slow"); $(this).siblings("ul").slideToggle ("slow");
}); return false; //In case the A gets activated, we don't want to follow link
$("li.has_submenu.not_selected").click (function() {
$(this).children("ul").slideToggle ("slow");
}); });
}); });
</script> </script>

View File

@ -1,18 +1,4 @@
$(document).ready (function () { $(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 () { $.fn.check = function () {
return this.each (function () { return this.each (function () {
this.checked = true; this.checked = true;

View File

@ -44,6 +44,7 @@
text-decoration:none; text-decoration:none;
padding: 6px; padding: 6px;
margin-left: 23px; margin-left: 23px;
white-space: nowrap; /* Breaking the text breaks the menu. */
} }
.menu a:hover { .menu a:hover {
@ -64,14 +65,16 @@
border-style: solid; border-style: solid;
border-color: #dadbdc; border-color: #dadbdc;
} }
.menu li.has_submenu.selected > a, .menu li:hover.has_submenu > a { .menu li img.toggle {
background: transparent url(images/toggle.png) no-repeat 115px 5px; visibility: hidden;
float:right;
margin: -20px 2px 0 0; /* Positions it back where it should be */
} }
/* .menu li.has_submenu.selected > img.toggle, .menu li:hover.has_submenu > img.toggle {
.menu li:hover.has_submenu ul.invisible { visibility: visible;
display:block; z-index: 1; /* Positions it on top of the rest */
} }
*/
.menu li.links { .menu li.links {
background: #E9F3D2 url(../../images/link.png) no-repeat 4px 8px; background: #E9F3D2 url(../../images/link.png) no-repeat 4px 8px;
border-width: 1px 0 0 1px; border-width: 1px 0 0 1px;