1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
$(document).ready(function() {
oTable = $('#example').dataTable({
"bJQueryUI": true,
"bSort": false,
"iDisplayLength": 10,
"aLengthMenu":[[10, 25, 50, 75, -1], [10, 25, 50, 75, "Tous"]],
"bAutoWidth":false,
"bStateSave": true,
"bPaginate":true,
"sPaginationType": "full_numbers",
"oLanguage":{ "sUrl": "lang/dataTables.french.txt"},
"bProcessing": true,
"aoColumns": [
{"sTitle":"Num" },
{"sTitle": "Document"},
{"sTitle": "MODE"},
{"sTitle": "TYP"},
{"sTitle": "h dep"},
{"sTitle": "h arr"},
{"sTitle": "tps myen"},
{"sTitle": "tps tot"}],
"sAjaxSource": "http://localhost/appli/functions/csvToJSON.php?pp="+rec("pp"),
"sDom": '<"H"Tlfr>t<"F"ip>',
"oTableTools": {
"aButtons": [
{
"sExtends": "copy_to_div",
"sButtonText": "copie",
"sDiv": "copy",
"sInput": "csv_text"
},
{
"sExtends": "xls",
"sButtonText": "Excel"
},
{
"sExtends": "pdf",
"sButtonText": "PDF"
},
{
"sExtends": "print",
"sButtonText": "Imprimer",
"sInfo":"<h6>Aperçu avant impression</h6>"
}
],
"sPrintMessage": "",
"sSwfPath": "swf/copy_cvs_xls_pdf.swf"
},
"fnCreatedRow": function(nRow){
$(nRow).attr("class", "even");
},
}); |
Partager