diff options
4 files changed, 15 insertions, 11 deletions
diff --git a/modules-available/locationinfo/lang/de/template-tags.json b/modules-available/locationinfo/lang/de/template-tags.json index 03eb63a5..f9c7fad5 100644 --- a/modules-available/locationinfo/lang/de/template-tags.json +++ b/modules-available/locationinfo/lang/de/template-tags.json @@ -30,7 +30,8 @@ "lang_error": "Fehler", "lang_expertMode": "Expertenmodus", "lang_fourLocsHint": "Hier k\u00f6nnen Sie bis zu vier Orte ausw\u00e4hlen, die in diesem Panel angezeigt werden.", - "lang_free": "Frei", + "lang_free": "Geöffnet", + "lang_for": "für", "lang_general": "Allgemein", "lang_ignoreSslTooltip": "Akzeptiere ung\u00fcltige, abgelaufene oder selbstsignierte SSL-Zertifikate", "lang_insecureSsl": "Unsicheres SSL", diff --git a/modules-available/locationinfo/lang/en/template-tags.json b/modules-available/locationinfo/lang/en/template-tags.json index 1b5ab0fd..5bbe3775 100644 --- a/modules-available/locationinfo/lang/en/template-tags.json +++ b/modules-available/locationinfo/lang/en/template-tags.json @@ -30,7 +30,8 @@ "lang_error": "Error", "lang_expertMode": "Expert mode", "lang_fourLocsHint": "You can pick up to four locations that will be shown in this panel.", - "lang_free": "Free", + "lang_free": "Open", + "lang_for": "for", "lang_general": "General", "lang_ignoreSslTooltip": "Accept invalid, expired or self-signed ssl certificates", "lang_insecureSsl": "Insecure SSL", 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: <span data-tag="room">{{lang_room}}</span> <span data-tag="closed">{{lang_closed}}</span> <span data-tag="free">{{lang_free}}</span> + <span data-tag="for">{{lang_for}}</span> <span data-tag="shortSun">{{lang_shortSun}}</span> <span data-tag="shortMon">{{lang_shortMon}}</span> <span data-tag="shortTue">{{lang_shortTue}}</span> @@ -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); diff --git a/modules-available/locationinfo/templates/frontend-summary.html b/modules-available/locationinfo/templates/frontend-summary.html index 95299e63..ae089da5 100644 --- a/modules-available/locationinfo/templates/frontend-summary.html +++ b/modules-available/locationinfo/templates/frontend-summary.html @@ -63,7 +63,7 @@ } .pc-idle, .pc-occupied, .pc-offline, .pc-broken, .pc-standby { - padding: 2px 1px; + padding: 2px 0px; text-align: center; font-size: 90%; font-weight: 800; @@ -604,7 +604,11 @@ // TODO: Add seconds again with a better update rate. var time_split = time.split(":"); if (time != "") { - $("#div_Time_" + id).text(time_split[0] + ":" + time_split[1]); + if (time_split[0] > 0) { + $("#div_Time_" + id).text(t("for") + " " + time_split[0] + "h " + time_split[1]+"min"); + } else { + $("#div_Time_" + id).text(t("for") + " " + time_split[1]+"min"); + } } else { $("#div_Time_" + id).text(time); } @@ -759,6 +763,7 @@ <span data-tag="room">{{lang_room}}</span> <span data-tag="closed">{{lang_closed}}</span> <span data-tag="free">{{lang_free}}</span> + <span data-tag="for">{{lang_for}}</span> <span data-tag="shortSun">{{lang_shortSun}}</span> <span data-tag="shortMon">{{lang_shortMon}}</span> <span data-tag="shortTue">{{lang_shortTue}}</span> |