From: Sven Schöling Date: Tue, 4 Sep 2012 12:11:20 +0000 (+0200) Subject: dom objekte reduziert, spacer entfernt, rendering auf 150ms beschleunigt X-Git-Tag: release-3.0.0beta1~203 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c5657fe89f6eb75d36c126a11017439bd9d24895;p=kivitendo-erp.git dom objekte reduziert, spacer entfernt, rendering auf 150ms beschleunigt --- diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl index eb717077e..fd66bfac0 100644 --- a/bin/mozilla/menu.pl +++ b/bin/mozilla/menu.pl @@ -103,7 +103,7 @@ sub section_menu { my $menuitem = $menu->{$item}; my $label = apply { s/.*--// } $item; my $ml = apply { s/--.*// } $item; - my $spacer = $nbsp x (($item =~ s/--/--/g) * 2); + my $spacer = "spacer" . (0 + $item =~ s/--/--/g); my $label_icon = $level . "--" . $label . ".png"; next if $level && $item ne "$level--$label"; @@ -132,6 +132,7 @@ sub section_menu { label => $label, height => 24, class => 'menu', + spacer => $spacer, subitems => section_menu($menu, $item) ); } elsif ($menuitem->{submenu}) { @@ -165,7 +166,7 @@ sub make_item { return { %params, - chunks => [ multiline($params{label}) ], +# chunks => [ multiline($params{label}) ], }; } @@ -206,7 +207,7 @@ sub make_image { src => $icon_found ? _icon_path($icon, $size) : "image/unterpunkt.png", alt => $params{label}, width => $icon_found ? $size : 24, - height => $size, + height => $icon_found ? $size : 15, } } diff --git a/css/lx-office-erp/menu.css b/css/lx-office-erp/menu.css index e57a6e32e..b81f4229b 100644 --- a/css/lx-office-erp/menu.css +++ b/css/lx-office-erp/menu.css @@ -291,15 +291,19 @@ div#menuv4 li li li li:hover ul /* End of non-anchor hover selectors */ -#html-menu { float:left; white-space: nowrap; } +#html-menu { float:left; } #html-menu tr { vertical-align: top; } -#html-menu div.menuitem { padding: 2px 4px 1px 4px; } +#html-menu div.menuitem { padding: 2px 0px 2px 0px; white-space: nowrap; } #html-menu div.submenu { font-weight: bold } -#html-menu img { vertical-align: middle; visibility:hidden; border: 0; } -#html-menu div.menuitemchunk:first-child img { visibility:visible } +#html-menu img { vertical-align: middle; border: 0; } #html-menu a { vertical-align: top } #html-menu .item span.menu-spacer { display: inline-block; width: 24px } -#html-menu .menu span.menu-spacer { display: inline-block; width: 32px } -#html-menu div.menu div.menuitemchunk { color:blue;} -#html-menu div.menu div.menuitemchunk:hover { color:blue; background-color: lemonchiffon; cursor: pointer; } +#html-menu .menu span.menu-spacer { display: inline-block; width: 28px } +#html-menu div.menu span.menuitemchunk { color:blue; } +#html-menu div.menu span.menuitemchunk:hover { color:blue; background-color: lemonchiffon; cursor: pointer; } +#html-menu span.menuitemchunk { white-space: normal; } +#html-menu .spacer0 { position:relative; left: 2px } +#html-menu .spacer1 { position:relative; left: 6px } +#html-menu .spacer2 { position:relative; left: 12px } + diff --git a/templates/webpages/menu/menu.html b/templates/webpages/menu/menu.html index 0a36471fc..ce9cb284f 100644 --- a/templates/webpages/menu/menu.html +++ b/templates/webpages/menu/menu.html @@ -2,7 +2,7 @@
- [% INCLUDE sections %] + [% PROCESS sections %]