<script src="
https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js"></script>
<script src="
https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="
https://cdn.datatables.net/buttons/1.5.2/js/buttons.html5.min.js"></script>
<script>
$(function () {
//журнал заявок агентов
var Orders = $('#ClientHystory').DataTable( {
//"dom": 'lfrBtptipb',
dom: "<'row'<'col-sm-3'l><'col-sm-2'B><'col-sm-4'p><'col-sm-3'f>>" + "<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-3'i><'col-sm-9'p>>",
"buttons": [
'copy', 'excel'
],
"stateSave": true,
"order": [[ 0, "desc" ]],
"lengthMenu": [ 50, 500, 1000 ],
"processing": true,
"serverSide": true,
"ajax": {
"url": "Ajax_ClientHystorySection.php",
"type": "POST"
},
"initComplete": function() {
var $searchInput = $('#ClientHystory_filter input');
$searchInput.unbind();
$searchInput.bind('keyup onchange', function(e) {
if(this.value.length >= 10 || e.keyCode == 13) {
Orders.search( this.value ).draw();
}
if(this.value == "") {
Orders.search("").draw();
}
});
}
} );
//конец журнала заявок
});
</script>