mirror of
https://github.com/cp6/my-idlers.git
synced 2025-04-18 17:18:35 +00:00
Added Datatables to shared index for sorting and searching ability
This commit is contained in:
parent
a7cce1cfff
commit
19a0f2f646
1 changed files with 21 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
|||
<a href="{{ route('shared.create') }}" class="btn btn-primary mb-3">Add shared hosting</a>
|
||||
<x-response-alerts></x-response-alerts>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<table class="table table-bordered" id="shared-table">
|
||||
<thead class="table-light">
|
||||
<tr class="bg-gray-100">
|
||||
<th>Name</th>
|
||||
|
@ -70,4 +70,24 @@
|
|||
<x-modal-delete-script>
|
||||
<x-slot name="uri">shared</x-slot>
|
||||
</x-modal-delete-script>
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
window.addEventListener('load', function () {
|
||||
$('#shared-table').DataTable({
|
||||
"pageLength": 15,
|
||||
"lengthMenu": [5, 10, 15, 25, 30, 50, 75, 100],
|
||||
"columnDefs": [
|
||||
{"orderable": false, "targets": [9]}
|
||||
],
|
||||
"initComplete": function () {
|
||||
$('.dataTables_length,.dataTables_filter').addClass('mb-2');
|
||||
$('.dataTables_paginate').addClass('mt-2');
|
||||
$('.dataTables_info').addClass('mt-2 text-muted ');
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
</x-app-layout>
|
||||
|
|
Loading…
Add table
Reference in a new issue