summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/templates
diff options
context:
space:
mode:
authorUdo Walter2020-01-15 19:13:50 +0100
committerUdo Walter2020-01-15 19:13:50 +0100
commitb2b8f003128f3c0059d6907962e6e96a48249310 (patch)
treeb16d9bf26331e5762432315edca28a51edb2230f /modules-available/locationinfo/templates
parent[statistics_reporting] Add date range selection (diff)
downloadslx-admin-b2b8f003128f3c0059d6907962e6e96a48249310.tar.gz
slx-admin-b2b8f003128f3c0059d6907962e6e96a48249310.tar.xz
slx-admin-b2b8f003128f3c0059d6907962e6e96a48249310.zip
[locationinfo] better calendar event font size scaling
Diffstat (limited to 'modules-available/locationinfo/templates')
-rwxr-xr-xmodules-available/locationinfo/templates/frontend-default.html18
1 files 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});