Bugzilla – Attachment 159018 Details for
Bug 35309
Remove DT's fnSetFilteringDelay
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35309: Remove DT's fnSetFilteringDelay
Bug-35309-Remove-DTs-fnSetFilteringDelay.patch (text/plain), 3.42 KB, created by
Lucas Gass (lukeg)
on 2023-11-15 23:13:18 UTC
(
hide
)
Description:
Bug 35309: Remove DT's fnSetFilteringDelay
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-11-15 23:13:18 UTC
Size:
3.42 KB
patch
obsolete
>From d604a9c86ed01e77a0b43e64b1d943c8244a7e41 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Nov 2023 11:44:37 +0100 >Subject: [PATCH] Bug 35309: Remove DT's fnSetFilteringDelay > >On bug 35284 we added the delay on the column filters using dt's >throttle builtin function. > >From doc: >https://datatables.net/plug-ins/api/fnSetFilteringDelay >""" >Please note that this plug-in has been deprecated and the dt-init searchDelay option in DataTables 1.10 should now be used. This plug-in will not operate with v1.10+. > >Test plan: >Note that column filtering still work as before (test on different >tables, see bug 35284 for the list) > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 47 ------------------- > 1 file changed, 47 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index a70d796e145..002fffa61cd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -110,56 +110,9 @@ $.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, > // These keys must not launch filtering > var blacklist_keys = new Array(0, 16, 17, 18, 37, 38, 39, 40); > >-// Set a filtering delay for global search field >-jQuery.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 >- $this = this, >- oTimerId = null, >- sPreviousSearch = null, >- anControl = $( 'input', _that.fnSettings().aanFeatures.f ); >- >- anControl.unbind( 'keyup.DT' ).bind( 'keyup.DT', function(event) { >- var $$this = $this; >- if (blacklist_keys.indexOf(event.keyCode) != -1) { >- return this; >- }else if ( event.keyCode == '13' ) { >- $.fn.dataTableExt.iApiIndex = i; >- _that.fnFilter( $(this).val() ); >- } else { >- 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; >-} >- > // Add a filtering delay on general search and on all input (with a class 'filter') > jQuery.fn.dataTableExt.oApi.fnAddFilters = function ( oSettings, sClass, iDelay ) { > var table = this; >- this.fnSetFilteringDelay(iDelay); > var filterTimerId = null; > $(table).find("input."+sClass).keyup(function(event) { > if (blacklist_keys.indexOf(event.keyCode) != -1) { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35309
:
158978
|
159018
|
159228