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 commit 10ef1fe672)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
c1078784db
commit
fc8972d45b
|
|
@ -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" ]]
|
||||
|
|
|
|||
Loading…
Reference in New Issue