feat(webpanel): enable searching by user note
This commit is contained in:
@ -311,7 +311,8 @@ $(function () {
|
||||
const searchText = $("#searchInput").val().toLowerCase();
|
||||
$("#userTable tbody tr.user-main-row").each(function () {
|
||||
const username = $(this).find("td:eq(2)").text().toLowerCase();
|
||||
const isVisible = username.includes(searchText);
|
||||
const note = $(this).data("note").toLowerCase();
|
||||
const isVisible = username.includes(searchText) || note.includes(searchText);
|
||||
$(this).toggle(isVisible);
|
||||
if (!isVisible) {
|
||||
$(this).next('tr.user-details-row').hide();
|
||||
|
||||
@ -144,7 +144,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users|sort(attribute='username', case_sensitive=false) %}
|
||||
<tr class="user-main-row">
|
||||
<tr class="user-main-row" data-note="{{ user.note or '' }}">
|
||||
<td>
|
||||
<input type="checkbox" class="user-checkbox" value="{{ user.username }}">
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user