Bug 9461 [Revised] Use DataTables on holds awaiting pickup report page
Replace the tablesorter plugin with the DataTables plugin on the holds awaiting pickup report page. To test, open the holds awaiting pickup report (Circulation -> Holds awaiting pickup). Confirm that table sorting works correctly on all tables. Revision makes default result count (20) match options for number of pagination entries (10,20,50,100,all). Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
8c1646006c
commit
ebab8dcdfe
|
|
@ -1,24 +1,26 @@
|
|||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Koha › Circulation › Holds awaiting pickup</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
<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[
|
||||
$.tablesorter.addParser({
|
||||
id: 'articles',
|
||||
is: function(s) {return false; },
|
||||
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
|
||||
type: 'text'
|
||||
});
|
||||
[% IF (dateformat == 'metric') %]
|
||||
dt_add_type_uk_date();
|
||||
[% END %]
|
||||
$(document).ready(function() {
|
||||
$('#resultlist').tabs();
|
||||
$("th a").hide();
|
||||
$.tablesorter.defaults.widgets = ['zebra'];
|
||||
$("#holdst,#holdso").tablesorter({[% IF ( dateformat == 'metric' ) %]
|
||||
dateFormat: 'uk',[% END %]
|
||||
sortList: [[3,0]],
|
||||
headers: { 1:{sorter:'articles'},3: { sorter: 'articles' },4:{sorter:false}}
|
||||
});
|
||||
$("#holdst,#holdso").dataTable($.extend(true, {}, dataTablesDefaults, {
|
||||
"aoColumnDefs": [
|
||||
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
|
||||
],
|
||||
"aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
|
||||
"iDisplayLength": 20,
|
||||
"sPaginationType": "four_button"
|
||||
}));
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue