aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2019-01-24 11:41:18 +0100
committerGibheer <gibheer+git@zero-knowledge.org>2019-01-24 11:41:18 +0100
commit02e838e2fec4bb38d4efeff5ea64ff8a9a5e3668 (patch)
treeed00ba7da4483da9991b24d489b67d57faca958a
parent18e4ba6ae4ddd59088f0603b67c2a84190f23a64 (diff)
monfront - add highlight to selected rows
The selected rows are now properly highlighted. See #7 for more information.
-rw-r--r--cmd/monfront/main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/monfront/main.go b/cmd/monfront/main.go
index 8518bd4..1fccb95 100644
--- a/cmd/monfront/main.go
+++ b/cmd/monfront/main.go
@@ -580,6 +580,8 @@ var (
form nav > * { margin: 0.5em; }
table { width: 100%; }
table tr:nth-child(odd) { background: #eeeeee; }
+ table tr.selected:nth-child(odd) { background: #afbfd4; }
+ table tr.selected:nth-child(even) { background: #cddbec; }
table tr:hover { background: #dfdfdf; }
table th { background: #cccccc; color: #3a5f78; }
table td, table th { text-align: center; }
@@ -647,6 +649,11 @@ var (
}
e = event.path[i].children[0].children[0];
e.checked = !e.checked;
+ if (e.checked) {
+ event.path[i].classList.add("selected");
+ } else {
+ event.path[i].classList.remove("selected");
+ }
e.focus();
break;
}