From b2b8f003128f3c0059d6907962e6e96a48249310 Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Wed, 15 Jan 2020 19:13:50 +0100 Subject: [locationinfo] better calendar event font size scaling --- .../locationinfo/templates/frontend-default.html | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/modules-available/locationinfo/templates/frontend-default.html b/modules-available/locationinfo/templates/frontend-default.html index cad78586..029a29f7 100755 --- a/modules-available/locationinfo/templates/frontend-default.html +++ b/modules-available/locationinfo/templates/frontend-default.html @@ -1088,22 +1088,10 @@ optional: if (height < 30) { height = 30; } - var fontHeight = Math.min(height, columnWidth / 2.1); + // Scale calendar font - if (fontHeight > 120) { - $cal.weekCalendar("option", "textSize", 28); - } - else if (fontHeight > 100) { - $cal.weekCalendar("option", "textSize", 24); - } else if (fontHeight > 80) { - $cal.weekCalendar("option", "textSize", 22); - } else if (fontHeight > 70) { - $cal.weekCalendar("option", "textSize", 20); - } else if (fontHeight > 60) { - $cal.weekCalendar("option", "textSize", 14); - } else { - $cal.weekCalendar("option", "textSize", 13); - } + $cal.weekCalendar("option", "textSize", (columnWidth+height)/50+10); + $cal.weekCalendar("option", "timeslotHeight", height); if (room.timetable) { $cal.weekCalendar("option", "data", {events: room.timetable}); -- cgit v1.2.3-55-g7522