summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorraghunayyar <me@iraghu.com>2014-02-12 19:38:21 +0530
committerArthur Schiwon <blizzz@owncloud.com>2014-06-02 12:52:53 +0200
commit8e34316e04dd2ca3b43f2d862adab050e2fcca57 (patch)
treebe29aa711a31beccbc0448718602cb67f27f0642 /settings
parentc7af9cd6dd81072cf686ec123322c4241322bf73 (diff)
downloadnextcloud-server-8e34316e04dd2ca3b43f2d862adab050e2fcca57.tar.gz
nextcloud-server-8e34316e04dd2ca3b43f2d862adab050e2fcca57.zip
Fixes User Search by username.
Diffstat (limited to 'settings')
-rw-r--r--settings/js/users.js10
-rw-r--r--settings/templates/users.php3
2 files changed, 6 insertions, 7 deletions
diff --git a/settings/js/users.js b/settings/js/users.js
index c1a52ef9bee..4609a56b494 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -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();
}
});
});
diff --git a/settings/templates/users.php b/settings/templates/users.php
index 89c83c3bd41..ec9ca074164 100644
--- a/settings/templates/users.php
+++ b/settings/templates/users.php
@@ -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));?>">