X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fmenuv3.pl;h=121d76df073a4d4489694d9bfa3851f3dc8e06da;hb=5bafcdd75fe8da638a141cfd42e3cd450a675cd2;hp=c2fef5df45522b04054197d5cbbcc95f35f519ee;hpb=f373f98d676d433b7db20e3e74435a34029cac0f;p=kivitendo-erp.git
diff --git a/bin/mozilla/menuv3.pl b/bin/mozilla/menuv3.pl
index c2fef5df4..121d76df0 100644
--- a/bin/mozilla/menuv3.pl
+++ b/bin/mozilla/menuv3.pl
@@ -32,18 +32,26 @@
#
#######################################################################
-$menufile = "menu.ini";
use SL::Menu;
+use URI;
+
+use strict;
1;
# end of main
sub display {
- $form->header(qq||);
+ my $form = $main::form;
+
+ $form->header(extra_code => qq||);
- $form->{date} = clock_line();
- $form->{menu} = acc_menu();
+ $form->{date} = clock_line();
+ $form->{menu} = acc_menu();
+ my $callback = $form->unescape($form->{callback});
+ $callback = URI->new($callback)->rel($callback) if $callback;
+ $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/;
+ $form->{callback} = $callback;
print $form->parse_html_template("menu/menuv3");
@@ -72,11 +80,12 @@ sub clock_line {
}
sub acc_menu {
- $locale = Locale->new($language, "menu");
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
- $mainlevel = $form->{level};
+ my $mainlevel = $form->{level};
$mainlevel =~ s/\Q$mainlevel\E--//g;
- my $menu = new Menu "$menufile";
+ my $menu = Menu->new("menu.ini");
$| = 1;
@@ -85,6 +94,10 @@ sub acc_menu {
sub print_menu {
my ($menu, $parent, $depth) = @_;
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+
my $html;
die if ($depth * 1 > 5);
@@ -100,7 +113,7 @@ sub print_menu {
next if (($item eq "") || ($item =~ /--/));
my $menu_item = $menu->{"${parent}${item}"};
- my $menu_title = $locale->text($item);
+ my $menu_title = $::locale->text($item);
my $menu_text = $menu_title;
my $target = "main_window";