tabs: render tabs when visible, destroy them when hidden

This commit is contained in:
Nils Schneider 2015-07-07 17:42:41 +02:00
commit e67c61d7d3
3 changed files with 28 additions and 42 deletions

View file

@ -3,9 +3,23 @@ define(["chroma-js", "virtual-dom", "numeral-intl"],
return function (config) {
var self = this
var fwTable, hwTable, geoTable, autoTable, gwTable
var scale = Chroma.scale("YlGnBu").mode("lab")
var fwTable = document.createElement("table")
fwTable.classList.add("proportion")
var hwTable = document.createElement("table")
hwTable.classList.add("proportion")
var geoTable = document.createElement("table")
geoTable.classList.add("proportion")
var autoTable = document.createElement("table")
autoTable.classList.add("proportion")
var gwTable = document.createElement("table")
gwTable.classList.add("proportion")
function showStatGlobal(o) {
var content, caption
@ -135,41 +149,26 @@ define(["chroma-js", "virtual-dom", "numeral-intl"],
h2 = document.createElement("h2")
h2.textContent = "Firmwareversionen"
el.appendChild(h2)
fwTable = document.createElement("table")
fwTable.classList.add("proportion")
el.appendChild(fwTable)
h2 = document.createElement("h2")
h2.textContent = "Hardwaremodelle"
el.appendChild(h2)
hwTable = document.createElement("table")
hwTable.classList.add("proportion")
el.appendChild(hwTable)
h2 = document.createElement("h2")
h2.textContent = "Auf der Karte sichtbar"
el.appendChild(h2)
geoTable = document.createElement("table")
geoTable.classList.add("proportion")
el.appendChild(geoTable)
h2 = document.createElement("h2")
h2.textContent = "Autoupdater"
el.appendChild(h2)
autoTable = document.createElement("table")
autoTable.classList.add("proportion")
el.appendChild(autoTable)
h2 = document.createElement("h2")
h2.textContent = "Gewählter Gateway"
el.appendChild(h2)
gwTable = document.createElement("table")
gwTable.classList.add("proportion")
el.appendChild(gwTable)
if (config.globalInfos)