Bug 34936 - Remove the use of event attributes from OPAC detail page
Summary: Remove the use of event attributes from OPAC detail 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 16:40 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 34936: Remove the use of event attributes from OPAC detail page (4.72 KB, patch)
2023-09-27 16:51 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34936: Remove the use of event attributes from OPAC detail page (4.78 KB, patch)
2023-09-28 15:31 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 34936: Remove the use of event attributes from OPAC detail page (4.83 KB, patch)
2023-09-29 12:33 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 16:40:20 UTC
There are some event attributes in the OPAC's bibliographic detail page template. These should be removed in favor of defining events in JavaScript.
Comment 1 Owen Leonard 2023-09-27 16:51:28 UTC
Created attachment 156301 [details] [review]
Bug 34936: Remove the use of event attributes from OPAC detail page

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

The patch also adjusts the global "Dopop" function so that the popup
window is a litte bigger. The comments form did not fit well.

In checking for use of the "Dopop" function I found that it was being
redefined in opac-topissues.tt for no reason so I removed it.

To test you must have the OPACComments system preference enabled.

- Log in to the OPAC, locate a bibliographic record, and view the detail
  page.
- Under the "Comments" tab, click the "Post your comments on this title"
  link. It should trigger a popup window.
  - Submit your comment. When the detail page reloads, return to the
    "Comments" tab and click the "Edit" link on your comment. The same
    popup window should be triggered.
Comment 2 Victor Grousset/tuxayo 2023-09-28 15:31:56 UTC
Created attachment 156338 [details] [review]
Bug 34936: Remove the use of event attributes from OPAC detail page

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

The patch also adjusts the global "Dopop" function so that the popup
window is a litte bigger. The comments form did not fit well.

In checking for use of the "Dopop" function I found that it was being
redefined in opac-topissues.tt for no reason so I removed it.

To test you must have the OPACComments system preference enabled.

- Log in to the OPAC, locate a bibliographic record, and view the detail
  page.
- Under the "Comments" tab, click the "Post your comments on this title"
  link. It should trigger a popup window.
  - Submit your comment. When the detail page reloads, return to the
    "Comments" tab and click the "Edit" link on your comment. The same
    popup window should be triggered.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 3 Victor Grousset/tuxayo 2023-09-28 15:32:28 UTC
It work! :D


> The patch also adjusts the global "Dopop" function so that the popup
window is a litte bigger. The comments form did not fit well.

Nice addition :)
Comment 4 Katrin Fischer 2023-09-29 12:33:55 UTC
Created attachment 156389 [details] [review]
Bug 34936: Remove the use of event attributes from OPAC detail page

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

The patch also adjusts the global "Dopop" function so that the popup
window is a litte bigger. The comments form did not fit well.

In checking for use of the "Dopop" function I found that it was being
redefined in opac-topissues.tt for no reason so I removed it.

To test you must have the OPACComments system preference enabled.

- Log in to the OPAC, locate a bibliographic record, and view the detail
  page.
- Under the "Comments" tab, click the "Post your comments on this title"
  link. It should trigger a popup window.
  - Submit your comment. When the detail page reloads, return to the
    "Comments" tab and click the "Edit" link on your comment. The same
    popup window should be triggered.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 5 Tomás Cohen Arazi 2023-10-03 12:55:37 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 6 Fridolin Somers 2023-10-05 18:49:21 UTC
Pushed to 23.05.x for 23.05.05
Comment 7 Jacob O'Mara 2023-10-17 13:38:05 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x