From ac50dc5b71e72aa89290db7f12972169cf67ffa7 Mon Sep 17 00:00:00 2001 From: Owen Leonard <oleonard@myacpl.org> Date: Wed, 23 Jan 2013 20:50:31 -0500 Subject: [PATCH] Bug 9477 - Use Datatables on notices page Content-Type: text/plain; charset="utf-8" Replace the tablesorter plugin with the DataTables plugin on the notices page. To test, open the notices page (Toosl -> Notices and Slips). Confirm that table sorting works correctly. --- .../intranet-tmpl/prog/en/modules/tools/letter.tt | 22 ++++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index c156e01..79455ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -1,16 +1,20 @@ [% INCLUDE 'doc-head-open.inc' %] <title>Koha › Tools › Notices[% IF ( add_form ) %][% IF ( modify ) %] › Modify notice[% ELSE %] › Add notice[% END %][% END %][% IF ( add_validate ) %] › Notice added[% END %][% IF ( delete_confirm ) %] › Confirm deletion[% END %]</title> [% INCLUDE 'doc-head-close.inc' %] -<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> - <script type="text/javascript"> - //<![CDATA[ +<link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" /> +<script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script> +[% INCLUDE 'datatables-strings.inc' %] +<script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script> +<script type="text/javascript"> +//<![CDATA[ $(document).ready(function() { - $("#lettert:has(tbody tr)").tablesorter({ - widgets : ['zebra'], - sortList: [[0,0]], - headers: { 4: {sorter:false},5: { sorter: false },6: { sorter: false }} - }); - + $("#lettert:has(tbody tr)").dataTable($.extend(true, {}, dataTablesDefaults, { + "sDom": 't', + "aoColumnDefs": [ + { "aTargets": [ -1,-2, -3 ], "bSortable": false, "bSearchable": false } + ], + "bPaginate": false + })); $('#branch').change(function() { $('#op').val(""); $('#selectlibrary').submit(); -- 1.7.10.4