Merge remote-tracking branch 'origin/ac_main' into mdev

This commit is contained in:
Ewoud
2022-11-28 19:58:51 +01:00
17 changed files with 815 additions and 781 deletions

View File

@@ -1560,8 +1560,8 @@ function requestJson(command=null)
if (json.info) {
let i = json.info;
// append custom palettes (when loading for the 1st time)
if (!command && isEmpty(lastinfo) && i.leds && i.leds.cpal) {
for (let j = 0; j<i.leds.cpal; j++) {
if (!command && isEmpty(lastinfo) && i.cpalcount) {
for (let j = 0; j<i.cpalcount; j++) {
let div = d.createElement("div");
gId('pallist').appendChild(div);
div.outerHTML = generateListItemHtml(

View File

@@ -190,12 +190,8 @@
if (!obj.length) return;
if (typeof el === "string" && obj[0]) obj[0].placeholder = el;
else if (obj[el]) {
if (txt2!="") {
obj[el].insertAdjacentHTML('beforebegin', txt + '&nbsp;');
obj[el].insertAdjacentHTML('afterend', '&nbsp;'+txt2);
}
else
obj[el].insertAdjacentHTML('afterend', '&nbsp;'+txt);
if (txt!="") obj[el].insertAdjacentHTML('afterend', '&nbsp;'+txt);
if (txt2!="") obj[el].insertAdjacentHTML('beforebegin', txt2 + '&nbsp;'); //add pre texts
}
}
// load settings and insert values into DOM