From 02e838e2fec4bb38d4efeff5ea64ff8a9a5e3668 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Thu, 24 Jan 2019 11:41:18 +0100 Subject: monfront - add highlight to selected rows The selected rows are now properly highlighted. See #7 for more information. --- cmd/monfront/main.go | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- cgit v1.2.3-70-g09d2