From 765707d49fb601d9e3427223b9763412666abb9f 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
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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."

Signed-off-by: Marc Véron <veron@veron.ch>
---
 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>
-- 
1.7.10.4