From: Sven Schöling Date: Tue, 21 Feb 2012 17:06:40 +0000 (+0100) Subject: Icons im Javascriptmenü X-Git-Tag: release-2.7.0rc1~9 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7e161f1f2c66ebe4163635515a8edcde71040589;p=kivitendo-erp.git Icons im Javascriptmenü --- diff --git a/bin/mozilla/menunew.pl b/bin/mozilla/menunew.pl index 6b4f97175..751164e6c 100644 --- a/bin/mozilla/menunew.pl +++ b/bin/mozilla/menunew.pl @@ -137,10 +137,21 @@ sub create_menu { if ($menu_item->{submenu} || !defined($menu_item->{module}) || ($menu_item->{module} eq "menu.pl")) { $item->{subitems} = []; + $item->{image} = _icon_path("$name.png"); create_menu($menu, $item->{subitems}, "${parent}${name}", $depth * 1 + 1); } else { + $item->{image} = _icon_path("${parent}${name}.png"); $menu->menuitem_new("${parent}${name}", $item); } } } + +sub _icon_path { + my ($label, $size) = @_; + + $size ||= 16; + + return "image/icons/${size}x${size}/$label"; +} + diff --git a/templates/webpages/menu/menunew.html b/templates/webpages/menu/menunew.html index c402f1bf6..164533990 100644 --- a/templates/webpages/menu/menunew.html +++ b/templates/webpages/menu/menunew.html @@ -38,7 +38,7 @@ window.onload=clockon