autofocus on user search

sandwich icon fixed
user search starts at the beginning of the string
This commit is contained in:
Ricsi
2017-01-19 23:40:58 +01:00
parent 1b78abb5c7
commit 8dfd618042
4 changed files with 10 additions and 5 deletions

View File

@@ -10,7 +10,7 @@
<div class="user_filter">
<input name="uk_filter_name" id="uk_filter_name" placeholder="Keresés...">
<input name="uk_filter_name" id="uk_filter_name" placeholder="Keresés..." autofocus>
<select name="is_active" id="is_active">
<option value="1">Aktív tagok</option>
<option value="0">Passzív tagok</option>
@@ -19,6 +19,7 @@
</div>
<div class="list" id="user_list">
@@ -30,11 +31,12 @@ var Timer;
$( document ).ready(function() {
$("#is_active").trigger("change");
$("#uk_filter_name").focus();
});
$("#is_active").change(search);
$("#uk_filter_name").keypress(function() {
$("#uk_filter_name").keyup(function() {
document.getElementById('user_list').innerHTML = 'Betöltés...';
clearTimeout(Timer);
Timer = window.setTimeout(search, 1000);