feat: Enhance print functionality and add success modal for mass updates
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user