Revision ae2e9adf
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
templates/webpages/menu/menu.html | ||
---|---|---|
6 | 6 |
</div> |
7 | 7 |
<script type='text/javascript'> |
8 | 8 |
$(function(){ |
9 |
$('#html-menu div.menu-submenu').hide();
|
|
9 |
$('#html-menu div.item, #html-menu div.submenu').hide();
|
|
10 | 10 |
$('#html-menu div.menu').each(function() { |
11 | 11 |
$(this).click(function(){ |
12 |
$('#html-menu div.menu-submenu').not('#' + $(this).attr('id') + '_submenu').hide();
|
|
13 |
$('#' + $(this).attr('id') + '_submenu').toggle();
|
|
12 |
$('#html-menu div.mi').not('div.menu').not('[id^=' + $(this).attr('id') + '_]').hide();
|
|
13 |
$('#html-menu div.mi[id^=' + $(this).attr('id') + '_]').toggle();
|
|
14 | 14 |
}); |
15 | 15 |
}); |
16 | 16 |
}); |
... | ... | |
19 | 19 |
</html> |
20 | 20 |
[%- BLOCK sections %] |
21 | 21 |
[%- FOREACH item IN sections %] |
22 |
<div id='menuitem[% menulevel %]_[% loop.count %]' class='menuitem menuitemchunk [% item.spacer %] [% item.class %] hover'>
|
|
23 |
[%- IF item.href %]
|
|
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>
|
|
25 |
[%- ELSE %]
|
|
26 |
<span class="menuitemicon menu-spacer">[% L.img_tag(item.img) %]</span><span class='menuitemchunk hover'>[% item.label %]</span>
|
|
27 |
[%- END %]
|
|
22 |
<div id='mi[% menulevel %]_[% loop.count %]' class='mi [% item.spacer %] [% item.class %]'>
|
|
23 |
[%- IF item.href %] |
|
24 |
<a href="[% item.href | html %]" class='ml' target='[% item.target %]'><span class="mii ms">[% L.img_tag(item.img) %]</span><span class='mic'>[% item.label %]</span></a>
|
|
25 |
[%- ELSE %] |
|
26 |
<span class="mii ms">[% L.img_tag(item.img) %]</span><span class='mic'>[% item.label %]</span>
|
|
27 |
[%- END %] |
|
28 | 28 |
</div> |
29 | 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> |
|
30 |
[% INCLUDE sections sections=item.subitems, menulevel= menulevel _ '_' _ loop.count %] |
|
33 | 31 |
[%- END %] |
34 | 32 |
[%- END %] |
35 | 33 |
[%- END %] |
Auch abrufbar als: Unified diff
css gefixt, klassen minified, html reduziert