Bug 11716 - Use new DataTables include in label manage template
authorOwen Leonard <oleonard@myacpl.org>
Fri, 7 Feb 2014 19:54:27 +0000 (14:54 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 27 Feb 2014 15:38:58 +0000 (15:38 +0000)
This patch modifies the template for the label manage pages to use
the new DataTables include. This simplifies the inclusion of assets and
updates to the latest DataTables version.

To test, view the following pages and confirm that table sorting is
working correctly:

Manage layouts (/cgi-bin/koha/labels/label-manage.pl?label_element=layout)
Manage templates (/cgi-bin/koha/labels/label-manage.pl?label_element=template)
Manage profiles (/cgi-bin/koha/labels/label-manage.pl?label_element=profile)
Manage batches (/cgi-bin/koha/labels/label-manage.pl?label_element=batch)

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt

index edc469a..791bac0 100644 (file)
     </script>
 
 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
-[% INCLUDE 'datatables-strings.inc' %]
-<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
+[% INCLUDE 'datatables.inc' %]
 <script type="text/javascript" id="js">
  $(document).ready(function() {
     $("#labels-table").dataTable($.extend(true, {}, dataTablesDefaults, {
         "sPaginationType": "four_button",
         "aaSorting": [[ 1, "asc" ]],
+        "aoColumnDefs": [
+            { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
+        ]
     }));
  });
 </script>