Bug 29430 - Table cell click doesn't activate buttons in patron search
Summary: Table cell click doesn't activate buttons in patron search
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Joonas Kylmälä
URL:
Keywords:
Depends on: 15812
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-05 18:17 UTC by Owen Leonard
Modified: 2021-11-11 12:34 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.11.00


Attachments
Bug 29430: Table cell click doesn't activate buttons in patron search (1.77 KB, patch)
2021-11-05 18:29 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29430: Table cell click doesn't activate buttons in patron search (1.83 KB, patch)
2021-11-05 20:46 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 29430: Table cell click doesn't activate buttons in patron search (1.98 KB, patch)
2021-11-06 16:27 UTC, Joonas Kylmälä
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2021-11-05 18:17:12 UTC
In patron search results, if you check one or more checkboxes it changes the state of the "Add to patron list" and "Merge patrons" buttons. The same doesn't happen if you click the table cell. When JS was added to allow a click of the table cell to toggle the checkbox inside it didn't take into account the change function which would need to be triggered.
Comment 1 Owen Leonard 2021-11-05 18:29:55 UTC
Created attachment 127401 [details] [review]
Bug 29430: Table cell click doesn't activate buttons in patron search

Bug 15812 included a change which allows a click on the patron
search results table cell to toggle the checkbox it contains. This patch
modifies that click event so that it fires the change() event which is
required for toggling the "Add to patron list" and "Merge patrons"
buttons.

To reproduce this problem, perform a patron search in the staff client
which will return multiple results.
 - In the first column containing checkboxes, click in the empty part of
   the table cell. The checkbox should be checked.
   - However, the "Add to patron list" button remains disabled.
  - Clicking a table cell to check another checkbox should result in the
    "Merge selected patrons" button being enabled, but it doesn't.

To test, apply the patch and repeat the process above. The behavior of
the buttons should be the same whether you're clicking the checkbox
itself or the table cell it's in.
Comment 2 PTFS Europe Sandboxes 2021-11-05 20:46:50 UTC
Created attachment 127407 [details] [review]
Bug 29430: Table cell click doesn't activate buttons in patron search

Bug 15812 included a change which allows a click on the patron
search results table cell to toggle the checkbox it contains. This patch
modifies that click event so that it fires the change() event which is
required for toggling the "Add to patron list" and "Merge patrons"
buttons.

To reproduce this problem, perform a patron search in the staff client
which will return multiple results.
 - In the first column containing checkboxes, click in the empty part of
   the table cell. The checkbox should be checked.
   - However, the "Add to patron list" button remains disabled.
  - Clicking a table cell to check another checkbox should result in the
    "Merge selected patrons" button being enabled, but it doesn't.

To test, apply the patch and repeat the process above. The behavior of
the buttons should be the same whether you're clicking the checkbox
itself or the table cell it's in.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 3 Joonas Kylmälä 2021-11-06 16:27:26 UTC
Created attachment 127412 [details] [review]
Bug 29430: Table cell click doesn't activate buttons in patron search

Bug 15812 included a change which allows a click on the patron
search results table cell to toggle the checkbox it contains. This patch
modifies that click event so that it fires the change() event which is
required for toggling the "Add to patron list" and "Merge patrons"
buttons.

To reproduce this problem, perform a patron search in the staff client
which will return multiple results.
 - In the first column containing checkboxes, click in the empty part of
   the table cell. The checkbox should be checked.
   - However, the "Add to patron list" button remains disabled.
  - Clicking a table cell to check another checkbox should result in the
    "Merge selected patrons" button being enabled, but it doesn't.

To test, apply the patch and repeat the process above. The behavior of
the buttons should be the same whether you're clicking the checkbox
itself or the table cell it's in.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 4 Jonathan Druart 2021-11-08 11:20:02 UTC
Pushed to master for 21.11, thanks to everybody involved!