Some datatables consistency

This commit is contained in:
Deon George
2021-08-14 11:11:20 +10:00
parent 385290d18c
commit 6db826c8a4
10 changed files with 373 additions and 131 deletions

View File

@@ -28,7 +28,7 @@
<div class="accordion-body">
@if($o->echoareas->count())
<p>This network provides the following Echomail areas:</p>
<table class="table monotable w-100" id="network">
<table class="table monotable w-100" id="echoarea">
<thead>
<tr>
<th colspan="3"></th>
@@ -72,7 +72,7 @@
<div class="accordion-body">
@if($o->fileareas->count())
<p>This network provides the following File areas:</p>
<table class="table monotable" id="network">
<table class="table monotable" id="filearea">
<thead>
<tr>
<th>Filearea</th>
@@ -105,7 +105,7 @@
<div id="collapse_systems" class="accordion-collapse collapse" aria-labelledby="systems" data-bs-parent="#accordion_homepage">
<div class="accordion-body">
<p>The following systems are members of this network.</p>
<table class="table monotable" id="network">
<table class="table monotable" id="system">
<thead>
<tr>
<th>System</th>
@@ -162,26 +162,60 @@
@endsection
@section('page-scripts')
<link type="text/css" rel="stylesheet" href="https://cdn.datatables.net/1.10.25/css/dataTables.bootstrap5.min.css" media="screen" >
<link type="text/css" rel="stylesheet" href="https://cdn.datatables.net/1.10.25/css/dataTables.bootstrap5.min.css" media="screen">
<link type="text/css" rel="stylesheet" href="{{ asset('plugin/dataTables/dataTables.bootstrap5.css') }}" media="screen">
<script type="text/javascript" src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/rowgroup/1.1.2/js/dataTables.rowGroup.min.js"></script>
<script type="text/javascript" src="{{ asset('plugin/dataTables/dataTables.conditionalPaging.js') }}"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap5.min.js"></script>
<script type="text/javascript">
$('table tr').click(function() {
var href = $(this).find('a').attr('href');
$(document).ready(function() {
$('table tr').click(function() {
var href = $(this).find('a').attr('href');
if (href)
window.location = href;
});
if (href)
window.location = href;
});
$('#network').DataTable({
paging: true,
pageLength: 25,
searching: true,
order: [],
$('#echoarea').DataTable({
paging: true,
pageLength: 25,
searching: true,
order: [],
conditionalPaging: {
style: 'fade',
speed: 500 // optional
}
});
$('#filearea').DataTable({
paging: true,
pageLength: 25,
searching: true,
order: [],
conditionalPaging: {
style: 'fade',
speed: 500 // optional
}
});
$('#system').DataTable({
paging: true,
pageLength: 25,
searching: true,
order: [],
conditionalPaging: {
style: 'fade',
speed: 500 // optional
},
language: {
paginate: {
previous: '&lt;&lt;',
next: '&gt;&gt;'
}
}
});
});
</script>
@append