mirror of
https://github.com/wled/WLED.git
synced 2025-11-09 19:18:54 +00:00
Bugfix
This commit is contained in:
@@ -602,9 +602,8 @@ Swap: <select id="xw${s}" name="XW${s}">
|
|||||||
|
|
||||||
function addBtn(i,p,t) {
|
function addBtn(i,p,t) {
|
||||||
var b = gId("btns");
|
var b = gId("btns");
|
||||||
var c = b.innerHTML;
|
|
||||||
var s = chrID(i);
|
var s = chrID(i);
|
||||||
c += `<div id="btn${i}">#${i} GPIO: <input type="number" name="BT${s}" onchange="UI()" min="-1" max="${d.max_gpio}" class="xs" value="${p}">`;
|
var c = `<div id="btn${i}">#${i} GPIO: <input type="number" name="BT${s}" onchange="UI()" min="-1" max="${d.max_gpio}" class="xs" value="${p}">`;
|
||||||
c += ` <select name="BE${s}">`
|
c += ` <select name="BE${s}">`
|
||||||
c += `<option value="0" ${t==0?"selected":""}>Disabled</option>`;
|
c += `<option value="0" ${t==0?"selected":""}>Disabled</option>`;
|
||||||
c += `<option value="2" ${t==2?"selected":""}>Pushbutton</option>`;
|
c += `<option value="2" ${t==2?"selected":""}>Pushbutton</option>`;
|
||||||
@@ -617,8 +616,9 @@ Swap: <select id="xw${s}" name="XW${s}">
|
|||||||
c += `<option value="9" ${t==9?"selected":""}>Touch (switch)</option>`;
|
c += `<option value="9" ${t==9?"selected":""}>Touch (switch)</option>`;
|
||||||
c += `</select>`;
|
c += `</select>`;
|
||||||
c += `<span style="cursor: pointer;" onclick="off('BT${s}')"> ✕</span><br></div>`;
|
c += `<span style="cursor: pointer;" onclick="off('BT${s}')"> ✕</span><br></div>`;
|
||||||
b.innerHTML = c;
|
b.insertAdjacentHTML("beforeend", c);
|
||||||
btnBtn();
|
btnBtn();
|
||||||
|
pinDropdowns();
|
||||||
UI();
|
UI();
|
||||||
}
|
}
|
||||||
function remBtn() {
|
function remBtn() {
|
||||||
@@ -626,6 +626,7 @@ Swap: <select id="xw${s}" name="XW${s}">
|
|||||||
if (b.children.length <= 1) return;
|
if (b.children.length <= 1) return;
|
||||||
b.lastElementChild.remove();
|
b.lastElementChild.remove();
|
||||||
btnBtn();
|
btnBtn();
|
||||||
|
pinDropdowns();
|
||||||
UI();
|
UI();
|
||||||
}
|
}
|
||||||
function btnBtn() {
|
function btnBtn() {
|
||||||
|
|||||||
Reference in New Issue
Block a user