mirror of
https://github.com/nextcloud/server.git
synced 2026-07-16 05:13:10 -04:00
Fixes User Search by username.
This commit is contained in:
parent
c7af9cd6dd
commit
8e34316e04
2 changed files with 6 additions and 7 deletions
|
|
@ -622,12 +622,12 @@ $(document).ready(function () {
|
|||
});
|
||||
// Implements User Search
|
||||
$('#usersearchform input').keyup(function() {
|
||||
var inputVal = $(this).val();
|
||||
$('table tbody tr td.name').each(function() {
|
||||
if ($('table tbody tr').text().search(new RegExp(inputVal, "i")) < 0) {
|
||||
$('table tbody tr').fadeOut();
|
||||
var inputVal = $(this).val(), regex = new RegExp(inputVal, "i");;
|
||||
$('table tbody tr td.name').each(function (key,element) {
|
||||
if (regex.test($(element).text())) {
|
||||
$(element).parent().show();
|
||||
} else {
|
||||
$('table tbody tr').show();
|
||||
$(element).parent().hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -107,8 +107,7 @@ $_['subadmingroups'] = array_flip($items);
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
<form autocomplete="off" id="usersearchform">
|
||||
<label><?php p($l->t( 'Search' )); ?></label>
|
||||
<input type="text" class="input" />
|
||||
<input type="text" class="input" placeholder="<?php p($l->t( 'Search by Username' )); ?>" />
|
||||
</form>
|
||||
</div>
|
||||
<table class="hascontrols grid" data-groups="<?php p(json_encode($allGroups));?>">
|
||||
|
|
|
|||
Loading…
Reference in a new issue