From f4931012bfeac3eac89febff6a76633575869492 Mon Sep 17 00:00:00 2001
From: Owen Leonard <oleonard@myacpl.org>
Date: Mon, 25 Apr 2016 09:12:05 -0400
Subject: [PATCH] Bug 16334 - Cannot sort checkout search by name
Content-Type: text/plain; charset="utf-8"

This patch corrects the DataTable configuration of the table of patrons
which displays when you search by patron name in circulation.

To test, apply the patch and perform a search by patron name in
circulation which will return multiple results.

In the table of search results the "Name" column should be sortable, and
sorted by default.

Also changed: "Cardnumber" table header changed to "Card number."
---
 koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
index ec3a1d9..0fc6c07 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
@@ -108,10 +108,7 @@ $(document).ready(function() {
     });
 
     var table = $("#table_borrowers").dataTable($.extend(true, {}, dataTablesDefaults, {
-        "aoColumnDefs": [
-            { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
-        ],
-        "aaSorting": [ 2, "asc" ],
+        "aaSorting": [ 0, "asc" ],
         "sDom": "t",
         "iDisplayLength": -1
     }));
@@ -577,7 +574,7 @@ No patron matched <span class="ex">[% message %]</span>
         <thead>
             <tr>
                 <th>Name</th>
-                <th>Cardnumber</th>
+                <th>Card number</th>
                 <th>Category</th>
                 <th>Library</th>
                 <th>Address</th>
-- 
2.1.4