feat: Enhance print functionality and add success modal for mass updates

This commit is contained in:
“VeLiTi”
2026-01-13 09:55:31 +01:00
parent 884d2a3366
commit 0d3724395a
6 changed files with 160 additions and 138 deletions

View File

@@ -1158,14 +1158,22 @@ function sortTextVal(a, b) {
// Print DIV
//------------------------------------------
function printDiv(div) {
var divContents = document.getElementById(div).innerHTML;
var a = window.open('', '', '');
a.document.write('<html>');
a.document.write('<body > ');
a.document.write(divContents);
a.document.write('</body></html>');
a.document.close();
a.print();
var divContents = document.getElementById(div).innerHTML;
var printWindow = window.open('', '', 'height=600,width=800');
printWindow.document.write('<html><head><title>Print</title>');
printWindow.document.write('<style>');
printWindow.document.write('body { font-family: Arial, sans-serif; margin: 20px; }');
printWindow.document.write('table { border-collapse: collapse; width: 100%; }');
printWindow.document.write('th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }');
printWindow.document.write('th { background-color: #f2f2f2; }');
printWindow.document.write('</style>');
printWindow.document.write('</head><body>');
printWindow.document.write(divContents);
printWindow.document.write('</body></html>');
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
}
//------------------------------------------