Updated datatables, using @pa instead of @js/@css, using conditionalPaging in datatables
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<!-- $list=Collection[Invoice::class] -->
|
||||
<!-- Show outstanding invoices -->
|
||||
<table class="table table-bordered w-100" id="invoices_due_{{$type}}">
|
||||
<table class="table table-sm table-striped" id="invoices_due_{{$type}}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Account</th>
|
||||
@@ -24,29 +24,27 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@section('page-styles')
|
||||
@css(datatables,bootstrap4|rowgroup)
|
||||
@append
|
||||
@section('page-scripts')
|
||||
@js(datatables,bootstrap4|rowgroup)
|
||||
@pa(datatables,rowgroup|conditionalpaging)
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
@if($list->count())
|
||||
$(document).ready(function() {
|
||||
$('#invoices_due_{{$type}}').DataTable({
|
||||
// If we have more than 1 account id, order by account
|
||||
order: [[0,'asc'],[2,'asc'],[1,'desc']],
|
||||
rowGroup: {
|
||||
dataSrc: 0,
|
||||
},
|
||||
columnDefs: [
|
||||
{
|
||||
targets: [0],
|
||||
visible: false,
|
||||
}
|
||||
],
|
||||
$(document).ready(function() {
|
||||
$('#invoices_due_{{$type}}').DataTable({
|
||||
conditionalPaging: true,
|
||||
// If we have more than 1 account id, order by account
|
||||
order: [[0,'asc'],[2,'asc'],[1,'desc']],
|
||||
rowGroup: {
|
||||
dataSrc: 0,
|
||||
},
|
||||
columnDefs: [
|
||||
{
|
||||
targets: [0],
|
||||
visible: false,
|
||||
}
|
||||
],
|
||||
});
|
||||
});
|
||||
});
|
||||
@endif
|
||||
</script>
|
||||
@append
|
Reference in New Issue
Block a user