summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2017-01-28 19:40:02 +0100
committerLudovic Pouzenc <ludovic@pouzenc.fr>2017-01-28 19:40:02 +0100
commit81fc62bba106321eeb21277482c4900accbfcafa (patch)
tree85a5ac339ecce765dfc17fcab1b02a35910f8967
parent310ea19a3a3c153a1dba3e2460802a10eccd348b (diff)
downloadchd_gestion-81fc62bba106321eeb21277482c4900accbfcafa.zip
chd_gestion-81fc62bba106321eeb21277482c4900accbfcafa.tar.gz
chd_gestion-81fc62bba106321eeb21277482c4900accbfcafa.tar.bz2
Bugfix : colors on synoptic were broken on Safari
(JS idiom : for var n in ... don't work)
-rw-r--r--api/img_adt_svc_relais.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/api/img_adt_svc_relais.php b/api/img_adt_svc_relais.php
index 18abebe..40b6ddf 100644
--- a/api/img_adt_svc_relais.php
+++ b/api/img_adt_svc_relais.php
@@ -52,7 +52,13 @@ if ($opt_ping) {
}
};
window.onload = function () {
- for ( var n of document.getElementsByClassName("node") ) {
+ /* for (var n of ...) incompatible Safari récents
+ for ( var n of document.getElementsByClassName("node") ) {
+ nodes[n.firstElementChild.innerHTML] = n;
+ }*/
+ items = document.getElementsByClassName("node");
+ for (var i = 0; i < items.length; i++) {
+ n = items[i];
nodes[n.firstElementChild.innerHTML] = n;
}
console.log('nodes', nodes);