diff --git a/src/CHANGES.md b/src/CHANGES.md index 678e872c..d113abb1 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -2,6 +2,10 @@ (starting from release version `0.5.66`) +## 0.5.92 +* fix mobile menu +* fix inverters in select `serial.html` #709 + ## 0.5.91 * improved html and navi, navi is visible even when API dies #660 * reduced maximum allowed JSON size for API to 6000Bytes #660 diff --git a/src/defines.h b/src/defines.h index 8bd4a04a..490f2546 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 5 -#define VERSION_PATCH 91 +#define VERSION_PATCH 92 //------------------------------------- typedef struct { diff --git a/src/web/html/api.js b/src/web/html/api.js index 0da4e094..0c96e6c2 100644 --- a/src/web/html/api.js +++ b/src/web/html/api.js @@ -35,7 +35,7 @@ iconSuccess = [ */ function topnav() { - toggle("topnav"); + toggle("topnav", "mobile"); } function parseNav(obj) { @@ -85,12 +85,12 @@ function setHide(id, hide) { elm.classList.remove('hide'); } -function toggle(id) { +function toggle(id, cl="hide") { var e = document.getElementById(id); - if(!e.classList.contains("hide")) - e.classList.add("hide"); + if(!e.classList.contains(cl)) + e.classList.add(cl); else - e.classList.remove('hide'); + e.classList.remove(cl); } function getAjax(url, ptr, method="GET", json=null) { diff --git a/src/web/html/includes/nav.html b/src/web/html/includes/nav.html index 97d05e74..95ba005d 100644 --- a/src/web/html/includes/nav.html +++ b/src/web/html/includes/nav.html @@ -6,20 +6,18 @@
diff --git a/src/web/html/serial.html b/src/web/html/serial.html index b158d170..fbb09ed9 100644 --- a/src/web/html/serial.html +++ b/src/web/html/serial.html @@ -65,7 +65,7 @@ parseESP(obj); window.setInterval("getAjax('/api/generic', parseGeneric)", 10000); exeOnce = false; - getAjax("/api/setup", parse); + getAjax("/api/inverter/list", parse); } } @@ -74,8 +74,8 @@ if(null == root) return; root = root.inverter; - for(var i = 0; i < root.inverter.length; i++) { - inv = root.inverter[i]; + for(var i = 0; i < root.length; i++) { + inv = root[i]; var opt = document.createElement('option'); opt.value = inv.id; opt.innerHTML = inv.name;