Bugzilla – Attachment 158778 Details for
Bug 35284
No more delay between 2 DT requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35284: Add throttling to column filters
Bug-35284-Add-throttling-to-column-filters.patch (text/plain), 1.49 KB, created by
David Cook
on 2023-11-09 23:50:09 UTC
(
hide
)
Description:
Bug 35284: Add throttling to column filters
Filename:
MIME Type:
Creator:
David Cook
Created:
2023-11-09 23:50:09 UTC
Size:
1.49 KB
patch
obsolete
>From 3a4ce9e85fb030bfdaeb75e7bd0d8b33e29a1733 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 9 Nov 2023 08:58:41 +0100 >Subject: [PATCH] Bug 35284: Add throttling to column filters > >Signed-off-by: David Cook <dcook@prosentient.com.au> >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index d0e27a1462..84ca9d83d7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -911,13 +911,17 @@ function _dt_add_filters(table_node, table_dt, filters_options = {}) { > } > } > >+ var search = $.fn.dataTable.util.throttle( function ( i, val ) { >+ table_dt >+ .column( i ) >+ .search( val ) >+ .draw(); >+ }, 1000 ); >+ > $( input_type, this ).on( 'keyup change', function () { > if ( table_dt.column(i).search() !== this.value ) { > if ( input_type == "input" ) { >- table_dt >- .column(i) >- .search( this.value ) >- .draw(); >+ search(i, this.value) > } else { > table_dt > .column(i) >-- >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 35284
:
158676
|
158705
|
158706
|
158707
|
158708
|
158776
|
158777
|
158778
|
158779
|
158783
|
158784
|
158785
|
158786
|
158787