cosmetics
This commit is contained in:
parent
dadaf09232
commit
9c51386be9
2 changed files with 28 additions and 23 deletions
|
@ -61,6 +61,11 @@ h3 {
|
|||
margin: 5px;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
a:link, a:visited {
|
||||
color: #04AA6D;
|
||||
}
|
||||
|
|
|
@ -29,32 +29,32 @@
|
|||
|
||||
|
||||
const char* File_cangrow_JS PROGMEM = R"(function toggleDisplay(id) {
|
||||
let el = document.getElementById(id);
|
||||
let el_cs = getComputedStyle(el);
|
||||
let el = document.getElementById(id);
|
||||
let el_cs = getComputedStyle(el);
|
||||
|
||||
if (el_cs.getPropertyValue('display') === 'none') {
|
||||
el.style.display = 'inline';
|
||||
} else {
|
||||
el.style.display = 'none';
|
||||
}
|
||||
if (el_cs.getPropertyValue('display') === 'none') {
|
||||
el.style.display = 'inline';
|
||||
} else {
|
||||
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++) {
|
||||
el[i].style.display = '';
|
||||
}
|
||||
for(let i = 0; i < el.length ; i++) {
|
||||
el[i].style.display = '';
|
||||
}
|
||||
}
|
||||
|
||||
function showSelect(selectId, prefix, hideClass = '') {
|
||||
if(hideClass != '') {
|
||||
hideAllClass(hideClass);
|
||||
}
|
||||
let selVal = document.getElementById(selectId).value;
|
||||
toggleDisplay(prefix + selVal);
|
||||
})";
|
||||
function showSelect(selectId, prefix, hideClass = '') {
|
||||
if(hideClass != '') {
|
||||
hideAllClass(hideClass);
|
||||
}
|
||||
let selVal = document.getElementById(selectId).value;
|
||||
toggleDisplay(prefix + selVal);
|
||||
})";
|
||||
|
||||
void WebFile_cangrow_JS(AsyncWebServerRequest *request) {
|
||||
request->send_P(200, "text/css", File_cangrow_JS);
|
||||
|
|
Loading…
Reference in a new issue