Bugzilla – Attachment 134695 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.92 KB, created by
Marcel de Rooy
on 2022-05-06 08:41:23 UTC
(
hide
)
Description:
Bug 30607: Don't overload our default initComplete
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-05-06 08:41:23 UTC
Size:
1.92 KB
patch
obsolete
>From 91a35fcc81de864897848824ab58daace0ebb9ee 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 >Content-Type: text/plain; charset=utf-8 > >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> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Agree that it does not look very elegant. >--- > 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.20.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