summaryrefslogtreecommitdiff
path: root/UI/menu/expanding.html
blob: bec01754aca48816febabd01583ce9da3ce78f4e (plain)
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <title><?lsmb text('LedgerSMB Accounting Menu')?>
  6. -- <?lsmb VERSION ?></title>
  7. <meta http-equiv="Pragma" content="no-cache" />
  8. <meta http-equiv="Expires" content="-1" />
  9. <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
  10. <!--
  11. Please note that the below style tag is NOT in line with
  12. how we do things. However, it seems necessary in order to work
  13. around a Firefox bug in the the application of the styles.
  14. - CT
  15. -->
  16. <style type="text/css" media="all">
  17. @import url("UI/menu/expanding.css");
  18. @import url("css/<?lsmb stylesheet ?>");
  19. </style>
  20. <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  21. <meta name="robots" content="noindex,nofollow" />
  22. <script type="text/javascript">
  23. function SwitchMenu(id) {
  24. var obj = "menu_" + id;
  25. if (document.getElementById) {
  26. var element = document.getElementById(obj);
  27. element = document.getElementById(obj);
  28. if (element.className == 'menu_open'){
  29. element.className
  30. = 'menu_closed';
  31. } else {
  32. element.className = 'menu_open';
  33. }
  34. return false;
  35. }
  36. }
  37. document.onselectstart = new Function("return false");
  38. </script>
  39. </head>
  40. <body class="menu">
  41. <img class="cornderlogo" src="images/ledgersmb_small.png" width="100" height="50" border="1" alt="LedgerSMB" />
  42. <ul id="top_menu" class="menu_open">
  43. <?lsmb old_level = 0 ?>
  44. <?lsmb FOREACH item = menu_items ?>
  45. <?lsmb href = "" ?>
  46. <!-- <?lsmb item.level ?> :: <?lsmb old_level ?> -->
  47. <?lsmb WHILE item.level < old_level ?>
  48. </li></ul><?lsmb old_level = old_level - 1 ?>
  49. <?lsmb END ?>
  50. <?lsmb IF old_level > 0 && item.level <= old_level ?></li><?lsmb END ?>
  51. <?lsmb old_level = item.level ?>
  52. <li id="menu_<?lsmb item.id ?>"
  53. class = "<?lsmb IF (item.menu && item.open)
  54. ?>menu_open<?lsmb ELSIF item.menu
  55. ?>menu_closed<?lsmb
  56. ELSE ?>menu_item<?lsmb END ?>">
  57. <a href="<?lsmb IF item.module ?><?lsmb item.module
  58. ?><?lsmb ELSE ?>menu.pl<?lsmb END
  59. ?>?login=<?lsmb login
  60. ?>&amp;<?lsmb FOREACH arg IN item.args
  61. ?><?lsmb arg
  62. ?>&amp;<?lsmb END
  63. ?><?lsmb IF item.menu
  64. ?>id=<?lsmb item.id
  65. ?>&amp;open=<?lsmb open
  66. ?><?lsmb END ?>"
  67. <?lsmb IF (item.module != 'menu.pl') &&
  68. ('login.pl' != item.module) ?>
  69. target = "main_window"
  70. <?lsmb ELSIF ('New Window' == item.label) ?>
  71. target = 'new'
  72. <?lsmb ELSIF ('login.pl' == item.module) ?>
  73. target = '_top'
  74. <?lsmb END ?>
  75. <?lsmb IF item.menu &&
  76. ('New Menu' != item.label) ?>
  77. onclick="return SwitchMenu('<?lsmb item.id ?>')"
  78. <?lsmb END ?>
  79. id = "a_<?lsmb item.id ?>"
  80. ><?lsmb text(item.label) ?></a>
  81. <?lsmb IF item.menu && (item.label != 'New Window') ?>
  82. <ul id="sub_<?lsmb item.id ?>" class="submenu">
  83. <?lsmb END ?>
  84. <?lsmb END ?>
  85. <?lsmb WHILE 0 < old_level ?>
  86. </li></ul><?lsmb old_level = old_level - 1 ?>
  87. <?lsmb END ?>
  88. </body>
  89. </html>