Bugzilla – Attachment 131668 Details for
Bug 30183
ILL table search filtering broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30183: Fetch flatPickr instance prior to custom search definition
Bug-30183-Fetch-flatPickr-instance-prior-to-custom.patch (text/plain), 2.18 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-03-14 17:25:56 UTC
(
hide
)
Description:
Bug 30183: Fetch flatPickr instance prior to custom search definition
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-03-14 17:25:56 UTC
Size:
2.18 KB
patch
obsolete
>From 56781dd0eb2a8127ee8579d8db3d8e411dd7a621 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 14 Mar 2022 14:32:31 +0000 >Subject: [PATCH] Bug 30183: Fetch flatPickr instance prior to custom search > definition > >This patch updates teh search customisations in ill-list-table to >properly fetch the existing flatpickr instances for date searches. > >To test: >1. Have at least one ILL request on the ILL requests page >2. Open the broser inspector >3. Choose a date on the left hand form >=> FAIL: Errors in the console, search doesn't work >4. Apply this patch >5. Reload >6. Repeat 2-3 >=> SUCCESS: No more errors, filtering works! >7. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >index 414bcf8f22..920d6aed68 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >@@ -498,10 +498,10 @@ $(document).ready(function() { > > // Custom date range filtering > $.fn.dataTable.ext.search.push(function(settings, data, dataIndex) { >- var placedStart = illfilter_dateplaced_start.selectedDates[0]; >- var placedEnd = illfilter_dateplaced_end.selectedDates[0]; >- var modifiedStart = illfilter_datemodified_start.selectedDates[0]; >- var modifiedEnd = illfilter_datemodified_end.selectedDates[0]; >+ var placedStart = $('#illfilter_dateplaced_start').get(0)._flatpickr.selectedDates[0]; >+ var placedEnd = $('#illfilter_dateplaced_end').get(0)._flatpickr.selectedDates[0]; >+ var modifiedStart = $('#illfilter_datemodified_start').get(0)._flatpickr.selectedDates[0]; >+ var modifiedEnd = $('#illfilter_datemodified_end').get(0)._flatpickr.selectedDates[0]; > var rowPlaced = data[14] ? new Date(data[14]) : null; > var rowModified = data[16] ? new Date(data[16]) : null; > var placedPassed = true; >-- >2.32.0
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 30183
:
131661
|
131668
|
131913