From 3cef9bac26e55a5c7ba356f3ce798111a1dbfeb9 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 7 Oct 2020 15:02:12 +0200 Subject: [PATCH] Restrict collapsed days to large numbers --- src/pretix/static/pretixpresale/js/ui/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pretix/static/pretixpresale/js/ui/main.js b/src/pretix/static/pretixpresale/js/ui/main.js index e89021c2c..cb305f1b0 100644 --- a/src/pretix/static/pretixpresale/js/ui/main.js +++ b/src/pretix/static/pretixpresale/js/ui/main.js @@ -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); });