selected all
This commit is contained in:
parent
6b752e9b2f
commit
98779d67c4
@ -170,7 +170,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" class="checkboxList" aria-label="Checkbox for following text input"></td>
|
<td><input type="checkbox" class="checkboxList" userid="" aria-label="Checkbox for following text input"></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
@ -96,6 +96,7 @@ instance.get("users", {withCredentials: true, params:param}).then(function(respo
|
|||||||
}
|
}
|
||||||
var trAll = document.querySelectorAll("#users tbody tr")
|
var trAll = document.querySelectorAll("#users tbody tr")
|
||||||
td = trAll[i].querySelectorAll("td");
|
td = trAll[i].querySelectorAll("td");
|
||||||
|
td[0].querySelector("input").setAttribute("userid", listData[i].id)
|
||||||
td[1].textContent = listData[i].id;
|
td[1].textContent = listData[i].id;
|
||||||
td[2].textContent = listData[i].username;
|
td[2].textContent = listData[i].username;
|
||||||
td[3].textContent = listData[i].email;
|
td[3].textContent = listData[i].email;
|
||||||
@ -129,6 +130,14 @@ instance.get("users", {withCredentials: true, params:param}).then(function(respo
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
document.getElementById("checkboxPrincipal").addEventListener("click", function(e){
|
||||||
|
listCheck = document.getElementsByClassName("checkboxList");
|
||||||
|
var checkPrincipal = e.currentTarget.checked;
|
||||||
|
for (var i=0; i<listCheck.length; i++){
|
||||||
|
listCheck[i].checked = checkPrincipal;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user