datatables for category table views

This commit is contained in:
Jörg Henke
2022-07-06 08:44:39 +02:00
parent d3a2b11f86
commit 206dc73d0e
3 changed files with 61 additions and 8 deletions

View File

@ -223,3 +223,8 @@ body {
background-image: linear-gradient(to left, #e6e6e6, white); background-image: linear-gradient(to left, #e6e6e6, white);
padding: 4px; padding: 4px;
} }
.tab-pane-table {
background-color: white;
padding: 8px;
}

View File

@ -0,0 +1,23 @@
{
"sEmptyTable": "Keine Daten in der Tabelle vorhanden",
"sInfo": "_START_ bis _END_ von _TOTAL_ Einträgen",
"sInfoEmpty": "0 bis 0 von 0 Einträgen",
"sInfoFiltered": "(gefiltert von _MAX_ Einträgen)",
"sInfoPostFix": "",
"sInfoThousands": ".",
"sLengthMenu": "_MENU_ Einträge anzeigen",
"sLoadingRecords": "Wird geladen...",
"sProcessing": "Bitte warten...",
"sSearch": "Suchen",
"sZeroRecords": "Keine Einträge vorhanden.",
"oPaginate": {
"sFirst": "Erste",
"sPrevious": "Zurück",
"sNext": "Nächste",
"sLast": "Letzte"
},
"oAria": {
"sSortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren",
"sSortDescending": ": aktivieren, um Spalte absteigend zu sortieren"
}
}

View File

@ -73,8 +73,8 @@
<div id="div_summary" class="tab-pane fade">Zusammenfassung</div> <div id="div_summary" class="tab-pane fade">Zusammenfassung</div>
<div id="div_attachment" class="tab-pane fade">Anhang</div> <div id="div_attachment" class="tab-pane fade">Anhang</div>
<div id="div_calendar" class="tab-pane fade">Kalender</div> <div id="div_calendar" class="tab-pane fade">Kalender</div>
<div id="div_project" class="tab-pane fade" style="background-color: white"> <div id="div_project" class="tab-pane fade tab-pane-table">
<table class="table table-striped table-condensed"> <table id="project_table" class="table table-striped table-condensed">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
@ -89,8 +89,8 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div id="div_module" class="tab-pane fade" style="background-color: white"> <div id="div_module" class="tab-pane fade tab-pane-table">
<table class="table table-striped table-condensed"> <table id="module_table" class="table table-striped table-condensed">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
@ -105,8 +105,8 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div id="div_job" class="tab-pane fade" style="background-color: white"> <div id="div_job" class="tab-pane fade tab-pane-table">
<table class="table table-striped table-condensed"> <table id="job_table" class="table table-striped table-condensed">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
@ -121,8 +121,8 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div id="div_billing" class="tab-pane fade" style="background-color: white"> <div id="div_billing" class="tab-pane fade tab-pane-table">
<table class="table table-striped table-condensed"> <table id="billing_table" class="table table-striped table-condensed">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
@ -140,6 +140,31 @@
</table> </table>
</div> </div>
</div> </div>
<script type="text/javascript">
$(document).ready(function(){
var localeUrl = '[[@{/js/dataTables/de.json}]]';
$("#project_table").DataTable({
"language" : {
"url" : localeUrl
}
});
$("#module_table").DataTable({
"language" : {
"url" : localeUrl
}
});
$("#job_table").DataTable({
"language" : {
"url" : localeUrl
}
});
$("#billing_table").DataTable({
"language" : {
"url" : localeUrl
}
});
});
</script>
</main> </main>
</body> </body>
</html> </html>