Revision c5657fe8
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
bin/mozilla/menu.pl | ||
---|---|---|
103 | 103 |
my $menuitem = $menu->{$item}; |
104 | 104 |
my $label = apply { s/.*--// } $item; |
105 | 105 |
my $ml = apply { s/--.*// } $item; |
106 |
my $spacer = $nbsp x (($item =~ s/--/--/g) * 2);
|
|
106 |
my $spacer = "spacer" . (0 + $item =~ s/--/--/g);
|
|
107 | 107 |
my $label_icon = $level . "--" . $label . ".png"; |
108 | 108 |
|
109 | 109 |
next if $level && $item ne "$level--$label"; |
... | ... | |
132 | 132 |
label => $label, |
133 | 133 |
height => 24, |
134 | 134 |
class => 'menu', |
135 |
spacer => $spacer, |
|
135 | 136 |
subitems => section_menu($menu, $item) |
136 | 137 |
); |
137 | 138 |
} elsif ($menuitem->{submenu}) { |
... | ... | |
165 | 166 |
|
166 | 167 |
return { |
167 | 168 |
%params, |
168 |
chunks => [ multiline($params{label}) ], |
|
169 |
# chunks => [ multiline($params{label}) ],
|
|
169 | 170 |
}; |
170 | 171 |
} |
171 | 172 |
|
... | ... | |
206 | 207 |
src => $icon_found ? _icon_path($icon, $size) : "image/unterpunkt.png", |
207 | 208 |
alt => $params{label}, |
208 | 209 |
width => $icon_found ? $size : 24, |
209 |
height => $size,
|
|
210 |
height => $icon_found ? $size : 15,
|
|
210 | 211 |
} |
211 | 212 |
} |
212 | 213 |
|
css/lx-office-erp/menu.css | ||
---|---|---|
291 | 291 |
/* End of non-anchor hover selectors */ |
292 | 292 |
|
293 | 293 |
|
294 |
#html-menu { float:left; white-space: nowrap; }
|
|
294 |
#html-menu { float:left; } |
|
295 | 295 |
#html-menu tr { vertical-align: top; } |
296 |
#html-menu div.menuitem { padding: 2px 4px 1px 4px; }
|
|
296 |
#html-menu div.menuitem { padding: 2px 0px 2px 0px; white-space: nowrap; }
|
|
297 | 297 |
#html-menu div.submenu { font-weight: bold } |
298 |
#html-menu img { vertical-align: middle; visibility:hidden; border: 0; } |
|
299 |
#html-menu div.menuitemchunk:first-child img { visibility:visible } |
|
298 |
#html-menu img { vertical-align: middle; border: 0; } |
|
300 | 299 |
#html-menu a { vertical-align: top } |
301 | 300 |
#html-menu .item span.menu-spacer { display: inline-block; width: 24px } |
302 |
#html-menu .menu span.menu-spacer { display: inline-block; width: 32px } |
|
303 |
#html-menu div.menu div.menuitemchunk { color:blue;} |
|
304 |
#html-menu div.menu div.menuitemchunk:hover { color:blue; background-color: lemonchiffon; cursor: pointer; } |
|
301 |
#html-menu .menu span.menu-spacer { display: inline-block; width: 28px } |
|
302 |
#html-menu div.menu span.menuitemchunk { color:blue; } |
|
303 |
#html-menu div.menu span.menuitemchunk:hover { color:blue; background-color: lemonchiffon; cursor: pointer; } |
|
304 |
#html-menu span.menuitemchunk { white-space: normal; } |
|
305 |
#html-menu .spacer0 { position:relative; left: 2px } |
|
306 |
#html-menu .spacer1 { position:relative; left: 6px } |
|
307 |
#html-menu .spacer2 { position:relative; left: 12px } |
|
308 |
|
|
305 | 309 |
|
templates/webpages/menu/menu.html | ||
---|---|---|
2 | 2 |
<body class="menu"> |
3 | 3 |
|
4 | 4 |
<div id='html-menu'> |
5 |
[% INCLUDE sections %]
|
|
5 |
[% PROCESS sections %]
|
|
6 | 6 |
</div> |
7 | 7 |
<script type='text/javascript'> |
8 | 8 |
$(function(){ |
... | ... | |
19 | 19 |
</html> |
20 | 20 |
[%- BLOCK sections %] |
21 | 21 |
[%- FOREACH item IN sections %] |
22 |
<div class='menu-multiline'> |
|
23 |
[% SET menuouterloopcount = loop.count %] |
|
24 |
<div id='menuitem[% menulevel %]_[% menuouterloopcount %]' class='menuitem [% item.class %] hover'> |
|
25 |
[%- FOREACH chunk IN item.chunks %] |
|
26 |
<div class='menuitemchunk hover'>[% PROCESS item %]</div> |
|
27 |
[%- END %] |
|
28 |
</div> |
|
29 |
[%- IF item.subitems.size %] |
|
30 |
<div id='menuitem[% menulevel %]_[% loop.count %]_submenu' class='menu-submenu[% menulevel %]'> |
|
31 |
[% INCLUDE sections sections=item.subitems, menulevel= menulevel _ '_' _ loop.count %] |
|
32 |
</div> |
|
33 |
[%- END %] |
|
34 |
</div> |
|
35 |
[%- END %] |
|
36 |
[%- END %] |
|
37 |
[%- BLOCK item %] |
|
38 |
[% item.spacer %] |
|
22 |
<div id='menuitem[% menulevel %]_[% loop.count %]' class='menuitem menuitemchunk [% item.spacer %] [% item.class %] hover'> |
|
39 | 23 |
[%- IF item.href %] |
40 |
[% L.link(item.href, L.html_tag('span', L.img_tag(item.img), class='menu-spacer') _ chunk, class='menu-link', target=item.target) %]
|
|
24 |
<a href="[% item.href | html %]" class='menu-link' target='[% item.target %]'><span class="menuitemicon menu-spacer">[% L.img_tag(item.img) %]</span><span class='menuitemchunk hover'>[% item.label %]</span></a>
|
|
41 | 25 |
[%- ELSE %] |
42 |
[% L.html_tag('span', L.img_tag(item.img), class='menu-spacer') _ chunk %]
|
|
26 |
<span class="menuitemicon menu-spacer">[% L.img_tag(item.img) %]</span><span class='menuitemchunk hover'>[% item.label %]</span>
|
|
43 | 27 |
[%- END %] |
28 |
</div> |
|
29 |
[%- IF item.subitems.size %] |
|
30 |
<div id='menuitem[% menulevel %]_[% loop.count %]_submenu' class='menu-submenu[% menulevel %]'> |
|
31 |
[% INCLUDE sections sections=item.subitems, menulevel= menulevel _ '_' _ loop.count %] |
|
32 |
</div> |
|
33 |
[%- END %] |
|
44 | 34 |
[%- END %] |
35 |
[%- END %] |
Auch abrufbar als: Unified diff
dom objekte reduziert, spacer entfernt, rendering auf 150ms beschleunigt