Bugzilla – Attachment 134061 Details for
Bug 30607
Enable 'Clear filter' option on DataTables Search for patron searches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30607: Don't overload our default initComplete
Bug-30607-Dont-overload-our-default-initComplete.patch (text/plain), 1.74 KB, created by
Jonathan Druart
on 2022-04-27 11:55:17 UTC
(
hide
)
Description:
Bug 30607: Don't overload our default initComplete
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-04-27 11:55:17 UTC
Size:
1.74 KB
patch
obsolete
>From 4d94a5207b1dc5b13ecf9dce5df1751b930b61bf Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 27 Apr 2022 13:52:55 +0200 >Subject: [PATCH] Bug 30607: Don't overload our default initComplete > >We want to keep the default initComplete call to add/remove the >'disabled' class on the 'Clear filters' link. > >Test plan: >Search for patrons, add something to the general DT search and confirm >that the 'Clear filters' link can be clicked (ie. is not disabled) when >the input field is not empty. >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index c33943df1e7..39490b796a2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -512,6 +512,16 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { > if(options) { > if(!options.criteria || ['contains', 'starts_with', 'ends_with', 'exact'].indexOf(options.criteria.toLowerCase()) === -1) options.criteria = 'contains'; > options.criteria = options.criteria.toLowerCase(); >+ >+ // Don't redefine the default initComplete >+ if ( options.initComplete ) { >+ let our_initComplete = options.initComplete; >+ options.initComplete = function(settings, json){ >+ our_initComplete(settings, json); >+ dataTablesDefaults.initComplete(settings, json) >+ }; >+ } >+ > settings = $.extend(true, {}, dataTablesDefaults, { > 'deferRender': true, > "paging": true, >-- >2.25.1
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 30607
:
134061
|
134450
|
134695