[mirotalksfu] - add participants search filter

هذا الالتزام موجود في:
Miroslav Pejic
2021-11-13 21:06:25 +01:00
الأصل 93b358166c
التزام 261e298f71
3 ملفات معدلة مع 48 إضافات و2 حذوفات

عرض الملف

@@ -2362,6 +2362,29 @@ class RoomClient {
}
}
// ####################################################
// SEARCH PEER FILTER
// ####################################################
searchPeer() {
let input, filter, table, tr, td, i, txtValue;
input = this.getId('searchParticipants');
filter = input.value.toUpperCase();
table = this.getId('myTable');
tr = table.getElementsByTagName('tr');
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName('td')[0];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = '';
} else {
tr[i].style.display = 'none';
}
}
}
}
// ####################################################
// UPDATE PEER INFO
// ####################################################