Bug 38440

Summary: dt_button_clear_filter handling outside of datatables.js not needed
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: BLOCKED --- QA Contact: Lucas Gass (lukeg) <lucas>
Severity: minor    
Priority: P5 - low CC: lucas
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 38255    
Bug Blocks:    
Attachments: Bug 38440: Remove useless handling of .dt_button_clear_filter
Bug 38440: Remove useless handling of .dt_button_clear_filter
Bug 38440: Remove useless handling of .dt_button_clear_filter

Description Jonathan Druart 2024-11-14 09:16:35 UTC
This looks wrong:

koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt:            $(".dt_button_clear_filter").addClass("disabled");
koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt:            $(".dt_button_clear_filter").removeClass("disabled");
koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt:                    $(".dt_button_clear_filter").addClass("disabled");
koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt:                    $(".dt_button_clear_filter").removeClass("disabled");
koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt:                $(".dt_button_clear_filter").on("click", function(){
Comment 1 Jonathan Druart 2025-01-28 11:31:41 UTC
Created attachment 177263 [details] [review]
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
Comment 2 Owen Leonard 2025-01-28 14:42:42 UTC
Created attachment 177273 [details] [review]
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>
Comment 3 Lucas Gass (lukeg) 2025-01-31 16:36:07 UTC
Created attachment 177400 [details] [review]
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Lucas Gass (lukeg) 2025-01-31 16:36:46 UTC
PQA but also setting to BLOCKED as we wait for dependencies.