Bugzilla – Attachment 144178 Details for
Bug 32303
DT pagination on system preference search result
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32303: DT pagination on system preference search result
Bug-32303-DT-pagination-on-system-preference-searc.patch (text/plain), 2.15 KB, created by
David Nind
on 2022-11-22 22:48:36 UTC
(
hide
)
Description:
Bug 32303: DT pagination on system preference search result
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-11-22 22:48:36 UTC
Size:
2.15 KB
patch
obsolete
>From d41b34e6f2c497c0fe5840cb650cf3ae7a4efd00 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 22 Nov 2022 15:19:52 +0000 >Subject: [PATCH] Bug 32303: DT pagination on system preference search result > >This patch updates the way we retrieve a DataTable's saved state during >initialization. The change is to prevent cases where making a duplicate >call to DataTables() initializes the table again. > >To recreate the bug, search system preferences for the term "last." >Scroll down to the "OPAC preferences" section and observe that there are >two filter forms displayed above it. > >Apply the patch and perform the same search again. The extra forms >should be gone. > >Confirm that DataTables behavior is still the same: > > - Test pages which use the "saveState" option in DataTables. > - Type text in the table's search field > - Reload the page. The search field should still have the string you > entered, and the "Clear filter" button should be active. > - Administration -> Libraries > - Acquisitions -> Vendor -> Receive shipments -> Receive orders > - Circulation -> Overdues > > - Test pages which don't use the "saveState" option, e.g. the checkout > screen, patron search results, list of saved reports, etc. The > behavior of the search form and table operations in general should be > unchanged. > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 94a532b19e..0fbb9b625c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -53,7 +53,7 @@ var dataTablesDefaults = { > "fixedHeader": true, > initComplete: function( settings) { > var tableId = settings.nTable.id >- var state = $("#" + tableId ).DataTable().state(); >+ var state = settings.oLoadedState; > state && toggledClearFilter(state.search.search, tableId); > // When the DataTables search function is triggered, > // enable or disable the "Clear filter" button based on >-- >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 32303
:
144159
|
144178
|
144187