Revision e2802668
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
templates/webpages/menu/menu.html | ||
---|---|---|
19 | 19 |
</html> |
20 | 20 |
[%- BLOCK sections %] |
21 | 21 |
[%- FOREACH item IN sections %] |
22 |
<div class='menu-multiline'>
|
|
23 |
[% SET menuouterloopcount = loop.count %]
|
|
22 |
<div class='menu-multiline'> |
|
23 |
[% SET menuouterloopcount = loop.count %] |
|
24 | 24 |
[%- FOREACH chunk IN item.chunks %] |
25 |
<div id='menuitem[% menulevel %]_[% menuouterloopcount %]' class='menuitem [% item.class %] hover'>[% PROCESS item %]</div>
|
|
25 |
<div id='menuitem[% menulevel %]_[% menuouterloopcount %]' class='menuitem [% item.class %] hover'>[% PROCESS item %]</div> |
|
26 | 26 |
[%- END %] |
27 |
[%- IF item.subitems.size %] |
|
28 |
<div id='menuitem[% menulevel %]_[% loop.count %]_submenu'> |
|
29 |
[% INCLUDE sections sections=item.subitems, menulevel='_'+loop.count %] |
|
30 |
</div> |
|
31 |
[%- END %] |
|
27 |
[%- IF item.subitems.size %] |
|
28 |
<div id='menuitem[% menulevel %]_[% loop.count %]_submenu' class='menu-submenu[% menulevel %]'> |
|
29 |
[% INCLUDE sections sections=item.subitems, menulevel='_'+loop.count %] |
|
32 | 30 |
</div> |
31 |
[%- END %] |
|
32 |
</div> |
|
33 | 33 |
[%- END %] |
34 | 34 |
[%- END %] |
35 | 35 |
[%- BLOCK item %] |
... | ... | |
45 | 45 |
|
46 | 46 |
<script type='text/javascript'> |
47 | 47 |
$(function(){ |
48 |
$('#html-menu div[id$=submenu]').hide();
|
|
49 |
$('#html-menu div.menu').each(function() { |
|
48 |
$('#html-menu div.menu-submenu').hide();
|
|
49 |
$('#html-menu div.menu, #html-menu div.submenu').each(function() {
|
|
50 | 50 |
$(this).click(function(){ |
51 |
$('#html-menu div.menu-submenu').not('#' + $(this).attr('id') + '_submenu').hide(); |
|
51 | 52 |
$('#' + $(this).attr('id') + '_submenu').toggle(); |
52 | 53 |
}); |
53 | 54 |
}); |
Auch abrufbar als: Unified diff
javascripte gefixt, und die korrekten klassen ausgeblendet