@@ -, +, @@
- Go to serials claim of a vendor with serials of multiple branches
- Check that branch filter does its work
---
.../prog/en/modules/serials/claims.tt | 34 +++++++++++---------
serials/claims.pl | 1 -
2 files changed, 19 insertions(+), 16 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt
@@ -1,3 +1,5 @@
+[% USE Branches %]
+
[% INCLUDE 'doc-head-open.inc' %]
Koha › Serials › Claims
[% INCLUDE 'doc-head-close.inc' %]
@@ -80,16 +82,21 @@
}
}
- // Filter by branch
- function filterByBranch() {
- selectedBranch = $("#branchfilter").val();
- if (selectedBranch == "all") {
- clearFilters();
- } else {
- $("table#claimst tbody tr").hide();
- $("table#claimst tbody tr:contains(" + selectedBranch + ")").show();
- }
- }
+ // Filter by branch
+ function filterByBranch() {
+ selectedBranch = $("#branchfilter").val();
+ if (selectedBranch == "all") {
+ clearFilters();
+ } else {
+ $("table#claimst tbody tr").hide();
+ $("table#claimst tbody tr").each( function() {
+ if ( $(this).find("span.branch-" + selectedBranch).size() > 0 ) {
+ $(this).show();
+ }
+ });
+ }
+ }
+
// Filter by date
function filterByDate() {
var beginDate = Date_from_syspref($("#from").val()).getTime();
@@ -219,12 +226,9 @@