cosmetics

This commit is contained in:
Marcus 2024-10-25 23:43:51 +02:00
parent dadaf09232
commit 9c51386be9
2 changed files with 28 additions and 23 deletions

View file

@ -61,6 +61,11 @@ h3 {
margin: 5px; margin: 5px;
} }
td {
text-align: left;
vertical-align: middle;
}
a:link, a:visited { a:link, a:visited {
color: #04AA6D; color: #04AA6D;
} }

View file

@ -29,32 +29,32 @@
const char* File_cangrow_JS PROGMEM = R"(function toggleDisplay(id) { const char* File_cangrow_JS PROGMEM = R"(function toggleDisplay(id) {
let el = document.getElementById(id); let el = document.getElementById(id);
let el_cs = getComputedStyle(el); let el_cs = getComputedStyle(el);
if (el_cs.getPropertyValue('display') === 'none') { if (el_cs.getPropertyValue('display') === 'none') {
el.style.display = 'inline'; el.style.display = 'inline';
} else { } else {
el.style.display = 'none'; el.style.display = 'none';
}
} }
}
function hideAllClass(classname) { function hideAllClass(classname) {
const el = document.getElementsByClassName(classname); const el = document.getElementsByClassName(classname);
for(let i = 0; i < el.length ; i++) { for(let i = 0; i < el.length ; i++) {
el[i].style.display = ''; el[i].style.display = '';
}
} }
}
function showSelect(selectId, prefix, hideClass = '') { function showSelect(selectId, prefix, hideClass = '') {
if(hideClass != '') { if(hideClass != '') {
hideAllClass(hideClass); hideAllClass(hideClass);
} }
let selVal = document.getElementById(selectId).value; let selVal = document.getElementById(selectId).value;
toggleDisplay(prefix + selVal); toggleDisplay(prefix + selVal);
})"; })";
void WebFile_cangrow_JS(AsyncWebServerRequest *request) { void WebFile_cangrow_JS(AsyncWebServerRequest *request) {
request->send_P(200, "text/css", File_cangrow_JS); request->send_P(200, "text/css", File_cangrow_JS);