Du musst noch den Code in das Template cal_default.html5 einfügen, der bei der Erweiterung für den Kalender erwähnt ist.
Code:
<script>
$(".calendar .head.previous a, .calendar .head.next a").click(function (event) {
var element;
// Get url of next/previous month
var $url = window.location.origin + '/' + $(this).attr('href');
// Don't follow the link
event.preventDefault();
// This is the element's div container like ".mod_my_module". "Allow ajax reload" has to be enabled for this module in the back end
element = $(this).closest('[class^="ce_"],[class^="mod_"]');
// Add a css class to this element. An overlay and spinning icon can be set via css.
element.addClass('ajax-reload-element-overlay');
$.ajax({
method: 'POST',
url: $url,
data: {
// The data- attribute is set automatically
ajax_reload_element: element.attr('data-ajax-reload-element')
}
})
.done(function (response, status, xhr) {
if ('ok' === response.status) {
// Replace the DOM
element.replaceWith(response.html);
} else {
// Reload the page as fallback
location.reload();
}
});
});
</script>