diff --git a/static/admin.html b/static/admin.html index 9bcfa8f..e3cee5a 100644 --- a/static/admin.html +++ b/static/admin.html @@ -31,11 +31,15 @@ top: 1%; right: 0.5%; } + + .vieux { color: DarkOrchid; } + .tableFixHead { overflow: auto; height: 40%; } .tableFixHead thead th { position: sticky; top: 0; z-index: 1; } table { border-collapse: collapse; width: 100%; } th, td { padding: 8px 16px; } - th { background:#eee; } + th { background: Grey; } + tr:nth-child(even) { background-color: Silver; } @@ -106,7 +110,7 @@ socket.on('update', function(data){ var id = data.id; if(!(id in equipes)){ - var row = `${id}`; + var row = `${id}`; row += `` @@ -120,9 +124,16 @@ id="${id}.npc" onchange="sendUpdate('${id}')" />` row += `` - info_table.innerHTML = info_table.innerHTML + `${row}` + info_table.innerHTML += `${row}` + for(i in equipes){ + var equipe = equipes[i]; + document.getElementById(`${i}.shown`).checked = equipe.state.shown; + document.getElementById(`${i}.blurred`).checked = equipe.state.blurred; + document.getElementById(`${i}.tracker`).checked = equipe.state.tracker; + document.getElementById(`${i}.npc`).value = equipe.state.npc; + } } - equipes[id] = data.state; + equipes[id] = data; document.getElementById(`${id}.shown`).checked = data.state.shown; document.getElementById(`${id}.blurred`).checked = data.state.blurred; document.getElementById(`${id}.tracker`).checked = data.state.tracker;