redo link type handling
This commit is contained in:
parent
3a7cc2bbc5
commit
f77aabd37d
8 changed files with 67 additions and 33 deletions
|
|
@ -13,6 +13,12 @@ define(["sorttable", "virtual-dom"], function (SortTable, V) {
|
|||
sort: function (a, b) { return a.tq - b.tq},
|
||||
reverse: true
|
||||
},
|
||||
{ name: "Typ",
|
||||
sort: function (a, b) {
|
||||
return a.type.localeCompare(b.type)
|
||||
},
|
||||
reverse: false
|
||||
},
|
||||
{ name: "Entfernung",
|
||||
sort: function (a, b) {
|
||||
return (a.distance === undefined ? -1 : a.distance) -
|
||||
|
|
@ -27,14 +33,12 @@ define(["sorttable", "virtual-dom"], function (SortTable, V) {
|
|||
function renderRow(d) {
|
||||
var td1Content = [V.h("a", {href: "#", onclick: router.link(d)}, linkName(d))]
|
||||
|
||||
if (d.vpn)
|
||||
td1Content.push(" (VPN)")
|
||||
|
||||
var td1 = V.h("td", td1Content)
|
||||
var td2 = V.h("td", {style: {color: linkScale(d.tq).hex()}}, showTq(d))
|
||||
var td3 = V.h("td", showDistance(d))
|
||||
var td3 = V.h("td", d.type)
|
||||
var td4 = V.h("td", showDistance(d))
|
||||
|
||||
return V.h("tr", [td1, td2, td3])
|
||||
return V.h("tr", [td1, td2, td3, td4])
|
||||
}
|
||||
|
||||
this.render = function (d) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue