+ address list for recipient

+ filter table helper
* copy address simply by clicking on it
This commit is contained in:
Taegus
2018-12-17 17:42:19 +01:00
parent 6013c6f2d7
commit 1468eba97c
11 changed files with 153 additions and 65 deletions

View File

@@ -18,6 +18,27 @@ class Utils {
}
return x;
}
filterTable(table, text) {
// Declare variables
var filter, tr, td, i, txtValue;
filter = text.toUpperCase();
tr = $(table).find("tr");
// Loop through all table rows, and hide those who don't match the search query
for (i = 0; i < tr.length; i++) {
td = $(tr[i]).find("td")[0];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
$(tr[i]).css("display", "");
} else {
$(tr[i]).css("display", "none");
}
}
}
}
}
EthoUtils = new Utils();