database access for rooms and mqtt client + generator
This commit is contained in:
@@ -1,19 +1,30 @@
|
||||
function tableSearch(){
|
||||
var table, input, tr, td, row_content;
|
||||
table = document.getElementById("tableRooms");
|
||||
input = document.getElementById("tableRoomSearch").value.toUpperCase();
|
||||
tr = table.getElementsByTagName("tr");
|
||||
var table, input, tr, td, row_content;
|
||||
table = document.getElementById("tableRooms");
|
||||
input = document.getElementById("tableRoomSearch").value.toUpperCase();
|
||||
tr = table.getElementsByTagName("tr");
|
||||
|
||||
for (let i = 0; i < tr.length; i++) {
|
||||
td = tr[i].getElementsByTagName("td")[0];
|
||||
if(td){
|
||||
row_content = td.textContent || td.innerText;
|
||||
if (row_content.toUpperCase().indexOf(input) > -1) {
|
||||
tr[i].style.display = "";
|
||||
}
|
||||
else{
|
||||
tr[i].style.display ="none";
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < tr.length; i++) {
|
||||
td = tr[i].getElementsByTagName("td")[0];
|
||||
if(td){
|
||||
row_content = td.textContent || td.innerText;
|
||||
if (row_content.toUpperCase().indexOf(input) > -1) {
|
||||
tr[i].style.display = "";
|
||||
}
|
||||
}
|
||||
else{
|
||||
tr[i].style.display ="none";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function toggleRoomDropdown() {
|
||||
document.getElementById("rooms-unrolled").style.display = "inline";
|
||||
document.getElementById("rooms-rolled").style.display = "none";
|
||||
|
||||
}
|
||||
|
||||
function untoggleRoomDropdown() {
|
||||
document.getElementById("rooms-rolled").style.display = "inline";
|
||||
document.getElementById("rooms-unrolled").style.display = "none";
|
||||
}
|
||||
|
||||
@@ -90,3 +90,9 @@ tbody tr{
|
||||
.rooms-table input{
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.current-readings .data-valid,
|
||||
.current-readings .data-late,
|
||||
.current-readings .data-missing{
|
||||
padding: 0.2em 1em;
|
||||
}
|
||||
Reference in New Issue
Block a user