1
0
forked from x/volcanos
This commit is contained in:
shy 2023-08-13 09:59:35 +08:00
parent 966388c537
commit 417fb04154
2 changed files with 3 additions and 1 deletions

View File

@ -29,6 +29,8 @@ input[name=url] { width:320px; }
input[name=cmd] { background-color:var(--code-bg-color); color:var(--code-fg-color); width:100%; }
table.content.full { width:100%; }
table.content thead { position:sticky; top:2px; }
table.content tr.offline { color:var(--disable-fg-color); }
table.content tr.offline a { color:var(--disable-fg-color); }
table.content th { padding:5px; box-shadow: var(--box-shadow); }
table.content td { padding:5px; }
table.content.action th:last-child { position:sticky; right:2px; box-shadow: var(--box-shadow); }

View File

@ -177,7 +177,7 @@ Volcanos("page", {
can.page.Append(can, ui.thead, [{data: {dataset: {index: -1}}, th: can.core.List(list, function(key) { if (key[0] != "_") { return key } }) }])
can.page.Append(can, ui.tbody, can.core.List(msg.Table(), function(item, index, array) {
return {dataset: {index: index}, td: can.core.List(list, function(key) { if (key[0] != "_") { return cb(can.page.Color(item[key]).trim(), key, index, item, array) } }) }
return {dataset: {index: index}, className: item["status"], td: can.core.List(list, function(key) { if (key[0] != "_") { return cb(can.page.Color(item[key]).trim(), key, index, item, array) } }) }
})); return can.page.OrderTable(can, ui.table)
},
OrderTable: function(can, table) { can.page.Select(can, table, html.TH, function(th, index) { th.onclick = function(event) { var dataset = event.target.dataset