Bug 34944

Summary: Remove the use of event attributes from OPAC full serial issue page
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: dcook, fridolin.somers, m.de.rooy, testopia, victor
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.05,22.11.11
Circulation function:
Bug Depends on:    
Bug Blocks: 34709    
Attachments: Bug 34944: Remove the use of event attributes from OPAC full serial issue page
Bug 34944: Remove the use of event attributes from OPAC full serial issue page
Bug 34944: Remove the use of event attributes from OPAC full serial issue page

Description Owen Leonard 2023-09-28 11:24:50 UTC
There are some event attributes in the OPAC's full serial issues page template. These should be removed in favor of defining events in JavaScript.
Comment 1 Owen Leonard 2023-09-28 11:37:51 UTC
Created attachment 156323 [details] [review]
Bug 34944: Remove the use of event attributes from OPAC full serial issue page

This patch removes the use of event attributes (onclick) from the OPAC's
full serial issues template. These events are defined now along with the
other in-page JS.

To test you must have a serial record with issues from multiple years.

- Locate the serial record and view the detail page.
- Click "More details" at the bottom of the "Subscriptions" tab.
- Click the "Full history" tab.
- Test the "Show year" controls to confirm that clicking each year
  correctly filters the table of issues to show only issues from that
  year.
Comment 2 Victor Grousset/tuxayo 2023-09-28 21:57:03 UTC
Created attachment 156358 [details] [review]
Bug 34944: Remove the use of event attributes from OPAC full serial issue page

This patch removes the use of event attributes (onclick) from the OPAC's
full serial issues template. These events are defined now along with the
other in-page JS.

To test you must have a serial record with issues from multiple years.

- Locate the serial record and view the detail page.
- Click "More details" at the bottom of the "Subscriptions" tab.
- Click the "Full history" tab.
- Test the "Show year" controls to confirm that clicking each year
  correctly filters the table of issues to show only issues from that
  year.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 3 Victor Grousset/tuxayo 2023-09-28 22:01:21 UTC
It works! :)

testing notes:

> To test you must have a serial record with issues from multiple years.

create a subscription (no very frequent to not need tons of issues per year) => receive => multi receive => tons!!!! => here you go, you should have a few years
Comment 4 Marcel de Rooy 2023-09-29 07:39:09 UTC
Created attachment 156364 [details] [review]
Bug 34944: Remove the use of event attributes from OPAC full serial issue page

This patch removes the use of event attributes (onclick) from the OPAC's
full serial issues template. These events are defined now along with the
other in-page JS.

To test you must have a serial record with issues from multiple years.

- Locate the serial record and view the detail page.
- Click "More details" at the bottom of the "Subscriptions" tab.
- Click the "Full history" tab.
- Test the "Show year" controls to confirm that clicking each year
  correctly filters the table of issues to show only issues from that
  year.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Tomás Cohen Arazi (tcohen) 2023-10-04 13:15:15 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 6 Fridolin Somers 2023-10-05 19:56:19 UTC
Pushed to 23.05.x for 23.05.05
Comment 7 Matt Blenkinsop 2023-10-17 17:12:14 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x