Bug 11670 - Remove sorting from patron lists action columns
authorOwen Leonard <oleonard@myacpl.org>
Mon, 3 Feb 2014 17:03:14 +0000 (12:03 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 10 Feb 2014 15:59:27 +0000 (15:59 +0000)
The list of patron lists has sortable columns for the add, edit, and
delete buttons. These columns should not be sortable. This patch removes
sorting.

This patch also adds the "btn-mini" class to the in-table buttons to
make the table more compact.

To test you must have existing patron lists. Apply the patch and
navigate to Tools -> Patron lists. The columns containing the add, edit,
and delete buttons should not be sortable. Other columns should sort
correctly.

---------------------------------------------------------------------

Created to patron lists and confirmed the collums 'add patrons', 'edit'
and 'delete' are no longer sortable. Column 'Name' and 'Patrons in list'
are still sortable. The size of buttons are smaller.
I also agree this is an improvement.

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt

index 901b925..ec8c2b4 100644 (file)
@@ -8,7 +8,11 @@
 <script type="text/javascript">
 //<![CDATA[
     $(document).ready(function() {
-        $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults));
+        $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, {
+            "aoColumnDefs": [
+                { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
+            ]
+        } ));
     });
 
     function ConfirmDelete( list ) {
                         <td>[% l.name %]</td>
                         <td>[% l.patron_list_patrons.size || 0 %]</td>
                         <td>
-                            <a class="btn" href="list.pl?patron_list_id=[% l.patron_list_id %]">
+                            <a class="btn btn-mini" href="list.pl?patron_list_id=[% l.patron_list_id %]">
                                 <i class="icon-plus-sign"></i> Add patrons <i class="icon-user"></i>
                             </a>
                         </td>
                         <td>
-                            <a class="btn" href="add-modify.pl?patron_list_id=[% l.patron_list_id %]">
+                            <a class="btn btn-mini" href="add-modify.pl?patron_list_id=[% l.patron_list_id %]">
                                 <i class="icon-edit"></i> Edit
                             </a>
                         </td>
                         <td>
-                            <a class="btn" href="delete.pl?patron_list_id=[% l.patron_list_id %]" onclick='return ConfirmDelete("[% l.name | html %]")'>
+                            <a class="btn btn-mini" href="delete.pl?patron_list_id=[% l.patron_list_id %]" onclick='return ConfirmDelete("[% l.name | html %]")'>
                                 <i class="icon-trash"></i> Delete
                             </a>
                         </td>