Commit 141e008d by Bagus Pambudi

datatable new

parent d76f4c3f
......@@ -4,7 +4,7 @@
<!-- <link rel="stylesheet" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.24/css/dataTables.bootstrap4.min.css"> -->
<link rel="stylesheet" href="{!! asset('backend/js/datatables.net-bs/css/dataTables.bootstrap.min.css') !!}">
{{-- <link rel="stylesheet" href="{!! asset('backend/js/datatables.net-bs/css/dataTables.bootstrap.min.css') !!}"> --}}
<style>
......@@ -82,15 +82,7 @@ tr.group:hover {
@endsection
@section('scripts')
<script src="{!!asset('backend/js/datatables.net/js/jquery.dataTables.min.js') !!}"></script>
<script src="{!!asset('backend/js/datatables.net-bs/js/dataTables.bootstrap.min.js') !!}"></script>
<!-- <script src="{!!asset('backend/js/datatables.net-bs/js/dataTables.bootstrap.min.js') !!}"></script> -->
<!-- <script src="{{ url('backend/assets/plugins/jquery-datatable/buttons/dataTables.buttons.min.js') }}"></script>
<script src="{{ url('backend/assets/plugins/jquery-datatable/buttons/buttons.bootstrap4.min.js') }}"></script>
<script src="{{ url('backend/assets/plugins/jquery-datatable/buttons/buttons.colVis.min.js') }}"></script>
<script src="{{ url('backend/assets/plugins/jquery-datatable/buttons/buttons.html5.min.js') }}"></script>
<script src="{{ url('backend/assets/plugins/jquery-datatable/buttons/buttons.print.min.js') }}"></script> -->
<script>
// var url = "{{ route('download') }}";
......
......@@ -318,36 +318,6 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script src="{{ url('backend/assets/plugins/jquery-datatable/buttons/buttons.html5.min.js') }}"></script>
<script src="{{ url('backend/assets/plugins/jquery-datatable/buttons/buttons.print.min.js') }}"></script> -->
<script>
$(document).ready(function() {
var groupColumn = 2;
var table = $('.data-table').DataTable({
"columnDefs": [
{ "visible": false, "targets": groupColumn }
],
"order": [[ groupColumn, 'asc' ]],
"displayLength": 25,
"drawCallback": function ( settings ) {
var api = this.api();
var rows = api.rows( {page:'current'} ).nodes();
var last=null;
api.column(groupColumn, {page:'current'} ).data().each( function ( group, i ) {
if ( last !== group ) {
$(rows).eq( i ).before(
'<tr class="group"><td colspan="5">'+group+'</td></tr>'
);
last = group;
}
} );
}
} );
} );
</script>
@yield('scripts')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment