printing bug fix

This commit is contained in:
nugroho 2025-07-06 00:16:06 +07:00
parent 026fe7efe6
commit e79b713c67

View File

@ -203,7 +203,6 @@
"Terlambat",
"Tidak Terlaksana"
]
// console.log(data)
function µ(selector)
{
if (selector) return $(thisDialog.box).find(selector);
@ -269,7 +268,7 @@
requestAnimationFrame(() => {
setTimeout(() => {
window.print();
// window.close();
window.close();
}, 100); // small delay ensures DOM is painted
});
<\/script>
@ -332,7 +331,7 @@
requestAnimationFrame(() => {
setTimeout(() => {
window.print();
// window.close();
window.close();
}, 100); // small delay ensures DOM is painted
});
<\/script>
@ -395,7 +394,7 @@
requestAnimationFrame(() => {
setTimeout(() => {
window.print();
// window.close();
window.close();
}, 100); // small delay ensures DOM is painted
});
<\/script>
@ -405,43 +404,6 @@
pw.document.close();
});
});
µ('#print').off("click").click(()=>{
const content = µ('.print')[0];
if(!content) return;
const pw = window.open('', '_blank');
pw.document.write(`
<html>
<head>
<title>${printTitle}</title>
<link rel="stylesheet" href="/assets/css/fonts.css">
<link rel="stylesheet" href="/assets/css/molybdenum.css">
<style>
@page {
margin: 1cm;
size: A4 landscape;
}
body {
margin: 0;
padding: 0;
font-size: 10pt !important;
}
</style>
</head>
<body>
${content.innerHTML}
<script>
requestAnimationFrame(() => {
setTimeout(() => {
window.print();
// window.close();
}, 100); // small delay ensures DOM is painted
});
<\/script>
</body>
</html>
`);
pw.document.close();
});
let str = "☆☆☆☆☆";
for(let s=1;s<=data.rating;s++)
{
@ -544,17 +506,6 @@
ero.append(eks);
ero.append(ems);
ero.append(ert);
// <th>Inovasi</th>
// <th>Sasaran</th>
// <th>Indikator</th>
// <th>Target</th>
// <th>Aksi</th>
// <th>Rencana Mulai</th>
// <th>Selesai Pada</th>
// <th>Kendala dan Solusi</th>
// <th>Catatan Evaluasi</th>
// <th></th>
//evContent
env.append(v.sasaran);
ess.append(v.entityTarget);
ein.append(v.indicators);