This commit is contained in:
RubenPX 2022-04-29 14:07:04 +02:00
parent 8bbca0301b
commit c78c9c5d7d
2 changed files with 5 additions and 5 deletions

View File

@ -14,9 +14,9 @@
el = el.trim()
if (all) {
return [...document.querySelectorAll(el)]
}
return document.querySelector(el)
}
return document.querySelector(el)
}
/**

View File

@ -51,7 +51,7 @@ class TableController {
/**
* @returns All inputs from current page in device list
*/
static getAllDevicesInCurrentPage() {
static getAllDevicesInCurrentPage() {
return this.#tableRowsPage()
.map(element => element.querySelector("input"))
}
@ -65,7 +65,7 @@ class TableController {
return DOMElements.map(element => {
const info = {}
info.checked = element.checked
Object.values(element.attributes).forEach(attrib => {info[attrib.nodeName.replace(/-/g, "_")] = attrib.nodeValue})
Object.values(element.attributes).forEach(attrib => { info[attrib.nodeName.replace(/-/g, "_")] = attrib.nodeValue })
return info
})
}