Feature Update

This commit is contained in:
Daniel Spitzer
2023-02-21 12:24:44 +00:00
committed by Frank Schubert
parent 0763f068bd
commit aa72b1ba95
18 changed files with 437 additions and 526 deletions
+4 -96
View File
@@ -4,43 +4,7 @@ $pagination_baseurl_params = ["filter" => $filter];
$pagination_entity_name = "Devicemanufactor";
?>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<style>
#filterrow input {
width: 100%;
padding: 3px;
box-sizing: border-box;
display: table-header-group;
height: unset;
}
.dataTables_wrapper .dataTables_filter {
float: left;
text-align: left;
}
.dataTables_wrapper .dataTables_length {
float: right;
}
.clear-fa {
margin-left: 5px;
font-size: 23px;
vertical-align: middle;
color: #cb2929;
cursor: pointer;
}
.margina {
margin-left: 30px !important;
margin-top: -5px;
}
.edit-weight {
width: 50px;
}
</style>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css" rel="stylesheet" type="text/css"/>
<!-- start page title -->
<div class="row">
<div class="col-12">
@@ -81,7 +45,7 @@ $pagination_entity_name = "Devicemanufactor";
<tr>
<th class="text-center">Name</th>
<th class="text-center">Erstellt von</th>
<th class="edit-weight"></th>
<th class="edit-width"></th>
</tr>
<tr id="filterrow">
<th></th>
@@ -118,69 +82,13 @@ $pagination_entity_name = "Devicemanufactor";
<script type="text/javascript">
let table;
$('#filterrow th').each(function (i) {
let title = $('#datatable thead th').eq($(this).index()).text();
var hidesearch = [2];
if ($(this).index() == "2") {
} else {
$(this).html('<input type="text" placeholder="' + title + '" class="form-control" data-index="' + i + '" value="" />');
}
});
table = $('#datatable').DataTable({
buttons: [
{
extend: 'excelHtml5',
text: 'XLSX Export',
className: 'btn-success margina'
}
],
orderCellsTop: true,
stateSave: true,
"initComplete": function () {
$('#datatable_filter').append('<i id="clear_cookie" class="fas fa-times clear-fa" title="Filter löschen" aria-hidden="true" ></i>');
$('#clear_cookie').click(function () {
$('input').val('');
table.search('').columns().search('').draw();
});
},
"dom": 'flBrtip'
});
$('#filterrow').on('keyup', 'input', function () {
table
.column($(this).data('index'))
.search(this.value)
.draw();
});
var state = table.state.loaded();
if (state) {
table.columns().eq(0).each(function (colIdx) {
var colSearch = state.columns[colIdx].search;
if (colSearch.search) {
$('#filterrow').find("[data-index='" + colIdx + "']").val(colSearch.search);
}
});
table.draw();
}
$(document).ready(function () {
});
</script>
<script type="text/javascript" src="<?= self::getResourcePath() ?>assets/js/datatables-std.js"></script>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>