From f7a9b84943544e8a24cf5ead40e2fd04b63ab210 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 21 Nov 2024 09:36:31 +0000 Subject: mod cal: if a day is provided default to week view except the date has a ! prepended --- view/tpl/cal_calendar.tpl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/view/tpl/cal_calendar.tpl b/view/tpl/cal_calendar.tpl index 2e1699f1c..f120f9f80 100644 --- a/view/tpl/cal_calendar.tpl +++ b/view/tpl/cal_calendar.tpl @@ -41,15 +41,17 @@ $(document).ready(function() { if (fragment) { switch (fragment.length) { - // this might have performance issues - // case 4: - // view = 'multiMonthYear'; - // break; case 7: view = 'dayGridMonth'; break; case 10: - view = 'timeGridDay'; + view = 'timeGridWeek'; + break; + case 11: + if (fragment[0] === '!') { + fragment = fragment.substring(1); + view = 'timeGridDay'; + } break; default: view = 'dayGridMonth'; -- cgit v1.2.3