appendConfigData only for usermod + optimizations

- rename replaceOption to rOption
- rename removeOptions to dOptions
- set oAppend buffer size back to 3096
- WLEDMM warning on settings2D Populate
- add AppendConfig per usermod
- add request parameter to getSettinsJS
- add lookupName
This commit is contained in:
Ewoud
2023-01-03 13:08:14 +01:00
parent 7c1b655ca3
commit 9bc6451145
13 changed files with 3213 additions and 3187 deletions

View File

@@ -170,7 +170,7 @@ Y:<input id="P${i}Y" name="P${i}Y" type="number" min="0" max="256" value="0"><br
<option value="1">Vertical</option>
</select><br>
Serpentine: <input type="checkbox" name="PS"><br>
<i style="color:#fa0;">Can populate LED panel layout with pre-arranged matrix.<br>These values do not affect final layout.</i><br>
<i style="color:#fa0;">Can populate LED panel layout with pre-arranged matrix.<br>These values do not affect final layout.<br>WLEDMM: Populate will overwrite earlier saved panel layouts!</i><br>
<button type="button" onclick="gen()">Populate</button>
<hr class="sml">
<h3>Panel set-up</h3>

View File

@@ -218,8 +218,8 @@
if (c.value == sel.dataset.val) sel.selectedIndex = i;
}
}
//WLEDMM: replaceOption to set build flag defaults and globals
function replaceOption(name,el,txt,val) {
//WLEDMM: replace Option to set build flag defaults and globals
function rOption(name,el,txt,val) {
let obj = d.getElementsByName(name);
if (obj[el]) {
let sel = obj[el];
@@ -229,8 +229,8 @@
}
}
}
//WLEDMM: removeOptions to remove options e.g. mclk
function removeOptions(name,el,valFrom,valTo) {
//WLEDMM: delete Options to remove options e.g. mclk
function dOptions(name,el,valFrom,valTo) {
let obj = d.getElementsByName(name);
if (obj[el]) {
let select = obj[el];
@@ -290,7 +290,8 @@
gId("globalGPIOs").style.display = (userMod == null)?"block":"none";
gId("um").innerHTML = urows;
var url = (loc?`http://${locip}`:'') + '/settings/s.js?p=8';
var url = (loc?`http://${locip}`:'') + '/settings/s.js?p=8';
if (userMod != null) url+= '&um=' + userMod;
loadJS(url, false); // If we set async false, file is loaded and executed, then next statement is processed
})
.catch((error)=>{