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: {