(BUG #4810) parcel.pl: Fix a bug with applying a filter on pending orders displaying
authorAlex Arnaud <alex.arnaud@biblibre.com>
Thu, 24 Jun 2010 17:26:16 +0000 (19:26 +0200)
committerGalen Charlton <gmcharlt@gmail.com>
Fri, 25 Jun 2010 00:42:33 +0000 (20:42 -0400)
When we apply a filter and click on "Click here to show x items" link, there are duplicates orders which are display.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl

index 93422c2..9f7f11e 100644 (file)
@@ -31,6 +31,7 @@
     // Collapse pending items table
     function pendingCollapse() {
        $("#pendingcollapserow").remove();
+    $("#pendingt tr").show();
        $("#pendingt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide();
        $("#pendingt").before("<p id=\"pendingcollapserow\">" + _("Only the first ")  + rowsToCollapse +  _(" items are displayed.") + "<a href=\"javascript:pendingExpand();\">" + _("Click here to show all ")  + rowCountPending + _(" items") + "<\/a>.<\/p>");
 
@@ -40,6 +41,7 @@
     function pendingExpand() {
        $("#pendingcollapserow").remove();
        $("#pendingt tr").show();
+    $("#pendingt tbody.filterclass tr.orderfound").remove();
        $("#pendingt").before("<p id=\"pendingcollapserow\">" + rowCountPending + _(" items are displayed.") + "<a href=\"javascript:pendingCollapse();\">" + _("Click here to show only the first ") + rowsToCollapse + _(" items") + "<\/a>.<\/p>");
     }
 
     function clearFilters() {
        $("#nothingfoundrow").remove();
         $("#pendingt tbody.filterclass tr").show();
-        $("#pendingt tbody.filterclass tr.orderfound").remove();
+        //$("#pendingt tbody.filterclass tr.orderfound").remove();
        pendingExpand();
     }