X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/9be43132dd533817fd9a76c80aed88c52502dcad..a56327d7da54b291ceb55af12e46757d3f8f05e4:/SL/Layout/MenuLeft.pm diff --git a/SL/Layout/MenuLeft.pm b/SL/Layout/MenuLeft.pm index 2f260c935..d740640c6 100644 --- a/SL/Layout/MenuLeft.pm +++ b/SL/Layout/MenuLeft.pm @@ -13,8 +13,9 @@ sub stylesheets { sub javascripts_inline { my $self = shift; + $self->SUPER::javascripts_inline; my $sections = [ section_menu($self->menu) ]; - $self->render('menu/menu', { partial => 1, no_output => 1 }, + $self->render('menu/menu', { output => 0 }, sections => $sections, ) } @@ -70,8 +71,6 @@ sub section_menu { $menuitem->{href} .= $::form->escape($value, 1); } - my $anchor = $menuitem->{href}; - my @common_args = ($label, $spacer, "$id_prefix\_$id"); if (!$level) { # toplevel @@ -83,7 +82,7 @@ sub section_menu { #make_image(label => 'submenu'), push @items, section_menu($menu, $item, "$id_prefix\_$id"); } elsif ($menuitem->{module}) { - push @items, [ @common_args, "icon16 $icon_class", 'i', $anchor ]; + push @items, [ @common_args, "icon16 $icon_class", 'i', $menuitem->{href}, $menuitem->{target} ]; #make_image(size => 16, label => $item), } } continue { @@ -129,6 +128,8 @@ Each entry is another array with the following fields: 2: unique id 3: icon classes 4: role classes + 5: href + 6: target From each entry the following dom will be generated, with [0] being entry 0 of the data array: