@@ -, +, @@ - With OnSiteCheckouts off, locate a patron who has current and/or past checkouts. - View the "Circulation history" page for that patron. - The table of checkouts should display with no tabbed interface. - With OnSiteCheckouts on, the page should show three tabs: All, Checkouts, and On-site checkouts. - Confirm that clicking on each tab correctly filters the table, e.g. the On-site checkouts tab should show only on-site checkouts. --- .../prog/en/modules/members/readingrec.tt | 30 +++++++------------ 1 file changed, 11 insertions(+), 19 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -54,9 +54,9 @@
[% IF Koha.Preference('OnSiteCheckouts') %]
@@ -162,24 +162,16 @@ "aaSorting": [[10, 'desc']] }, columns_settings); - // var tabs = $("#tabs").tabs({ - // activate: function(e, ui) { - // var active = tabs.tabs("option", "active" ); - // if ( active == 1 ) { - // table.fnFilter("standard_checkout", 0); - // } else if ( active == 2 ) { - // table.fnFilter("onsite_checkout", 0); - // } else { // all - // table.fnFilter('', 0); - // } - // } - // }); - $("#tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) { - console.log("New activated tab", e.target); - console.log("Previous active tab", e.relatedTarget); + active_tab = $(this).data("tabname"); + if( active_tab == "checkouts" ){ + table.fnFilter("standard_checkout", 0); + } else if( active_tab == "onsite" ){ + table.fnFilter("onsite_checkout", 0); + } else { + table.fnFilter('', 0); + } }); - }); [% END %] --