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:
parent
2a44b35941
commit
801344cb7e
|
@ -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>
|
||||
|
||||
* general/logon_ok.php: No tr in thead causes safari to spit an error
|
||||
|
|
|
@ -104,7 +104,7 @@ function temp_print_menu ($menu, $classtype) {
|
|||
|
||||
//Print out the first level
|
||||
$output .= '<li class="'.implode (" ", $classes).'" id="icon_'.$id.'">';
|
||||
$output .= '<a href="index.php?sec='.$mainsec.'&sec2='.$main["sec2"].($main["refr"] ? '&refr='.$main["refr"] : '').'"'.(($selected || in_array ("selected", $classes)) ? ' style="font-weight:bold;"' : '').'>'.$main["text"].'</a>';
|
||||
$output .= '<a href="index.php?sec='.$mainsec.'&sec2='.$main["sec2"].($main["refr"] ? '&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 != '') {
|
||||
//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);
|
||||
?>
|
||||
<script type="text/javascript" language="javascript">
|
||||
$(document).ready( function() {
|
||||
$("li.has_submenu").bind("mouseenter", function() {
|
||||
$(this).children("ul").slideDown ("slow");
|
||||
});
|
||||
|
||||
$("li.has_submenu.not_selected").click (function() {
|
||||
$(this).children("ul").slideToggle ("slow");
|
||||
$("img.toggle").click (function() {
|
||||
$(this).siblings("ul").slideToggle ("slow");
|
||||
return false; //In case the A gets activated, we don't want to follow link
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue