[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1479] trunk/UI/menu_expand.html



Revision: 1479
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1479&view=rev
Author:   einhverfr
Date:     2007-08-31 21:50:01 -0700 (Fri, 31 Aug 2007)

Log Message:
-----------
Expanding menus now work again.

Modified Paths:
--------------
    trunk/UI/menu_expand.html

Modified: trunk/UI/menu_expand.html
===================================================================
--- trunk/UI/menu_expand.html	2007-09-01 04:35:05 UTC (rev 1478)
+++ trunk/UI/menu_expand.html	2007-09-01 04:50:01 UTC (rev 1479)
@@ -7,6 +7,7 @@
 	<meta http-equiv="Expires" content="-1" />
 	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
 	<link rel="stylesheet" href="css/<?lsmb stylesheet ?>" type="text/css" title="LedgerSMB stylesheet" />
+	<link rel="stylesheet" href="UI/menu_expand.css" type="text/css" title="LedgerSMB stylesheet" />
 
 	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
 
@@ -17,12 +18,14 @@
 			function SwitchMenu(obj) {
 				if (document.getElementById) {
 					var el = document.getElementById(obj);
+					
+					if (el.style.display == "block") {
+						el.style.display = "none";
 
-					if (el.style.display == "none") {
+					} else {
 						el.style.display = "block"; //display the block of info
-					} else {
-						el.style.display = "none";
 					}
+					return false;
 				}		
 			}
 
@@ -47,8 +50,8 @@
 				?><?lsmb arg 
 				?>&<?lsmb END ?>"
 				target = "main_window"
-				onclick="return <?lsmb IF item.module 
-					?>SwitchMenu(<?lsmb id ?>)<?lsmb END ?>"
+				onclick="return <?lsmb IF item.menu 
+					?>SwitchMenu('sub_<?lsmb item.id ?>')<?lsmb END ?>"
 				class = "<?lsmb IF item.module ?>Menu<?lsmb
 					ELSE ?>Item<?lsmb END ?>"
 				><?lsmb text(item.label) ?></a>


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.