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> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> (cherry picked from commit10ef1fe672) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commitfc8972d45b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
parent
6556450b8d
commit
8d10a8ca3d
|
|
@ -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>
|
||||
|
|
@ -211,9 +211,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" ]]
|
||||
|
|
|
|||
Loading…
Reference in New Issue