From 7326bd76731e66ae904fb99a39fdf294286cd2d2 Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Fri, 3 Jun 2016 21:04:48 +0200 Subject: [PATCH] [TASK] No link color for unavilable nodes --- lib/infobox/node.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/infobox/node.js b/lib/infobox/node.js index ed7d778..32f01d3 100644 --- a/lib/infobox/node.js +++ b/lib/infobox/node.js @@ -333,15 +333,18 @@ define(["chroma-js", "moment", "tablesort", "helper", "moment.de"], tr.appendChild(td1); var td2 = document.createElement("td"); - var a1 = document.createElement("a"); - a1.classList.add(d.link.target.node.flags.online ? "online" : "unseen"); - a1.textContent = unknown ? d.id : d.node.nodeinfo.hostname; - if (!unknown) { - a1.href = "#"; - } - a1.onclick = router.node(d.node); - td2.appendChild(a1); + if (!unknown) { + var a1 = document.createElement("a"); + a1.textContent = d.node.nodeinfo.hostname; + a1.classList.add("online"); + a1.href = "#"; + a1.onclick = router.node(d.node); + td2.appendChild(a1); + } else { + td2.textContent = d.id; + } + tr.appendChild(td2); var td3 = document.createElement("td");