feat(webui): the circuit override #2335
@ -1897,7 +1897,11 @@ function doSaveConfigStringArray(id) {
|
|||||||
url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
|
url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
[id]: document.getElementById(id).getAttribute("data-tags-value").split(", ").filter(x => x)
|
[id]: document
|
||||||
|
.getElementById(id)
|
||||||
|
.getAttribute("data-tags-value")
|
||||||
|
.split(", ")
|
||||||
|
.filter(x => x)
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -2617,7 +2621,7 @@ function setImportSample(key) {
|
|||||||
document.querySelectorAll(".tags-input").forEach(input => {
|
document.querySelectorAll(".tags-input").forEach(input => {
|
||||||
const datalist = document.getElementById(input.getAttribute("list"));
|
const datalist = document.getElementById(input.getAttribute("list"));
|
||||||
const options = [...datalist.querySelectorAll("option")].map(x => x.textContent);
|
const options = [...datalist.querySelectorAll("option")].map(x => x.textContent);
|
||||||
input.oninput = function() {
|
input.oninput = function () {
|
||||||
const value = [];
|
const value = [];
|
||||||
for (const tag of this.value.split(",")) {
|
for (const tag of this.value.split(",")) {
|
||||||
const index = options.map(x => x.toLowerCase()).indexOf(tag.trim().toLowerCase());
|
const index = options.map(x => x.toLowerCase()).indexOf(tag.trim().toLowerCase());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user