diff options
Diffstat (limited to 'sql-ledger/bin/mozilla/menu.pl')
-rw-r--r-- | sql-ledger/bin/mozilla/menu.pl | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/sql-ledger/bin/mozilla/menu.pl b/sql-ledger/bin/mozilla/menu.pl index 67c18bd54..fab2905e0 100644 --- a/sql-ledger/bin/mozilla/menu.pl +++ b/sql-ledger/bin/mozilla/menu.pl @@ -1,6 +1,6 @@ ###################################################################### # SQL-Ledger Accounting -# Copyright (c) 1998-2002 +# Copyright (c) 2001 # # Author: Dieter Simader # Email: dsimader@sql-ledger.org @@ -24,8 +24,6 @@ # # two frame layout with refractured menu # -# CHANGE LOG: -# DS. 2002-03-25 Created ####################################################################### $menufile = "menu.ini"; @@ -38,16 +36,17 @@ use SL::Menu; sub display { - $framesize = ($ENV{HTTP_USER_AGENT} =~ /links/i) ? "240" : "135"; + $menuwidth = ($ENV{HTTP_USER_AGENT} =~ /links/i) ? "240" : "155"; + $menuwidth = $myconfig{menuwidth} if $myconfig{menuwidth}; - $form->header; + $form->header(1); print qq| -<FRAMESET COLS="$framesize,*" BORDER="1"> +<FRAMESET COLS="$menuwidth,*" BORDER="1"> - <FRAME NAME="acc_menu" SRC="$form->{script}?login=$form->{login}&password=$form->{password}&action=acc_menu&path=$form->{path}"> - <FRAME NAME="main_window" SRC="login.pl?login=$form->{login}&password=$form->{password}&action=company_logo&path=$form->{path}"> + <FRAME NAME="acc_menu" SRC="$form->{script}?login=$form->{login}&sessionid=$form->{sessionid}&action=acc_menu&path=$form->{path}"> + <FRAME NAME="main_window" SRC="am.pl?login=$form->{login}&sessionid=$form->{sessionid}&action=company_logo&path=$form->{path}"> </FRAMESET> @@ -99,14 +98,15 @@ sub section_menu { $label =~ s/.*--//g; $label = $locale->text($label); - $label =~ s/ / /g; + $label =~ s/ / /g if $label !~ /<img /i; $menu->{$item}{target} = "main_window" unless $menu->{$item}{target}; if ($menu->{$item}{submenu}) { + $menu->{$item}{$item} = !$form->{$item}; - if ($form->{level} && $item =~ /^$form->{level}/) { + if ($form->{level} && $item =~ $form->{level}) { # expand menu print qq|<br>\n$spacer|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label</a>|; @@ -119,42 +119,40 @@ sub section_menu { print qq|<br>\n|; } else { - + print qq|<br>\n$spacer|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label ...</a>|; # remove same level items map { shift @menuorder } grep /^$item/, @menuorder; } - } else { if ($menu->{$item}{module}) { - if ($form->{$item} && $form->{level} eq $item) { - $menu->{$item}{$item} = !$form->{$item}; - print qq|<br>\n$spacer|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label</a>|; - - # remove same level items - map { shift @menuorder } grep /^$item/, @menuorder; - - §ion_menu($menu, $item); - - } else { - print qq|<br>\n$spacer|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label</a>|; - } + + print qq|<br>\n$spacer|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label</a>|; } else { - - print qq|<br><b>$label</b>|; + + $form->{tag}++; + print qq|<a name="id$form->{tag}"></a> + <p><b>$label</b>|; §ion_menu($menu, $item); print qq|<br>\n|; - + } } } } +sub menubar { + + 1; + +} + + |