From: Sven Schöling Date: Fri, 31 Aug 2012 14:30:03 +0000 (+0200) Subject: img -> css scaling, muss aber noch gefixt werden X-Git-Tag: release-3.0.0beta1~213 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1a3569b9a81d6b9ca88941793926327051506122;p=kivitendo-erp.git img -> css scaling, muss aber noch gefixt werden --- diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl index 75f2bc44e..16d8b75ae 100644 --- a/bin/mozilla/menu.pl +++ b/bin/mozilla/menu.pl @@ -40,12 +40,10 @@ use strict; use SL::Menu; -use Data::Dumper; use URI; use List::MoreUtils qw(apply); -my $menufile = "menu.ini"; my $nbsp = ' '; my $mainlevel; @@ -140,7 +138,7 @@ sub section_menu { } elsif ($menuitem->{submenu}) { my $image = make_image(submenu => 1); if ($mainlevel && $item =~ /^\Q$mainlevel\E/) { - push @items, make_item(target => $menuitem->{target}, spacer => $spacer, bold => 1, img => $image, label => $label, class => 'submenu') if $show; + push @items, make_item(target => $menuitem->{target}, spacer => $spacer, img => $image, label => $label, class => 'submenu') if $show; push @items, section_menu($menu, $item); } else { push @items, make_item(spacer => $spacer, href => $anchor, img => $image, label => $label . ' ...', class => 'submenu') if $show; @@ -190,22 +188,23 @@ sub multiline { sub make_image { my (%params) = @_; - my $label = $params{label}; my $icon = $params{icon}; my $size = $params{size} || 16; return unless _show_images(); my $icon_found = $icon && -f _icon_path($icon, $size); - - my $image_url = $icon_found ? _icon_path($icon, $size) : "image/unterpunkt.png"; - my $width = $icon_found ? $size : 24; - - my $padding = $size == 16 && $icon_found ? $nbsp x 2 - : $size == 24 ? $nbsp - : ''; - - return "$label$padding"; + my $padding = $size == 16 && $icon_found ? $nbsp x 2 + : $size == 24 ? $nbsp + : ''; + + return { + src => $icon_found ? _icon_path($icon, $size) : "image/unterpunkt.png", + alt => $params{label}, + width => $icon_found ? $size : 24, + height => $size, + padding => $padding, + } } sub _calc_framesize { diff --git a/templates/webpages/menu/menu.html b/templates/webpages/menu/menu.html index 5e1c1c7db..25081d4f2 100644 --- a/templates/webpages/menu/menu.html +++ b/templates/webpages/menu/menu.html @@ -2,10 +2,9 @@ @@ -18,9 +17,9 @@ [%- FOREACH chunk IN item.chunks %] [%- END %]