mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-20 20:13:40 +03:00
Implement a 400ms delay in the searchbar
This commit is contained in:
parent
b035bfd52a
commit
7fc9c5aabb
1 changed files with 11 additions and 2 deletions
13
index.php
13
index.php
|
@ -627,15 +627,24 @@ $(document).ready(function () {
|
||||||
$('#domsearch').addClear({
|
$('#domsearch').addClear({
|
||||||
onClear: function() { $('#MasterZones').jtable('load'); }
|
onClear: function() { $('#MasterZones').jtable('load'); }
|
||||||
});
|
});
|
||||||
$('#domsearch').on('input', function (e) {
|
|
||||||
e.preventDefault();
|
function searchDoms() {
|
||||||
$('#MasterZones').jtable('load', {
|
$('#MasterZones').jtable('load', {
|
||||||
domsearch: $('#domsearch').val()
|
domsearch: $('#domsearch').val()
|
||||||
});
|
});
|
||||||
$('#SlaveZones').jtable('load', {
|
$('#SlaveZones').jtable('load', {
|
||||||
domsearch: $('#domsearch').val()
|
domsearch: $('#domsearch').val()
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
stimer = 0;
|
||||||
|
|
||||||
|
$('#domsearch').on('input', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
clearTimeout(stimer);
|
||||||
|
stimer = setTimeout(searchDoms, 400);
|
||||||
});
|
});
|
||||||
|
|
||||||
<? if (is_adminuser()) { ?>
|
<? if (is_adminuser()) { ?>
|
||||||
$('#Users').hide();
|
$('#Users').hide();
|
||||||
$('#useradmin').click(function () {
|
$('#useradmin').click(function () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue