From b48569a882b7111ac43db80ccc6227ee9c4bca0e Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 21 Apr 2014 12:37:53 -0400 Subject: [PATCH] Bug 11703 [QA Followup] - Sort relatives' checkouts and holds tables client side --- koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 9 ++++++--- koha-tmpl/intranet-tmpl/prog/en/js/holds.js | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js index c10958c..a501aaa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js @@ -199,14 +199,12 @@ $(document).ready(function() { { "mDataProp": "branchname" }, { "mDataProp": "itemcallnumber" }, { - "bSortable": false, "mDataProp": function ( oObj ) { if ( ! oObj.charge ) oObj.charge = 0; return parseFloat(oObj.charge).toFixed(2); } }, { - "bSortable": false, "mDataProp": "price" }, { "bSortable": false, @@ -346,6 +344,11 @@ $(document).ready(function() { "aaSorting": [], "aoColumns": [ { + "mDataProp": "date_due", + "bVisible": false, + }, + { + "iDataSort": 1, // Sort on hidden unformatted date due column "mDataProp": function( oObj ) { var today = new Date(); var due = new Date( oObj.date_due ); @@ -410,7 +413,7 @@ $(document).ready(function() { ], "bPaginate": false, "bProcessing": true, - "bServerSide": true, + "bServerSide": false, "sAjaxSource": '/cgi-bin/koha/svc/checkouts.pl', "fnServerData": function ( sSource, aoData, fnCallback ) { $.each(relatives_borrowernumbers, function( index, value ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/holds.js b/koha-tmpl/intranet-tmpl/prog/en/js/holds.js index a1279c8..8a29f5e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/holds.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/holds.js @@ -108,7 +108,7 @@ $(document).ready(function() { ], "bPaginate": false, "bProcessing": true, - "bServerSide": true, + "bServerSide": false, "sAjaxSource": '/cgi-bin/koha/svc/holds.pl', "fnServerData": function ( sSource, aoData, fnCallback ) { aoData.push( { "name": "borrowernumber", "value": borrowernumber } ); -- 1.7.2.5