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