Bugzilla – Attachment 156323 Details for
Bug 34944
Remove the use of event attributes from OPAC full serial issue page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34944: Remove the use of event attributes from OPAC full serial issue page
Bug-34944-Remove-the-use-of-event-attributes-from-.patch (text/plain), 2.38 KB, created by
Owen Leonard
on 2023-09-28 11:37:51 UTC
(
hide
)
Description:
Bug 34944: Remove the use of event attributes from OPAC full serial issue page
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-09-28 11:37:51 UTC
Size:
2.38 KB
patch
obsolete
>From 93f76211efd69d9405151b39258e4fea096c334e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 28 Sep 2023 11:25:02 +0000 >Subject: [PATCH] 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. >--- > .../bootstrap/en/modules/opac-full-serial-issues.tt | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt >index 758dfcbeec..e644c9439c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt >@@ -113,7 +113,7 @@ > <strong>Show year: </strong> > [% FOREACH year IN years %] > [% IF ( year.year ) %] >- <a class="tabsubs" href="#" onclick="showlayer([% year.year | html %]); return false;">[% year.year | html %]</a> >+ <a class="tabsubs" href="#" data-year="[% year.year | html %]">[% year.year | html %]</a> > [% END %] > [% END %] > </div> >@@ -200,9 +200,12 @@ > $("#reset").click(function(){ > clearFilters(); > }); >- $("a.tabsubs").click(function(){ >+ $("a.tabsubs").on("click", function(e){ >+ e.preventDefault(); >+ let year = $(this).data("year"); > $("a.tabsubs").removeClass("currentsubtab"); > $(this).addClass("currentsubtab"); >+ showlayer( year ); > }); > $(".subscriptionstclass").dataTable($.extend(true, {}, dataTablesDefaults, { > "order": [[ 0, "desc" ]] >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34944
:
156323
|
156358
|
156364