Bug 25038: Fix tabs on the OPAC reading history view

OPAC reading history table has three tabs for different checkout types: All, Checkouts, On-site checkouts.

However, all of your checkouts are visible every tab regardless of checkout type.

Test plan:
1. Enable OnSiteCheckouts system preference
2. Perform two checkouts: one normal checkout, one on-site checkout
3. Go to OPAC /cgi-bin/koha/opac-readingrecord.pl
4. Observe your checkouts all are visible in first tab
5. Select second tab and notice that the table is now filtered
6. Same with third tab

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2020-04-07 13:25:09 +02:00 committed by Joy Nelson
parent 93d95ac1b3
commit 9845c93cc7
1 changed files with 5 additions and 5 deletions

View File

@ -66,9 +66,9 @@
[% IF Koha.Preference( 'OnSiteCheckouts' ) == 1 %]
<div id="tabs" class="toptabs">
<ul>
<li><a href="#tabs-container" id="tab_all">All</a></li>
<li><a href="#tabs-container" id="tab_checkout">Checkouts</a></li>
<li><a href="#tabs-container" id="tab_onsite_checkout">On-site checkouts</a></li>
<li id="tab_all"><a href="#tabs-container">All</a></li>
<li id="tab_checkout"><a href="#tabs-container">Checkouts</a></li>
<li id="tab_onsite_checkout"><a href="#tabs-container">On-site checkouts</a></li>
</ul>
[% END %]
<div id="tabs-container" style="overflow:hidden">
@ -223,8 +223,8 @@
]
}));
var tabs = $("#tabs").tabs({
select: function(e, ui) {
var id = $(ui.tab).attr("id");
activate: function(e, ui) {
var id = $(ui.newTab).attr("id");
if ( id == "tab_checkout" ) {
table.fnFilter("standard_checkout", 0);
} else if ( id == "tab_onsite_checkout" ) {