X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fmenu.pl;h=ae2d6b7462e40de32c9729ab19d344ee600ce211;hb=afed390f75f0dad7df9d5aa5fbdac8f3005c852e;hp=f6305dfb818339cb4ca5cba085e6337475f901f4;hpb=d2d63d80de28c7356e81eb1143d729e4415cd1b4;p=kivitendo-erp.git diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl index f6305dfb8..ae2d6b746 100644 --- a/bin/mozilla/menu.pl +++ b/bin/mozilla/menu.pl @@ -33,7 +33,7 @@ # CHANGE LOG: # DS. 2002-03-25 Created # 2004-12-14 - New Optik - Marco Welter -# 2010-08-19 - Icons for sub entries and one click +# 2010-08-19 - Icons for sub entries and single click behavior, unlike XUL-Menu # JS switchable HTML-menu - Sven Donath ####################################################################### @@ -45,19 +45,18 @@ use URI; my $menufile = "menu.ini"; my $mainlevel; -our $framesize; # end of main sub display { $main::lxdebug->enter_sub(); - my $form = $main::form; + my $form = $main::form; - my $callback = $form->unescape($form->{callback}); - $callback = URI->new($callback)->rel($callback) if $callback; - $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; - my $framesize = _calc_framesize(); + my $callback = $form->unescape($form->{callback}); + $callback = URI->new($callback)->rel($callback) if $callback; + $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; + my $framesize = _calc_framesize(); $form->header; @@ -83,7 +82,7 @@ sub acc_menu { my $form = $main::form; my $locale = $main::locale; - $framesize = _calc_framesize(); # how to get it into kopf.pl or vice versa? + my $framesize = _calc_framesize(); $mainlevel = $form->{level}; $mainlevel =~ s/\Q$mainlevel\E--//g; @@ -95,8 +94,8 @@ sub acc_menu { print qq| - -|; + +|; print qq|
\n\n|; @@ -116,9 +115,10 @@ sub section_menu { $main::lxdebug->enter_sub(); my ($menu, $level) = @_; - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; + my $form = $main::form; + my %myconfig = %main::myconfig; + my $locale = $main::locale; + my $is_not_links_browser = $ENV{HTTP_USER_AGENT} =~ /links/i ? 0 : 1; my $zeige; @@ -203,13 +203,13 @@ sub section_menu { qq|\n|; @@ -256,7 +256,7 @@ sub _calc_framesize { return $is_mobile_browser && $is_mobile_style ? 130 : $is_lynx_browser ? 240 - : 180; + : 200; } 1;
$spacer| . $menu->menuitem(\%myconfig, \%$form, $item, $level) ; - if (-f "image/icons/16x16/$label_icon" && ($framesize ne 240)) + if (-f "image/icons/16x16/$label_icon" && ($is_not_links_browser)) { print qq|  | } else { - if ($framesize ne 240) { + if ($is_not_links_browser) { print qq||; } } @@ -236,7 +236,7 @@ sub section_menu { print qq|
|; - if ($framesize ne 240) { + if ($is_not_links_browser) { print qq||; } print qq| $label