diff --git a/Arduino/CanGrow/include/Webserver/File_cangrow_CSS.h b/Arduino/CanGrow/include/Webserver/File_cangrow_CSS.h index 47395f6..6a22d7c 100644 --- a/Arduino/CanGrow/include/Webserver/File_cangrow_CSS.h +++ b/Arduino/CanGrow/include/Webserver/File_cangrow_CSS.h @@ -61,6 +61,11 @@ h3 { margin: 5px; } +td { + text-align: left; + vertical-align: middle; +} + a:link, a:visited { color: #04AA6D; } diff --git a/Arduino/CanGrow/include/Webserver/File_cangrow_JS.h b/Arduino/CanGrow/include/Webserver/File_cangrow_JS.h index aecb09b..77a57a3 100644 --- a/Arduino/CanGrow/include/Webserver/File_cangrow_JS.h +++ b/Arduino/CanGrow/include/Webserver/File_cangrow_JS.h @@ -29,32 +29,32 @@ const char* File_cangrow_JS PROGMEM = R"(function toggleDisplay(id) { - 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'; - } - } + let el = document.getElementById(id); + let el_cs = getComputedStyle(el); - function hideAllClass(classname) { - - const el = document.getElementsByClassName(classname); - - for(let i = 0; i < el.length ; i++) { - el[i].style.display = ''; - } + if (el_cs.getPropertyValue('display') === 'none') { + el.style.display = 'inline'; + } else { + el.style.display = 'none'; } +} + +function hideAllClass(classname) { - function showSelect(selectId, prefix, hideClass = '') { - if(hideClass != '') { - hideAllClass(hideClass); - } - let selVal = document.getElementById(selectId).value; - toggleDisplay(prefix + selVal); - })"; + const el = document.getElementsByClassName(classname); + + 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); +})"; void WebFile_cangrow_JS(AsyncWebServerRequest *request) { request->send_P(200, "text/css", File_cangrow_JS);