Bugzilla – Attachment 177065 Details for
Bug 38958
Search history deletion broken in the staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38958: Search history deletion broken in the staff interface
Bug-38958-Search-history-deletion-broken-in-the-st.patch (text/plain), 2.59 KB, created by
Owen Leonard
on 2025-01-23 16:28:35 UTC
(
hide
)
Description:
Bug 38958: Search history deletion broken in the staff interface
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-01-23 16:28:35 UTC
Size:
2.59 KB
patch
obsolete
>From b91abc547b81d6682e4df7252ef60c941dcb5667 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 23 Jan 2025 16:20:12 +0000 >Subject: [PATCH] Bug 38958: Search history deletion broken in the staff > interface > >There is some JS on the staff interface search history page which uses a >jQuery selector that doesn't seem to work after the DataTables upgrade. >This patch fixes it. > >To test, apply the patch and enable EnableSearchHistory if necessary. > >- In the staff interface, perform a few catalog searches if necessary. >- Choose "Search history" from the user menu in the upper right. >- In the table of searches, check the checkbox next to one or more > search history entries. >- The delete button at the top of the table should become enabled. >- Clicking the delete button should work correctly to delete your > selected searches. >--- > .../prog/en/modules/catalogue/search-history.tt | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt >index 3c7e3449b5..2bb748d05c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt >@@ -248,7 +248,7 @@ > .attr('action', form.attr('action')) > .attr('method', form.attr('method')); > form.find('input[type="hidden"]') >- .add(table.$('input:checkbox:checked')) >+ .add( $('input:checkbox:checked', table) ) > .each(function() { > var input = $('<input type="hidden">') > .attr('name', $(this).attr('name')) >@@ -281,7 +281,7 @@ > e.preventDefault(); > var form = $(this).parents("form").first(); > var table = form.find('table').dataTable(); >- var ids = table.$("input:checkbox:checked"); >+ var ids = $("input:checkbox:checked", table); > if ( $(ids).length < 1 ) { > return false; > } >@@ -306,8 +306,8 @@ > > function enableCheckboxActions(form){ > // Enable/disable controls if checkboxes are checked >- var table = form.find('table').dataTable(); >- var checked_count = table.$("input:checkbox:checked").length; >+ var table = form.find('table'); >+ var checked_count = $("input:checkbox:checked", table).length; > if (checked_count) { > if (checked_count == 1) { > form.find(".selections").html(_("With selected search: ")); >-- >2.39.5
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 38958
:
177065
|
177066
|
177102