From ec067a042714376aea82225b85a8f1faa4a3388d Mon Sep 17 00:00:00 2001 From: Claudio Maggioni Date: Wed, 23 Sep 2020 09:39:04 +0200 Subject: [PATCH] Added timespan even on overflow slots --- app.js | 5 +++-- index.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index ed87c1e..7065ffb 100644 --- a/app.js +++ b/app.js @@ -115,8 +115,9 @@ function colorRoom(roomTitle, node, time = NOW /* QuantumLeap */) { block.className += isFree ? " room-free" : currentLecture.title === "Unassigned" ? " room-unassigned" : " room-in-use"; - block.querySelector('p').innerHTML = isFree ? 'Free (overflow)' : - (currentLecture ? currentLecture.title : "Unassigned") + + const title = isFree ? "Free (overflow)" : currentLecture.title; + + block.querySelector('p').innerHTML = title + "
(" + formatTime(currentLecture.start) + " - " + formatTime(currentLecture.end) + ")"; } diff --git a/index.html b/index.html index fbc53fa..680d81c 100644 --- a/index.html +++ b/index.html @@ -98,6 +98,6 @@ homework) - +