diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2017-01-28 19:40:02 +0100 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2017-01-28 19:40:02 +0100 |
commit | 81fc62bba106321eeb21277482c4900accbfcafa (patch) | |
tree | 85a5ac339ecce765dfc17fcab1b02a35910f8967 | |
parent | 310ea19a3a3c153a1dba3e2460802a10eccd348b (diff) | |
download | chd_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.php | 8 |
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); |