Bugzilla – Attachment 177273 Details for
Bug 38440
dt_button_clear_filter handling outside of datatables.js not needed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38440: Remove useless handling of .dt_button_clear_filter
Bug-38440-Remove-useless-handling-of-dtbuttonclear.patch (text/plain), 2.17 KB, created by
Owen Leonard
on 2025-01-28 14:42:42 UTC
(
hide
)
Description:
Bug 38440: Remove useless handling of .dt_button_clear_filter
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-01-28 14:42:42 UTC
Size:
2.17 KB
patch
obsolete
>From c7bf726a8d133de8383b22a15597a262de10bd61 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 28 Jan 2025 12:28:27 +0100 >Subject: [PATCH] Bug 38440: Remove useless handling of .dt_button_clear_filter > >There is only one occurrence in the whole codebase, we should not >handle the behaviour of this "clear filter" button outside of >datatables.js > >Test plan: >Go to Additional content >Use the form on the left side of the page, confirm that the table is >filtered when a new keyword is entered >Notice that the global search of the table is filled in with the keyword >"Clear filters" should reset both inputs, and redraw the table > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../prog/en/modules/tools/additional-contents.tt | 16 ---------------- > 1 file changed, 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >index ddac9fdd71..976bc67f73 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >@@ -576,15 +576,6 @@ > } else { > table.search( term ).draw(); > } >- clearFilter( term ); >- } >- >- function clearFilter( term ){ >- if( term == "" ){ >- $(".dt_button_clear_filter").addClass("disabled"); >- } else { >- $(".dt_button_clear_filter").removeClass("disabled"); >- } > } > > /* Custom table search configuration: If a table row >@@ -655,13 +646,6 @@ > var opt = $(this).find("option:selected").text(); > filterDataTable( table_dt, 2, opt ); > }); >- >- $(".dt_button_clear_filter").on("click", function(){ >- table_dt.search('').columns().search('').draw(); >- $("#news-filter select").each(function(){ >- $(this).val(""); >- }); >- }); > }); > </script> > [% ELSE %] >-- >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 38440
:
177263
|
177273
|
177400