summaryrefslogtreecommitdiffstats
path: root/modules-available
diff options
context:
space:
mode:
authorMichael Scherle2017-01-19 13:09:40 +0100
committerMichael Scherle2017-01-19 13:09:40 +0100
commita71115812e886c16dde9c2895424c996c1195696 (patch)
tree6091a0fa778d20baf056d06873b9c456c98c4619 /modules-available
parent[locationinfo] Add missing column to query (diff)
downloadslx-admin-a71115812e886c16dde9c2895424c996c1195696.tar.gz
slx-admin-a71115812e886c16dde9c2895424c996c1195696.tar.xz
slx-admin-a71115812e886c16dde9c2895424c996c1195696.zip
frontend: fixed missing defect pc images, fixe the pc's without coords got an <img>, fixed: -Die img Tags bekommen die PC-UUID als element-id, wenn die mit ner Zahl anfängt dürfte das keine valide id sein.-
Diffstat (limited to 'modules-available')
-rwxr-xr-xmodules-available/locationinfo/frontend/doorsign.html27
1 files changed, 14 insertions, 13 deletions
diff --git a/modules-available/locationinfo/frontend/doorsign.html b/modules-available/locationinfo/frontend/doorsign.html
index 2b2ce50f..28c1e2db 100755
--- a/modules-available/locationinfo/frontend/doorsign.html
+++ b/modules-available/locationinfo/frontend/doorsign.html
@@ -1092,13 +1092,14 @@ optional:
function setUpRoom() {
for (var i = 0; i < Layout.length; i++) {
-
- var img = $('<img />',
- {
- id: Layout[i].id,
- class: "pcImg"
- })
- .appendTo($('#roomLayout'));
+ if (Layout[i].y != null && Layout[i].x != null) {
+ var img = $('<img />',
+ {
+ id: "layout_PC" + Layout[i].id,
+ class: "pcImg"
+ })
+ .appendTo($('#roomLayout'));
+ }
}
scaleRoom();
UpdatePc(Layout);
@@ -1142,10 +1143,10 @@ optional:
}
for (var i = 0; i < Layout.length; i++) {
if (Layout[i].y != null && Layout[i].x != null) {
- document.getElementById(Layout[i].id).width = (picSizeX * scale);
- document.getElementById(Layout[i].id).height = (picSizeY * scale);
- document.getElementById(Layout[i].id).style.left = ((parseInt(Layout[i].x) + xOffset) * scale) + "px";
- document.getElementById(Layout[i].id).style.top = ((parseInt(Layout[i].y) + yOffset) * scale ) + "px";
+ document.getElementById("layout_PC" + Layout[i].id).width = (picSizeX * scale);
+ document.getElementById("layout_PC" + Layout[i].id).height = (picSizeY * scale);
+ document.getElementById("layout_PC" + Layout[i].id).style.left = ((parseInt(Layout[i].x) + xOffset) * scale) + "px";
+ document.getElementById("layout_PC" + Layout[i].id).style.top = ((parseInt(Layout[i].y) + yOffset) * scale ) + "px";
}
}
}
@@ -1154,7 +1155,7 @@ optional:
function UpdatePc(update) {
var freePcs = 0;
for (var i = 0; i < update.length; i++) {
- var imgobj = document.getElementById(update[i].id);
+ var imgobj = document.getElementById("layout_PC" + update[i].id);
var img;
if (update[i].pcState == "0") {
@@ -1173,7 +1174,7 @@ optional:
}
} else {
if (supportSvg) {
- img = "img/pc_defect?";
+ img = "img/pc_defect";
} else {
imgobj.style.backgroundColor = "black";
}