Zeiterfassung Update
* Fixed Header bei Auswertung und Verrechnung
This commit is contained in:
@@ -3,22 +3,32 @@ if (typeof hidesearch === "undefined") {
|
||||
var hidesearch;
|
||||
hidesearch = [100];
|
||||
}
|
||||
if (typeof hidesearch === "undefined") {
|
||||
var cstmbuttons;
|
||||
cstmbuttons = [];
|
||||
}
|
||||
|
||||
|
||||
if (typeof pageLength === "undefined") {
|
||||
var pageLength;
|
||||
pageLength = -1;
|
||||
}
|
||||
|
||||
if (typeof cstmdom === "undefined") {
|
||||
var cstmdom;
|
||||
cstmdom = "flBrtip";
|
||||
}
|
||||
|
||||
}
|
||||
if (typeof columndefs === "undefined") {
|
||||
var columndefs;
|
||||
columndefs = "";
|
||||
|
||||
}
|
||||
|
||||
if (typeof columnfilter === "undefined") {
|
||||
var columnfilter;
|
||||
columnfilter = "";
|
||||
}
|
||||
|
||||
if (typeof columnoptions === "undefined") {
|
||||
var columnoptions;
|
||||
columnoptions = "";
|
||||
@@ -43,20 +53,22 @@ $('#filterrow th').each(function (i) {
|
||||
});
|
||||
|
||||
table = $('#datatable').DataTable({
|
||||
responsive: true,
|
||||
"order": [[1, "desc"]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
text: 'XLSX Export',
|
||||
className: 'btn-success margina d-none d-lg-block',
|
||||
exportOptions: {
|
||||
columns: ['th:not(:last-child)']
|
||||
}
|
||||
}
|
||||
], columnDefs: [
|
||||
columndefs
|
||||
fixedHeader: {
|
||||
header: true,
|
||||
headerOffset: $('#topnav').outerHeight()
|
||||
|
||||
},
|
||||
lengthMenu: [
|
||||
[25, 50, 100, -1],
|
||||
[25, 50, 100, 'All']
|
||||
],
|
||||
columnDefs: [
|
||||
{width: '300px', targets: 0},
|
||||
{width: '250px', targets: 1},
|
||||
{width: '80px', targets: 7},
|
||||
],
|
||||
|
||||
pageLength: 100,
|
||||
"language": {
|
||||
"url": "/datatables/json/german.json?v1"
|
||||
@@ -65,14 +77,18 @@ table = $('#datatable').DataTable({
|
||||
stateSave: true,
|
||||
stateDuration: 60 * 60 * 24 * 30,
|
||||
"initComplete": function () {
|
||||
$('#datatable_filter').append('<i id="clear_cookie" class="fas fa-times clear-fa" title="Filter löschen" aria-hidden="true" ></i>');
|
||||
$('.dt-search').append('<i id="clear_cookie" class="fas fa-times clear-fa" title="Filter löschen" aria-hidden="true" ></i>');
|
||||
$('.dt-search').addClass('d-inline-block');
|
||||
$.each(cstmbuttons, function (index, value) {
|
||||
$('.dt-buttons').append(value);
|
||||
});
|
||||
$('#dt-length-0').addClass('form-control-sm');
|
||||
$('#clear_cookie').click(function () {
|
||||
$('#filterrow input').val('');
|
||||
$('#filterrow select').val('').change();
|
||||
$('#filterrow select').val('');
|
||||
table.search('').columns().search('').draw();
|
||||
});
|
||||
},
|
||||
"dom": cstmdom,
|
||||
"ajax": {
|
||||
"url": requestUrl,
|
||||
"type": "GET",
|
||||
@@ -145,7 +161,33 @@ table = $('#datatable').DataTable({
|
||||
},
|
||||
className: "edit-td"
|
||||
}
|
||||
]
|
||||
],
|
||||
layout:
|
||||
{
|
||||
topStart: {
|
||||
search: {
|
||||
placeholder: ''
|
||||
}, buttons: [
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
text: 'XLSX Export',
|
||||
className: 'btn-success margina d-none d-lg-block',
|
||||
exportOptions: {
|
||||
columns: ['th:not(:last-child)'],
|
||||
format: {
|
||||
body: function (data, row, column, node) {
|
||||
data = $('<p>' + data + '</p>').text();
|
||||
return $.isNumeric(data.replace(',', '.')) ? data.replace(',', '.') : data;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
topEnd: {
|
||||
pageLength: true
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -177,7 +219,20 @@ if (state) {
|
||||
});
|
||||
table.draw();
|
||||
}
|
||||
$(window).scroll(function () {
|
||||
var height = $(window).scrollTop();
|
||||
|
||||
if (height > 450) {
|
||||
if ($('#filterrow').is(':visible')) {
|
||||
$('#filterrow').hide();
|
||||
}
|
||||
|
||||
} else {
|
||||
if ($('#filterrow').is(':hidden')) {
|
||||
$('#filterrow').show();
|
||||
}
|
||||
}
|
||||
});
|
||||
$(document).ready(function () {
|
||||
$(".select2").select2();
|
||||
|
||||
@@ -280,7 +335,7 @@ $(document).ready(function () {
|
||||
$('.car-div').find('input').val('');
|
||||
$('#timerecordingCar_id').val('').change();
|
||||
$('.car-div').hide();
|
||||
} else if (parseInt($(this).find(':selected').data('hourday')) === 7) {
|
||||
} else if (parseInt($(this).find(':selected').data('hourday')) === 7) {
|
||||
$('.businesstrip-div').show();
|
||||
$('.businesstrip-check-div').hide();
|
||||
$('#businesstrip').prop("checked", true);
|
||||
|
||||
Reference in New Issue
Block a user