summaryrefslogtreecommitdiffstats
path: root/modules-available
diff options
context:
space:
mode:
authorSimon Rettberg2017-06-21 12:30:20 +0200
committerSimon Rettberg2017-06-21 12:30:20 +0200
commitbc243e1292488424fec354b4bf655e674328024a (patch)
tree11b89c6f2cc1d23db16645f4c1523cbf2bb72557 /modules-available
parent[locationinfo] Use styled DIVs instead of SVGs for PC icons (diff)
downloadslx-admin-bc243e1292488424fec354b4bf655e674328024a.tar.gz
slx-admin-bc243e1292488424fec354b4bf655e674328024a.tar.xz
slx-admin-bc243e1292488424fec354b4bf655e674328024a.zip
[locationinfo] Implement room-specific overrides (no config GUI yet)
Diffstat (limited to 'modules-available')
-rw-r--r--modules-available/locationinfo/api.inc.php2
-rwxr-xr-xmodules-available/locationinfo/frontend/doorsign.html12
2 files changed, 9 insertions, 5 deletions
diff --git a/modules-available/locationinfo/api.inc.php b/modules-available/locationinfo/api.inc.php
index 74b9fc96..8b6674e9 100644
--- a/modules-available/locationinfo/api.inc.php
+++ b/modules-available/locationinfo/api.inc.php
@@ -252,7 +252,7 @@ function getConfig($paneluuid)
'name' => isset($locations[$lid]) ? $locations[$lid]['locationname'] : 'noname00.pas',
);
if (isset($overrides[$lid]) && is_array($overrides[$lid])) {
- $config['locations'][$lid]['overrides'] = $overrides[$lid];
+ $config['locations'][$lid]['config'] = $overrides[$lid];
}
}
appendMachineData($config['locations'], $lids, true);
diff --git a/modules-available/locationinfo/frontend/doorsign.html b/modules-available/locationinfo/frontend/doorsign.html
index 00fc9bce..b9b88392 100755
--- a/modules-available/locationinfo/frontend/doorsign.html
+++ b/modules-available/locationinfo/frontend/doorsign.html
@@ -663,7 +663,7 @@ optional:
*/
function addRoom(roomData) {
var mergedConfig = {};
- if (roomData.config && typeof(roomData.config.constructor) === 'object') {
+ if (roomData.config && typeof(roomData.config) === 'object') {
mergedConfig = roomData.config;
sanitizeConfig(mergedConfig);
}
@@ -1460,9 +1460,13 @@ optional:
}
}
- if (!imgname) return; // No image found on server, do nothing TODO just div with class
- var $overlay = $("<img>");
- $overlay.addClass('overlay').attr('src', imgname).addClass("overlay-" + overlayName);
+ var $overlay;
+ if (!imgname) {
+ $overlay = $('<div>');
+ } else {
+ $overlay = $("<img>").attr('src', imgname);
+ }
+ $overlay.addClass('overlay').addClass("overlay-" + overlayName);
$container.append($overlay);
}