diff options
author | Michael Scherle | 2017-01-19 14:23:31 +0100 |
---|---|---|
committer | Michael Scherle | 2017-01-19 14:23:31 +0100 |
commit | 6b3aff17067e9a3bc2f645cbd03d9240a8d9796e (patch) | |
tree | 74b701f82329c0e3f785756757f585ffc1fc1c83 /modules-available/locationinfo/frontend | |
parent | frontend: fixed missing defect pc images, fixe the pc's without coords got an... (diff) | |
download | slx-admin-6b3aff17067e9a3bc2f645cbd03d9240a8d9796e.tar.gz slx-admin-6b3aff17067e9a3bc2f645cbd03d9240a8d9796e.tar.xz slx-admin-6b3aff17067e9a3bc2f645cbd03d9240a8d9796e.zip |
frontend: fixed not showing free pc ount sometimes
Diffstat (limited to 'modules-available/locationinfo/frontend')
-rwxr-xr-x | modules-available/locationinfo/frontend/doorsign.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules-available/locationinfo/frontend/doorsign.html b/modules-available/locationinfo/frontend/doorsign.html index 28c1e2db..a24462aa 100755 --- a/modules-available/locationinfo/frontend/doorsign.html +++ b/modules-available/locationinfo/frontend/doorsign.html @@ -861,6 +861,7 @@ optional: function Update() {
var tmp = GetState();
+
if (tmp == null) {
ComputeCurrentState();
return;
@@ -873,8 +874,10 @@ optional: SetFreeSeats(-1);
} else if (tmp.state == "Free") {
$("#courseHeading").text(t("free") + " " + GetTimeDiferenceAsString(tmp.end, new MyDate()));
+ SetFreeSeats(currentfreePcs);
} else if (tmp.state == "FreeNoEnd") {
$("#courseHeading").text(t("free"));
+ SetFreeSeats(currentfreePcs);
}
var now = new MyDate();
//console.log(now.getHours()+":"+now.getMinutes()+":"+now.getSeconds());
@@ -985,6 +988,7 @@ optional: var minX;
var xDifference;
var yDifference;
+ var currentfreePcs = 0;
function generateRoomLayoutDiv(width) {
var div = document.createElement("div");
@@ -1187,7 +1191,7 @@ optional: }
}
if (state == null || state.state == "FreeNoEnd" || state.state == "Free") {
- SetFreeSeats(freePcs);
+ currentfreePcs = freePcs;
}
}
|