summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2020-11-04 13:31:33 +0100
committerSimon Rettberg2020-11-04 13:31:33 +0100
commit53d10a82fb07487f411c0c75dd0d58cc83610fbe (patch)
tree5f6fed7f2b2c60c5932186389d07a15b8a4e23b0
parent[locationinfo] "show hostname" cannot be overridden per location (diff)
downloadslx-admin-53d10a82fb07487f411c0c75dd0d58cc83610fbe.tar.gz
slx-admin-53d10a82fb07487f411c0c75dd0d58cc83610fbe.tar.xz
slx-admin-53d10a82fb07487f411c0c75dd0d58cc83610fbe.zip
[locationinfo] Allow seconds in prettytime mode, change eco mode text
Eco mode doesn't change any colors anymore currently, it merely lowers the update rate and hides seconds from the countdown.
-rw-r--r--modules-available/locationinfo/frontend/frontendscript.js3
-rw-r--r--modules-available/locationinfo/lang/de/template-tags.json2
-rw-r--r--modules-available/locationinfo/lang/en/template-tags.json2
-rwxr-xr-xmodules-available/locationinfo/templates/frontend-default.html3
4 files changed, 7 insertions, 3 deletions
diff --git a/modules-available/locationinfo/frontend/frontendscript.js b/modules-available/locationinfo/frontend/frontendscript.js
index efe4d5b6..f39f2be8 100644
--- a/modules-available/locationinfo/frontend/frontendscript.js
+++ b/modules-available/locationinfo/frontend/frontendscript.js
@@ -67,6 +67,9 @@ function GetTimeDiferenceAsString(a, b, globalConfig) {
str += hours + 'h ';
}
str += minutes + 'min ';
+ if (globalConfig && !globalConfig.eco) {
+ str += seconds + 's ';
+ }
return str;
}
diff --git a/modules-available/locationinfo/lang/de/template-tags.json b/modules-available/locationinfo/lang/de/template-tags.json
index 457f071c..1f781721 100644
--- a/modules-available/locationinfo/lang/de/template-tags.json
+++ b/modules-available/locationinfo/lang/de/template-tags.json
@@ -31,7 +31,7 @@
"lang_displayName": "Name",
"lang_displayNameTooltip": "Anzeigename f\u00fcr dieses Panel",
"lang_ecoMode": "E-Ink Modus",
- "lang_ecoTooltip": "Anstelle der Farb-basierten PC-Status Bilder, werden Symbol-basierte PC Bilder verwendet",
+ "lang_ecoTooltip": "Niedrigere Aktualisierungsrate, Countdown ohne Sekunden",
"lang_editDefaultPanelHints": "Hier k\u00f6nnen Sie ein Panel (z.B. digitales T\u00fcrschild) in Aussehen und Funktionsweise definieren. Um im Kalender \u00d6ffnungszeiten anzeigen zu k\u00f6nnen, m\u00fcssen Sie im Tab \"Raum-\/Ortsbezogene Einstellungen\" f\u00fcr den ausgew\u00e4hlten Raum entsprechend \u00d6ffnungszeiten eintragen. Damit im Kalender Veranstaltungen und andere Termine angezeigt werden k\u00f6nnen, muss ein funktionierendes Backend konfiguriert und den ausgew\u00e4hlten R\u00e4umen zugewiesen worden sein.",
"lang_editPanel": "Panel bearbeiten",
"lang_editSummaryPanelHints": "Hier k\u00f6nnen Sie ein \u00dcbersichts-Panel definieren. Das Panel zeigt eine \u00dcbersicht der in den R\u00e4umen enthalten PCs.",
diff --git a/modules-available/locationinfo/lang/en/template-tags.json b/modules-available/locationinfo/lang/en/template-tags.json
index 95e1b23f..5a87e42c 100644
--- a/modules-available/locationinfo/lang/en/template-tags.json
+++ b/modules-available/locationinfo/lang/en/template-tags.json
@@ -31,7 +31,7 @@
"lang_displayName": "Name",
"lang_displayNameTooltip": "Display name for this panel",
"lang_ecoMode": "E-Ink mode",
- "lang_ecoTooltip": "Symbolic based pc state pictures are used instead of the colour based ones",
+ "lang_ecoTooltip": "Lower update rate, countdown doesn't show seconds",
"lang_editDefaultPanelHints": "Here you can define panel properties for e.g. a digital door sign. To show opening times for a room you need to define corresponding times in the settings.\r\nIf you want to show calendar events you have to define a functioning backend first and link it to corresponding rooms.",
"lang_editPanel": "Edit panel",
"lang_editSummaryPanelHints": "Here you can define a summary panel which shows a overview of clients in your locations.",
diff --git a/modules-available/locationinfo/templates/frontend-default.html b/modules-available/locationinfo/templates/frontend-default.html
index 46b1b427..6e04550d 100755
--- a/modules-available/locationinfo/templates/frontend-default.html
+++ b/modules-available/locationinfo/templates/frontend-default.html
@@ -253,6 +253,7 @@ optional:
overflow: visible;
height: 0;
font-size: 10pt;
+ text-shadow: #000 1px 1px;
}
.BROKEN .screen-inner {
@@ -1208,7 +1209,7 @@ optional:
var newText = false, newTime = false;
var seats = room.freePcs;
if (tmp.state === 'closed' || tmp.state === 'CalendarEvent' || tmp.state === 'Free') {
- newTime = GetTimeDiferenceAsString(tmp.end, MyDate(), globalConfig);
+ newTime = GetTimeDiferenceAsString(tmp.end, MyDate(), room.config);
}
if (tmp.state === "closed") {
if (!same) newText = t("closed");