Bug 34934 - Remove the use of event attributes from OPAC lists page
Summary: Remove the use of event attributes from OPAC lists page
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks: 34709
  Show dependency treegraph
 
Reported: 2023-09-27 15:43 UTC by Owen Leonard
Modified: 2023-10-17 13:38 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small 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


Attachments
Bug 34934: Remove the use of event attributes from OPAC lists page (4.99 KB, patch)
2023-09-27 16:01 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34934: Remove the use of event attributes from OPAC lists page (5.05 KB, patch)
2023-09-28 08:48 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 34934: Remove the use of event attributes from OPAC lists page (5.10 KB, patch)
2023-09-29 13:23 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2023-09-27 15:43:03 UTC
There are some event attributes in the OPAC lists template. These should be removed in favor of defining events in JavaScript.
Comment 1 Owen Leonard 2023-09-27 16:01:43 UTC
Created attachment 156298 [details] [review]
Bug 34934: Remove the use of event attributes from OPAC lists page

This patch removes the use of event attributes (onclick, onchange) from
the OPAC lists template. These events are defined now along with the
other in-page JS.

The patch also removes a "delete list" button which was only shown
when viewing an empty list and which was redundant.

To test, apply the patch and log into the OPAC.

- Go to Lists -> New list.
- Change the category to "Private" and the "Allow changes" dropdown to
  "Staff only."
  - You should see a message, 'The "Staff only" permission has no actual
    effect while this list is strictly private'
- Change the category to "Public." The message should disappear.

- View the contents of a list.
  - Click the "Send list" button at the top of the table of titles.
  - It should trigger the "Sending your list" popup window.
Comment 2 Pedro Amorim 2023-09-28 08:48:55 UTC
Created attachment 156313 [details] [review]
Bug 34934: Remove the use of event attributes from OPAC lists page

This patch removes the use of event attributes (onclick, onchange) from
the OPAC lists template. These events are defined now along with the
other in-page JS.

The patch also removes a "delete list" button which was only shown
when viewing an empty list and which was redundant.

To test, apply the patch and log into the OPAC.

- Go to Lists -> New list.
- Change the category to "Private" and the "Allow changes" dropdown to
  "Staff only."
  - You should see a message, 'The "Staff only" permission has no actual
    effect while this list is strictly private'
- Change the category to "Public." The message should disappear.

- View the contents of a list.
  - Click the "Send list" button at the top of the table of titles.
  - It should trigger the "Sending your list" popup window.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 3 Katrin Fischer 2023-09-29 13:23:07 UTC
Created attachment 156391 [details] [review]
Bug 34934: Remove the use of event attributes from OPAC lists page

This patch removes the use of event attributes (onclick, onchange) from
the OPAC lists template. These events are defined now along with the
other in-page JS.

The patch also removes a "delete list" button which was only shown
when viewing an empty list and which was redundant.

To test, apply the patch and log into the OPAC.

- Go to Lists -> New list.
- Change the category to "Private" and the "Allow changes" dropdown to
  "Staff only."
  - You should see a message, 'The "Staff only" permission has no actual
    effect while this list is strictly private'
- Change the category to "Public." The message should disappear.

- View the contents of a list.
  - Click the "Send list" button at the top of the table of titles.
  - It should trigger the "Sending your list" popup window.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 4 Tomás Cohen Arazi 2023-10-03 12:55:34 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 5 Fridolin Somers 2023-10-05 19:17:39 UTC
Pushed to 23.05.x for 23.05.05
Comment 6 Jacob O'Mara 2023-10-17 13:38:01 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x