[Koha-patches] [PATCH] Fix for Bug 6728, Table sorter for receiving acquisitions

Owen Leonard oleonard at myacpl.org
Wed Aug 17 22:06:00 CEST 2011


---
 .../intranet-tmpl/prog/en/modules/acqui/parcel.tt  |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
index 8ccc42d..b54dc96 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
@@ -4,12 +4,23 @@
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'greybox.inc' %]
 <script type="text/javascript" src="[% yuipath %]/json/json-min.js"></script>
-<script type="text/JavaScript">
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
+<script type="text/javascript">
 //<![CDATA[
 
     var rowsToCollapse = 5;
 
+	$.tablesorter.addParser({
+	    id: 'articles',
+	    is: function(s) {return false;  },
+	    format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
+	    type: 'text'
+	});
+
     $(document).ready(function(){
+    $("#pendingt").tablesorter({
+		headers: { 2: { sorter: 'articles' },3: { sorter: false },7:{sorter:false}}
+    });
 
 	rowCountPending  = $("#pendingt tbody.filterclass tr").length;
 	rowCountReceived = $("#receivedt tbody.filterclass tr").length;
-- 
1.7.3



More information about the Koha-patches mailing list