mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Fixed: History grid loads faster (lazy loaded)
This commit is contained in:
parent
69a19b14c8
commit
d44c07b27b
23 changed files with 245 additions and 39 deletions
|
@ -0,0 +1,33 @@
|
|||
$.fn.dataTableExt.oApi.fnSetFilteringDelay = function (oSettings, iDelay) {
|
||||
/*
|
||||
* Inputs: object:oSettings - dataTables settings object - automatically given
|
||||
* integer:iDelay - delay in milliseconds
|
||||
* Usage: $('#example').dataTable().fnSetFilteringDelay(250);
|
||||
* Author: Zygimantas Berziunas (www.zygimantas.com) and Allan Jardine
|
||||
* License: GPL v2 or BSD 3 point style
|
||||
* Contact: zygimantas.berziunas /AT\ hotmail.com
|
||||
*/
|
||||
var _that = this,
|
||||
iDelay = (typeof iDelay == 'undefined') ? 250 : iDelay;
|
||||
|
||||
this.each(function (i) {
|
||||
$.fn.dataTableExt.iApiIndex = i;
|
||||
var oTimerId = null,
|
||||
sPreviousSearch = null,
|
||||
anControl = $('input', _that.fnSettings().aanFeatures.f);
|
||||
|
||||
anControl.unbind('keyup').bind('keyup', function () {
|
||||
if (sPreviousSearch === null || sPreviousSearch != anControl.val()) {
|
||||
window.clearTimeout(oTimerId);
|
||||
sPreviousSearch = anControl.val();
|
||||
oTimerId = window.setTimeout(function () {
|
||||
$.fn.dataTableExt.iApiIndex = i;
|
||||
_that.fnFilter(anControl.val());
|
||||
}, iDelay);
|
||||
}
|
||||
});
|
||||
|
||||
return this;
|
||||
});
|
||||
return this;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue