X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fmenujs.pl;h=3ab3cf738b7ee32be0ca9556dc5be3d086bf825a;hb=32fa27cee3f69042ee74e8efecf1f4396ea5c7bb;hp=b948ef207f3557ea664b8ac7c3cbaa6817673c5d;hpb=45b3691bef2282b7894b4eb56b8b35368a475ced;p=kivitendo-erp.git
diff --git a/bin/mozilla/menujs.pl b/bin/mozilla/menujs.pl
index b948ef207..3ab3cf738 100644
--- a/bin/mozilla/menujs.pl
+++ b/bin/mozilla/menujs.pl
@@ -35,7 +35,9 @@
# 2004-12-14 - Holger Lindemann
#######################################################################
-$menufile = "menu.ini";
+use utf8;
+use strict;
+
use SL::Menu;
use CGI::Carp qw(fatalsToBrowser);
@@ -44,6 +46,9 @@ use CGI::Carp qw(fatalsToBrowser);
# end of main
sub display {
+
+ my $form = $main::form;
+
$form->{callback} = $form->unescape($form->{callback});
$form->{callback} ||= "login.pl?action=company_logo";
@@ -67,13 +72,15 @@ sub display {
sub clock_line {
- $fensterlink="menujs.pl?action=display";
- $fenster = "["."neues Fenster]";
+ my $form = $main::form;
- $login = "[Nutzer "
+ my $fensterlink="menujs.pl?action=display";
+ my $fenster = "["."neues Fenster]";
+
+ my $login = "[Nutzer "
. $form->{login}
. " - "
- . $locale->text('Logout')
+ . $::locale->text('Logout')
. "] ";
my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat,
$Jahr, $Wochentag, $Jahrestag, $Sommerzeit)
@@ -90,14 +97,14 @@ sub clock_line {
"April", "Mai", "Juni", "Juli",
"August", "September", "Oktober", "November",
"Dezember");
- $datum =
+ my $datum =
$Wochentage[$Wochentag] . ", der "
. $Monatstag . "."
. $Monat . "."
. $Jahr . " - ";
#$zeit="
".$Stunden.":".$Minuten.":".$Sekunden."
";
- $zeit = "" . $Stunden . ":" . $Minuten . "
";
+ my $zeit = "" . $Stunden . ":" . $Minuten . "
";
print qq|
@@ -361,19 +371,23 @@ function moveRoot() {
sub section_menu {
my ($menu, $level) = @_;
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+
# build tiered menus
my @menuorder = $menu->access_control(\%myconfig, $level);
- $main = 0;
+ my $main = 0;
#$pm=0;
- $shlp=0;
+ my $shlp=0;
+ my (%mlz, $sm, $z, $pm, $mm);
while (@menuorder) {
- $item = shift @menuorder;
- $label = $item;
- $ml = $item;
+ my $item = shift @menuorder;
+ my $label = $item;
+ my $ml = $item;
$label =~ s/$level--//g;
$ml =~ s/--.*//;
- $label = $locale->text($label);
+ $label = $::locale->text($label);
$label =~ s/ / /g;
$menu->{$item}{target} = "main_window" unless $menu->{$item}{target};
@@ -382,11 +396,11 @@ sub section_menu {
# Untermen
if ($mlz{"s$ml"} > 1) {
- $z++;
- $sm = 1;
+ $z++;
+ $sm = 1;
} else {
- $z = $sm;
- $mlz{"s$ml"}++;
+ $z = $sm;
+ $mlz{"s$ml"}++;
}
print
qq|menu[$mlz{$ml}][$z] = new Item('$label', '#', '', defLength, 0, |
@@ -402,9 +416,9 @@ sub section_menu {
} else {
if ($menu->{$item}{module}) {
- #Untermenüpunkte
- $target = $menu->{$item}{target};
- $uri = $menu->menuitem_js(\%myconfig, \%$form, $item, $level);
+ #Untermenüpunkte
+ my $target = $menu->{$item}{target};
+ my $uri = $menu->menuitem_js(\%myconfig, \%$form, $item, $level);
print
qq|menu[$pm][$sm] = new Item('$label', '$uri', '$target', defLength, 0, 0);\n|;
@@ -416,9 +430,9 @@ sub section_menu {
%mlz = ($ml, $pm, "s$ml", 1);
$shlp = $sm;
$sm = 1;
- $breit = 15 + length($label) * 6;
+ my $breit = 15 + length($label) * 6;
print
- qq|menu[0][$mm] = new Item(' $label', '#', '', $breit, 10, $pm); \n|;
+ qq|menu[0][$mm] = new Item(' $label', '#', '', $breit, 10, $pm); \n|;
print qq|menu[$pm] = new Array();\n|;
print
qq|menu[$pm][0] = new Menu(true, '>', 0, 20, 180, defOver, defBack, 'itemBorder', 'itemText');\n|;