Bugzilla – Attachment 134450 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.79 KB, created by
David Nind
on 2022-05-02 01:30:54 UTC
(
hide
)
Description:
Bug 30607: Don't overload our default initComplete
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-05-02 01:30:54 UTC
Size:
1.79 KB
patch
obsolete
>From 9944c7894df3740fc89958ccc21545e69ad73772 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. > >Signed-off-by: David Nind <david@davidnind.com> >--- > 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 7b8e024d50..e2d8547157 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.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 30607
:
134061
|
134450
|
134695