X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fmenu.pl;h=a8b46973ac8d8e4e032fbb3637d544f57ee3fc87;hb=224af4c2a3bec656a5a09a4cbc40831d5cda2526;hp=121f8b4a468ff20deb514a96a661fd10dd0ac273;hpb=5cf977e52788c523150fa19225b90914e6ddc909;p=kivitendo-erp.git diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl index 121f8b4a4..a8b46973a 100644 --- a/bin/mozilla/menu.pl +++ b/bin/mozilla/menu.pl @@ -38,6 +38,7 @@ $menufile = "menu.ini"; use SL::Menu; use Data::Dumper; +use URI; 1; @@ -48,14 +49,18 @@ $framesize = ($ENV{HTTP_USER_AGENT} =~ /links/i) ? "240" : "190"; sub display { $lxdebug->enter_sub(); + my $callback = $form->unescape($form->{callback}); + $callback = URI->new($callback)->rel($callback) if $callback; + $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; + $form->header; print qq| - + - - + + You need a browser that can read frames to see this page. @@ -115,9 +120,9 @@ sub section_menu { $label_icon = $label . ".gif"; $mlab = $label; $label = $locale->text($label); - + # multi line hack, sschoeling jul06 - # if a label is too long, try to split it at whitespaces, then join it to chunks of less + # if a label is too long, try to split it at whitespaces, then join it to chunks of less # than 20 chars and store it in an array. # use this array later instead of the &nbsp;-ed label @chunks = (); @@ -125,9 +130,10 @@ sub section_menu { map { if (($l += length $_) < 20) { $chunks[$i] .= " $_"; - } else { - $l = length $_; - $chunks[++$i] = $_; + } else { + $l = length $_; + $chunks[++$i] = $_; + } } split / /, $label; map { s/ /&nbsp;/ } @chunks; @@ -198,7 +204,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?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_" class="nohover">$label</a>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>\n|; &section_menu($menu, $item); #print qq|<br>\n|;