From: Sven Schöling Date: Fri, 14 Sep 2012 17:03:03 +0000 (+0200) Subject: menu auf arrays umgestellt X-Git-Tag: release-3.0.0beta1~168 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6fd839ca475e7bc845eeff171acf670c996ae3f9;p=kivitendo-erp.git menu auf arrays umgestellt --- diff --git a/SL/Controller/Layout/MenuLeft.pm b/SL/Controller/Layout/MenuLeft.pm index 9aa230fec..75c99e3b1 100644 --- a/SL/Controller/Layout/MenuLeft.pm +++ b/SL/Controller/Layout/MenuLeft.pm @@ -7,14 +7,6 @@ use URI; use List::MoreUtils qw(apply); -sub new { - my ($class, @slurp) = @_; - - my $self = $class->SUPER::new(@slurp); - - $self; -} - sub stylesheets { qw(css/icons16.css css/icons24.css) } @@ -73,30 +65,19 @@ sub section_menu { my $anchor = $menuitem->{href}; - my %common_args = ( - l => $label, - s => $spacer, - id => "$id_prefix\_$id", - ); + my @common_args = ($label, $spacer, "$id_prefix\_$id"); if (!$level) { # toplevel - push @items, { %common_args, - i => "icon24 $icon_class", # make_image(size => 24, label => $item), - c => 'm', - }; + push @items, [ @common_args, "icon24 $icon_class", 'm' ]; + # make_image(size => 24, label => $item), push @items, section_menu($menu, $item, "$id_prefix\_$id"); } elsif ($menuitem->{submenu}) { - push @items, { %common_args, - i => "icon16 submenu", #make_image(label => 'submenu'), - c => 'sm', - }; + push @items, [ @common_args, "icon16 submenu", 'sm' ]; + #make_image(label => 'submenu'), push @items, section_menu($menu, $item, "$id_prefix\_$id"); } elsif ($menuitem->{module}) { - push @items, { %common_args, - i => "icon16 $icon_class", #make_image(size => 16, label => $item), - h => $anchor, - c => 'i', - }; + push @items, [ @common_args, "icon16 $icon_class", 'i', $anchor ]; + #make_image(size => 16, label => $item), } } continue { $id++; diff --git a/templates/webpages/menu/menu.html b/templates/webpages/menu/menu.html index ef9aa211d..385ad8105 100644 --- a/templates/webpages/menu/menu.html +++ b/templates/webpages/menu/menu.html @@ -1,2 +1,2 @@ [%- USE JSON %] -$(function(){$([% JSON.json(sections) %]).each(function(i,b){var a=$('').append($('').append($('
').addClass(b.i)),$('').append(b.l));if(b.h)a.attr('href', b.h);if(b.t)a.attr('target', b.t);$('#html-menu').append($('