diff --git a/tools/esp8266/defines.h b/tools/esp8266/defines.h index ece45946..7e6f1b77 100644 --- a/tools/esp8266/defines.h +++ b/tools/esp8266/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 5 -#define VERSION_PATCH 19 +#define VERSION_PATCH 20 //------------------------------------- diff --git a/tools/esp8266/html/api.js b/tools/esp8266/html/api.js index 04476f3a..c896c42b 100644 --- a/tools/esp8266/html/api.js +++ b/tools/esp8266/html/api.js @@ -41,13 +41,14 @@ function lbl(htmlfor, val, cl=null, id=null) { return e; } -function inp(name, val, max=32, cl=["text"], id=null) { +function inp(name, val, max=32, cl=["text"], id=null, type=null) { e = document.createElement('input'); e.classList.add(...cl); e.name = name; e.value = val; - e.maxLength = max; + if(null != type) e.maxLength = max; if(null != id) e.id = id; + if(null != type) e.type = type; return e; } @@ -71,9 +72,10 @@ function div(cl) { return e; } -function span(val, cl) { +function span(val, cl=null, id=null) { e = document.createElement('span'); e.innerHTML = val; - e.classList.add(...cl); + if(null != cl) e.classList.add(...cl); + if(null != id) e.id = id; return e; } diff --git a/tools/esp8266/html/index.html b/tools/esp8266/html/index.html index 8bb68c01..01185a14 100644 --- a/tools/esp8266/html/index.html +++ b/tools/esp8266/html/index.html @@ -47,9 +47,29 @@