Restrict collapsed days to large numbers

This commit is contained in:
Raphael Michel
2020-10-07 15:02:12 +02:00
parent 4f20849e4b
commit 3cef9bac26

View File

@@ -440,8 +440,8 @@ $(function () {
});
// Week calendar
// On mobile, auto-collapse all days except today
if ($(window).width() < 992) {
// On mobile, auto-collapse all days except today, if we have more than 15 events in total
if ($(window).width() < 992 && $(".week-calendar .event").length > 15) {
$(".week-calendar .weekday:not(.today)").each(function () {
$(this).prop("open", false);
});