From 6eb15b9ba265b1a1461fa29b0f8c1637767d6dab Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Fri, 7 Jun 2013 12:14:02 +0200 Subject: [PATCH] Bug 10430 - status filter not working in serial claims when translated With a translated intranet (ie fr-FR) the status filter does not work for "Late" status. It is because status in combobox filter is translated "Retard" and status in table is translated "En retard". This patch changed javascript filter to work on a status code instead of status name. The new classes may be used to change CSS depending on status. Test plan : - Use a translated intranet (ie fr-FR) - Go to serials claim of a vendor with issues of multiple status - Check that status filter does its work --- .../prog/en/modules/serials/claims.tt | 50 +++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt index e309ab1..8caedc4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt @@ -69,16 +69,20 @@ } } - // Filter by status - function filterByStatus() { - selectedStatus = $("#statusfilter").val(); - if (selectedStatus == "all") { - clearFilters(); - } else { - $("table#claimst tbody tr").hide(); - $("table#claimst tbody tr:contains(" + selectedStatus + ")").show(); - } - } + // Filter by status + function filterByStatus() { + selectedStatus = $("#statusfilter").val(); + if (selectedStatus == "all") { + clearFilters(); + } else { + $("table#claimst tbody tr").hide(); + $("table#claimst tbody tr").each( function() { + if ( $(this).find("span.status-" + selectedStatus).size() > 0 ) { + $(this).show(); + } + }); + } + } // Filter by branch function filterByBranch() { @@ -202,13 +206,13 @@
  • @@ -282,12 +286,12 @@ [% missingissue.serialseq %] - [% IF ( missingissue.status1 ) %]Expected[% END %] - [% IF ( missingissue.status2 ) %]Arrived[% END %] - [% IF ( missingissue.status3 ) %]Late[% END %] - [% IF ( missingissue.status4 ) %]Missing[% END %] - [% IF ( missingissue.status7 ) %]Claimed[% END %] - [% IF ( missingissue.status8 ) %]Stopped[% END %] + [% IF ( missingissue.status1 ) %]Expected[% END %] + [% IF ( missingissue.status2 ) %]Arrived[% END %] + [% IF ( missingissue.status3 ) %]Late[% END %] + [% IF ( missingissue.status4 ) %]Missing[% END %] + [% IF ( missingissue.status7 ) %]Claimed[% END %] + [% IF ( missingissue.status8 ) %]Stopped[% END %] [% missingissue.planneddate %] -- 1.7.10.4