X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fmenu.pl;h=fe2c731da6f7116ff0e2891b7bc680c336633ac8;hb=0925bc9f366038b578167a1837098ebe837012c1;hp=c51596dbb02573602c019e2c615dd33ce9596b60;hpb=54e4131e091831e00a861fe2c4f53e344b87ddca;p=kivitendo-erp.git diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl index c51596dbb..fe2c731da 100644 --- a/bin/mozilla/menu.pl +++ b/bin/mozilla/menu.pl @@ -52,10 +52,10 @@ sub display { print qq| - + - - + + You need a browser that can read frames to see this page. @@ -72,9 +72,6 @@ sub acc_menu { $mainlevel = $form->{level}; $mainlevel =~ s/$mainlevel--//g; my $menu = new Menu "$menufile"; - $menu = new Menu "custom_$menufile" if (-f "custom_$menufile"); - $menu = new Menu "$form->{login}_$menufile" - if (-f "$form->{login}_$menufile"); $form->{title} = $locale->text('Accounting Menu'); @@ -124,13 +121,16 @@ sub section_menu { # than 20 chars and store it in an array. # use this array later instead of the &nbsp;-ed label @chunks = (); - my ($i,$l) =(-1, 20); + my ($i,$l) = (-1, 20); map { - $l += length $_; - if ($l < 20) { $chunks[$i] .= " $_"; - } else { $l =length $_; $chunks[++$i] = $_; } + if (($l += length $_) < 20) { + $chunks[$i] .= " $_"; + } else { + $l = length $_; + $chunks[++$i] = $_; + } } split / /, $label; - map { $chunks[$_] =~ s/ /&nbsp;/ } 0..$#chunks; + map { s/ /&nbsp;/ } @chunks; # end multi line $label =~ s/ /&nbsp;/g; @@ -198,7 +198,7 @@ sub section_menu { } else { my $ml_ = $form->escape($ml); print - qq|<tr><td class="bg" height="22" align="left" valign="middle" ><img src="image/$item.png" style="vertical-align:middle">&nbsp;<a href="menu.pl?path=bin/mozilla&action=acc_menu&level=$ml_&login=$form->{login}&password=$form->{password}" class="nohover">$label</a>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>\n|; + qq|<tr><td class="bg" height="22" align="left" valign="middle" ><img src="image/$item.png" style="vertical-align:middle">&nbsp;<a href="menu.pl?action=acc_menu&level=$ml_&login=$form->{login}&password=$form->{password}" class="nohover">$label</a>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>\n|; &section_menu($menu, $item); #print qq|<br>\n|;