Commit 9f79c18b authored by Zosman's avatar Zosman
Browse files

Adding functionality to search functions

Added a or statment to the line that sets the row that we are searching through, it is my hope that this will accomplish the goal of allowing the user to search through both fullname and username, at the moment i am unable to test this unfortunatly.
#hope
:zosman:
parent da88c2f9
......@@ -8,7 +8,7 @@ function filterApplied() {
table = document.getElementById("appliedTable"); // the table at the moment this is called
tr = table.getElementsByTagName("tr"); //the table rows
for (i = 1; i < tr.length; i++) { // loops through the table rows
td = tr[i].getElementsByTagName("td")[2]; //sets td to the element, gets changed evrey loop itteration
td = (tr[i].getElementsByTagName("td")[1] || tr[i].getElementsByTagName("td")[2]); //sets td to the element, gets changed evrey loop itteration
if (td) {
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
......@@ -27,7 +27,7 @@ function filterBlocked() {
table = document.getElementById("blockedTable"); // the table at the moment this is called
tr = table.getElementsByTagName("tr"); //the table rows
for (i = 1; i < tr.length; i++) { // loops through the table rows
td = tr[i].getElementsByTagName("td")[2]; //sets td to the element, gets changed evrey loop itteration
td = (tr[i].getElementsByTagName("td")[1] || tr[i].getElementsByTagName("td")[2]); //sets td to the element, gets changed evrey loop itteration
if (td) {
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
......@@ -46,7 +46,7 @@ function filterCurrent() {
table = document.getElementById("currentTable"); // the table at the moment this is called
tr = table.getElementsByTagName("tr"); //the table rows
for (i = 1; i < tr.length; i++) { // loops through the table rows
td = tr[i].getElementsByTagName("td")[2]; //sets td to the element, gets changed evrey loop itteration
td = (tr[i].getElementsByTagName("td")[1] || tr[i].getElementsByTagName("td")[2]); //sets td to the element, gets changed evrey loop itteration
if (td) {
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment