autofocus on user search
sandwich icon fixed user search starts at the beginning of the string
This commit is contained in:
@@ -7,7 +7,7 @@ else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos');
|
||||
|
||||
$filter1 = "";
|
||||
if (!empty($_POST['uk_filter_name'])) {
|
||||
$filter1 = "AND uk_name LIKE '%".$_POST['uk_filter_name']."%'";
|
||||
$filter1 = "AND uk_name LIKE '".$_POST['uk_filter_name']."%'";
|
||||
}
|
||||
|
||||
$filter2 = "";
|
||||
|
||||
@@ -73,6 +73,10 @@ setlocale(LC_ALL, 'hu_HU');
|
||||
onReady(function () {
|
||||
show('main_content', true);
|
||||
show('loading', false);
|
||||
//user list autofocus Firefox fix
|
||||
if ($("#uk_filter_name").length) {
|
||||
$("#uk_filter_name").focus();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
{if $can_logout}
|
||||
<li class="icon">
|
||||
<a href="javascript:void(0);" onclick="myFunction()">
|
||||
Menü
|
||||
☰
|
||||
Menü ≡
|
||||
</a>
|
||||
<span class="mobile_logout">
|
||||
{if $page == 'admin'}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user