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 = "";
|
$filter1 = "";
|
||||||
if (!empty($_POST['uk_filter_name'])) {
|
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 = "";
|
$filter2 = "";
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ setlocale(LC_ALL, 'hu_HU');
|
|||||||
onReady(function () {
|
onReady(function () {
|
||||||
show('main_content', true);
|
show('main_content', true);
|
||||||
show('loading', false);
|
show('loading', false);
|
||||||
|
//user list autofocus Firefox fix
|
||||||
|
if ($("#uk_filter_name").length) {
|
||||||
|
$("#uk_filter_name").focus();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
{if $can_logout}
|
{if $can_logout}
|
||||||
<li class="icon">
|
<li class="icon">
|
||||||
<a href="javascript:void(0);" onclick="myFunction()">
|
<a href="javascript:void(0);" onclick="myFunction()">
|
||||||
Menü
|
Menü ≡
|
||||||
☰
|
|
||||||
</a>
|
</a>
|
||||||
<span class="mobile_logout">
|
<span class="mobile_logout">
|
||||||
{if $page == 'admin'}
|
{if $page == 'admin'}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="user_filter">
|
<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">
|
<select name="is_active" id="is_active">
|
||||||
<option value="1">Aktív tagok</option>
|
<option value="1">Aktív tagok</option>
|
||||||
<option value="0">Passzív tagok</option>
|
<option value="0">Passzív tagok</option>
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="list" id="user_list">
|
<div class="list" id="user_list">
|
||||||
|
|
||||||
|
|
||||||
@@ -30,11 +31,12 @@ var Timer;
|
|||||||
|
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
$("#is_active").trigger("change");
|
$("#is_active").trigger("change");
|
||||||
|
$("#uk_filter_name").focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$("#is_active").change(search);
|
$("#is_active").change(search);
|
||||||
$("#uk_filter_name").keypress(function() {
|
$("#uk_filter_name").keyup(function() {
|
||||||
document.getElementById('user_list').innerHTML = 'Betöltés...';
|
document.getElementById('user_list').innerHTML = 'Betöltés...';
|
||||||
clearTimeout(Timer);
|
clearTimeout(Timer);
|
||||||
Timer = window.setTimeout(search, 1000);
|
Timer = window.setTimeout(search, 1000);
|
||||||
|
|||||||
Reference in New Issue
Block a user