From ed383e2562c6ecf219620f17f87eba3ddaf8d335 Mon Sep 17 00:00:00 2001 From: Christian Hofmaier Date: Tue, 22 Jan 2019 12:27:45 +0100 Subject: [locationinfo] some design rework - Change "free" to "open" - h/min display in summary - do not display colors of unused states in summary - change seatcounter to emDash when room has current event --- .../locationinfo/templates/frontend-default.html | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'modules-available/locationinfo/templates/frontend-default.html') diff --git a/modules-available/locationinfo/templates/frontend-default.html b/modules-available/locationinfo/templates/frontend-default.html index 4dee8ef7..cbb765d0 100755 --- a/modules-available/locationinfo/templates/frontend-default.html +++ b/modules-available/locationinfo/templates/frontend-default.html @@ -352,6 +352,7 @@ optional: {{lang_room}} {{lang_closed}} {{lang_free}} + {{lang_for}} {{lang_shortSun}} {{lang_shortMon}} {{lang_shortTue}} @@ -1151,7 +1152,7 @@ optional: */ function SetFreeSeats(room) { // if room has no allowed value, set text in the box to - - room.$.seatsCounter.text(room.freePcs >= 0 ? room.freePcs : '-'); + room.$.seatsCounter.text(room.freePcs >= 0 ? room.freePcs : '\u2014'); room.$.seatsCounter.data('state', JSON.stringify(room.state)); if (room.freePcs > 0 && room.state && room.state.free) { room.$.seatsBackground.css('background-color', '#250'); @@ -1174,8 +1175,6 @@ optional: var seats = room.freePcs; if (tmp.state === 'closed' || tmp.state === 'CalendarEvent' || tmp.state === 'Free') { newTime = GetTimeDiferenceAsString(tmp.end, MyDate(), globalConfig); - } else if (!same) { - newTime = ''; } if (tmp.state === "closed") { if (!same) newText = t("closed"); @@ -1183,16 +1182,14 @@ optional: if (!same) newText = tmp.title; // whilst event is running set freePcs to -, hopefully not breaking anything else with this room.freePcs = "-"; - } else if (tmp.state === "Free") { - if (!same) newText = t("free"); - } else if (tmp.state === "FreeNoEnd") { + } else if (tmp.state === "Free" || tmp.state === "FreeNoEnd") { if (!same) newText = t("free"); } if (newText !== false) { room.$.currentEvent.text(newText); } if (newTime !== false) { - room.$.currentRemain.text(newTime); + room.$.currentRemain.text(t("for") + " " +newTime); } if (room.lastFreeSeats !== seats || !same) { SetFreeSeats(room); -- cgit v1.2.3-55-g7522