Bugzilla – Attachment 172394 Details for
Bug 38071
"Clear filter" on catalogue details page always disabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38071: Make it so that 'clear filter' also clears the filter values
Bug-38071-Make-it-so-that-clear-filter-also-clears.patch (text/plain), 2.05 KB, created by
Pedro Amorim
on 2024-10-04 12:43:13 UTC
(
hide
)
Description:
Bug 38071: Make it so that 'clear filter' also clears the filter values
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-10-04 12:43:13 UTC
Size:
2.05 KB
patch
obsolete
>From ccd07ee03e84a26a59fa256a37dff36394c1a4fb Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 4 Oct 2024 12:33:27 +0000 >Subject: [PATCH] Bug 38071: Make it so that 'clear filter' also clears the > filter values > >1 - Browse to details record for a biblio with items >2 - Click 'Show filters' >3 - Select/type in some filters >4 - Note 'Clear filters' is grayed out >5 - Try to click it, no response >6 - Apply patches. Repeat (make sure to use the search text input as well as the column filters. >7 - Repeat the same test plan but for the patrons table >8 - Verify all is working as intended >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 6a96ce163dd..778fb3de13f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -721,6 +721,10 @@ function _dt_buttons(params){ > enabled: false, > text: '<i class="fa fa-lg fa-remove"></i> <span class="dt-button-text">' + __("Clear filter") + '</span>', > action: function ( e, dt, node, config ) { >+ $(".dt_filter_col input, .dt_filter_col select").val(""); >+ dt.columns().every( function () { >+ this.search( "" ); >+ } ); > dt.search( "" ).draw("page"); > node.addClass("disabled"); > } >@@ -822,7 +826,7 @@ function _dt_add_filters(table_node, table_dt, filters_options = {}) { > > $(table_node).find('thead tr:eq(1) th').each( function (i) { > var is_searchable = table_dt.settings()[0].aoColumns[i].bSearchable; >- $(this).removeClass('sorting').removeClass("sorting_asc").removeClass("sorting_desc"); >+ $(this).removeClass('sorting').removeClass("sorting_asc").removeClass("sorting_desc").addClass("dt_filter_col"); > $(this).data('th-id', i); > if ( is_searchable ) { > let input_type = 'input'; >-- >2.43.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 38071
:
172390
|
172391
|
172392
|
172393
|
172394
|
172444
|
172446
|
172494