From e18cc21d344a2058520715b6d0b5f8cfb0b4e552 Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Thu, 5 Sep 2024 16:00:29 +0200 Subject: [PATCH] =?UTF-8?q?Zeiterfassung=20Abwesenheitskalender=20=C3=84nd?= =?UTF-8?q?erung=20=20*=20Mitarbeiter=20die=20ausgetreten=20sind=20werden?= =?UTF-8?q?=20im=20Kalender=20mit=20dem=20Geburtstag=20nicht=20mehr=20ange?= =?UTF-8?q?zeigt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/TimerecordingBilling/Detail.php | 5 ++--- .../TimerecordingBilling/DetailClosed.php | 8 ++++--- public/assets/js/datatables-std2.js | 21 +++++++++++++++++++ 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/Layout/default/TimerecordingBilling/Detail.php b/Layout/default/TimerecordingBilling/Detail.php index 5fd23bdf6..0ba37dd81 100644 --- a/Layout/default/TimerecordingBilling/Detail.php +++ b/Layout/default/TimerecordingBilling/Detail.php @@ -131,10 +131,9 @@ hidesearch = [2, 3, 4, 5, 6, 7, 9, 10]; var pageLength = 100; + var initc=2; $(document).ready(function () { - $('.buttons-excel').closest('div').append('
'); - $('.buttons-excel').closest('div').append('
'); - $('.buttons-excel').closest('div').append('
'); + $('body').on('click', '#bmd-export', function () { diff --git a/Layout/default/TimerecordingBilling/DetailClosed.php b/Layout/default/TimerecordingBilling/DetailClosed.php index 4694df457..0aaf80dd7 100644 --- a/Layout/default/TimerecordingBilling/DetailClosed.php +++ b/Layout/default/TimerecordingBilling/DetailClosed.php @@ -317,12 +317,14 @@ hidesearch = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]; var pageLength = 100; + var initc=3; + var adminc=0; $(document).ready(function () { superexpertEnabled()): ?> - $('.buttons-excel').closest('div').prepend('
'); + adminc=1; + - $('.buttons-excel').closest('div').append('
'); - $('.buttons-excel').closest('div').append('
'); + $('body').on('click', '#bmd-export', function () { diff --git a/public/assets/js/datatables-std2.js b/public/assets/js/datatables-std2.js index 58f6a77f8..7d4fc120a 100644 --- a/public/assets/js/datatables-std2.js +++ b/public/assets/js/datatables-std2.js @@ -1,4 +1,12 @@ let table; +if (typeof adminc === "undefined") { + var adminc; + adminc = 0; +} +if (typeof initc === "undefined") { + var initc; + initc = 1; +} if (typeof hidesearch === "undefined") { var hidesearch; hidesearch = [100]; @@ -79,6 +87,19 @@ table = $('#datatable').DataTable({ $('#filterrow select').val(''); table.search('').columns().search('').draw(); }); + if (initc === 2) { + $('.buttons-excel').closest('div').append('
'); + $('.buttons-excel').closest('div').append('
'); + $('.buttons-excel').closest('div').append('
'); + } + else if (initc === 3) { + $('.buttons-excel').closest('div').append('
'); + $('.buttons-excel').closest('div').append('
'); + if (adminc===1) + { + $('.buttons-excel').closest('div').prepend('
'); + } + } }, layout: {