infobox/node: move direction indicator to own column
This commit is contained in:
parent
1cb22c45f5
commit
3a7cc2bbc5
|
@ -233,18 +233,22 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
|
|||
|
||||
var tr = document.createElement("tr")
|
||||
var th1 = document.createElement("th")
|
||||
th1.textContent = "Knoten"
|
||||
th1.classList.add("sort-default")
|
||||
th1.textContent = " "
|
||||
tr.appendChild(th1)
|
||||
|
||||
var th2 = document.createElement("th")
|
||||
th2.textContent = "TQ"
|
||||
th2.textContent = "Knoten"
|
||||
th2.classList.add("sort-default")
|
||||
tr.appendChild(th2)
|
||||
|
||||
var th3 = document.createElement("th")
|
||||
th3.textContent = "Entfernung"
|
||||
th3.textContent = "TQ"
|
||||
tr.appendChild(th3)
|
||||
|
||||
var th4 = document.createElement("th")
|
||||
th4.textContent = "Entfernung"
|
||||
tr.appendChild(th4)
|
||||
|
||||
thead.appendChild(tr)
|
||||
table.appendChild(thead)
|
||||
|
||||
|
@ -254,13 +258,16 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
|
|||
var tr = document.createElement("tr")
|
||||
|
||||
var td1 = document.createElement("td")
|
||||
td1.appendChild(document.createTextNode(d.incoming ? " ← " : " → "))
|
||||
tr.appendChild(td1)
|
||||
|
||||
var td2 = document.createElement("td")
|
||||
var a1 = document.createElement("a")
|
||||
a1.classList.add("hostname")
|
||||
a1.textContent = d.node.nodeinfo.hostname
|
||||
a1.href = "#"
|
||||
a1.onclick = router.node(d.node)
|
||||
td1.appendChild(document.createTextNode(d.incoming ? " ← " : " → "))
|
||||
td1.appendChild(a1)
|
||||
td2.appendChild(a1)
|
||||
|
||||
if (d.link.vpn)
|
||||
td1.appendChild(document.createTextNode(" (VPN)"))
|
||||
|
@ -271,27 +278,27 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
|
|||
var span = document.createElement("span")
|
||||
span.classList.add("icon")
|
||||
span.classList.add("ion-location")
|
||||
td1.appendChild(span)
|
||||
td2.appendChild(span)
|
||||
}
|
||||
|
||||
tr.appendChild(td1)
|
||||
tr.appendChild(td2)
|
||||
|
||||
var td2 = document.createElement("td")
|
||||
var td3 = document.createElement("td")
|
||||
var a2 = document.createElement("a")
|
||||
a2.href = "#"
|
||||
a2.textContent = showTq(d.link)
|
||||
a2.onclick = router.link(d.link)
|
||||
td2.appendChild(a2)
|
||||
tr.appendChild(td2)
|
||||
td3.appendChild(a2)
|
||||
tr.appendChild(td3)
|
||||
|
||||
var td3 = document.createElement("td")
|
||||
var td4 = document.createElement("td")
|
||||
var a3 = document.createElement("a")
|
||||
a3.href = "#"
|
||||
a3.textContent = showDistance(d.link)
|
||||
a3.onclick = router.link(d.link)
|
||||
td3.appendChild(a3)
|
||||
td3.setAttribute("data-sort", d.link.distance !== undefined ? -d.link.distance : 1)
|
||||
tr.appendChild(td3)
|
||||
td4.appendChild(a3)
|
||||
td4.setAttribute("data-sort", d.link.distance !== undefined ? -d.link.distance : 1)
|
||||
tr.appendChild(td4)
|
||||
|
||||
tbody.appendChild(tr)
|
||||
})
|
||||
|
|
|
@ -237,8 +237,8 @@ table {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sidebar table th:first-child,
|
||||
.sidebar table td:first-child {
|
||||
.sidebar table th:nth-child(2),
|
||||
.sidebar table td:nth-child(2) {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
@ -247,10 +247,7 @@ table {
|
|||
|
||||
.sidebar table th:first-child,
|
||||
.sidebar table td:first-child {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 60%;
|
||||
width: 1.5em;
|
||||
}
|
||||
|
||||
.sidebarhandle {
|
||||
|
@ -307,7 +304,7 @@ table {
|
|||
text-align: left;
|
||||
}
|
||||
|
||||
.sidebar td:not(:first-child), .sidebar th:not(:first-child) {
|
||||
.sidebar td:not(:nth-child(-n+2)), .sidebar th:not(:nth-child(-n+2)) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue