Hallo kpeter,
Du hast das Originaltemplate moo_accordion.xhtml verändert, indem Du "display: -1," eingefügt hast, um alle Akkordeons zuerst geschlossen darzustellen. Das abgeänderte Template ist im Backend über LAYOUT -> TEMPLATES zu erreichen.
Die mootools templates haben sich alle geändert, so dass Du das moo_accordion.xhtml neu erstellen und dann Deine Änderung im neuen Template ergänzen musst.
Bei mir sieht das so aus:
Code:
<script type="text/javascript">
/* <![CDATA[ */
(function() {
window.addEvent('domready', function() {
new Fx.Accordion($$('div.toggler'), $$('div.accordion'), {
opacity: false,
display: -1, // -1, alle Akkordeons sind am Anfang eingeklappt
alwaysHide: true,
onActive: function(tog, el) {
el.setProperty('aria-hidden', 'false');
tog.addClass('active');
tog.getNext('div').fade('in');
tog.setProperty('aria-expanded', 'true');
return false;
},
onBackground: function(tog, el) {
el.setProperty('aria-hidden', 'true');
tog.removeClass('active');
tog.getNext('div').fade('out');
tog.setProperty('aria-expanded', 'false');
return false;
}
});
$$('div.toggler').each(function(el) {
el.setProperty('role', 'tab');
el.setProperty('tabindex', 0);
el.addEvents({
'keypress': function(event) {
if (event.code == 13) {
this.fireEvent('click');
}
},
'focus': function() {
this.addClass('hover');
},
'blur': function() {
this.removeClass('hover');
},
'mouseenter': function() {
this.addClass('hover');
},
'mouseleave': function() {
this.removeClass('hover');
}
});
});
$$('div.ce_accordion').each(function(el) {
el.setProperty('role', 'tablist');
});
$$('div.accordion').each(function(el) {
el.setProperty('role', 'tabpanel');
});
});
})();
/* ]]> */
</script>
Bei der Mediabox wird es wohl ähnlich sein.
Peter
Lesezeichen