Bug 38440 - dt_button_clear_filter handling outside of datatables.js not needed
Summary: dt_button_clear_filter handling outside of datatables.js not needed
Status: BLOCKED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Lucas Gass (lukeg)
URL:
Keywords:
Depends on: 38255
Blocks:
  Show dependency treegraph
 
Reported: 2024-11-14 09:16 UTC by Jonathan Druart
Modified: 2025-01-31 16:36 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 38440: Remove useless handling of .dt_button_clear_filter (2.13 KB, patch)
2025-01-28 11:31 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38440: Remove useless handling of .dt_button_clear_filter (2.17 KB, patch)
2025-01-28 14:42 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38440: Remove useless handling of .dt_button_clear_filter (2.23 KB, patch)
2025-01-31 16:36 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.