printing bug fix
This commit is contained in:
parent
026fe7efe6
commit
e79b713c67
@ -203,7 +203,6 @@
|
|||||||
"Terlambat",
|
"Terlambat",
|
||||||
"Tidak Terlaksana"
|
"Tidak Terlaksana"
|
||||||
]
|
]
|
||||||
// console.log(data)
|
|
||||||
function µ(selector)
|
function µ(selector)
|
||||||
{
|
{
|
||||||
if (selector) return $(thisDialog.box).find(selector);
|
if (selector) return $(thisDialog.box).find(selector);
|
||||||
@ -269,7 +268,7 @@
|
|||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.print();
|
window.print();
|
||||||
// window.close();
|
window.close();
|
||||||
}, 100); // small delay ensures DOM is painted
|
}, 100); // small delay ensures DOM is painted
|
||||||
});
|
});
|
||||||
<\/script>
|
<\/script>
|
||||||
@ -332,7 +331,7 @@
|
|||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.print();
|
window.print();
|
||||||
// window.close();
|
window.close();
|
||||||
}, 100); // small delay ensures DOM is painted
|
}, 100); // small delay ensures DOM is painted
|
||||||
});
|
});
|
||||||
<\/script>
|
<\/script>
|
||||||
@ -395,7 +394,7 @@
|
|||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.print();
|
window.print();
|
||||||
// window.close();
|
window.close();
|
||||||
}, 100); // small delay ensures DOM is painted
|
}, 100); // small delay ensures DOM is painted
|
||||||
});
|
});
|
||||||
<\/script>
|
<\/script>
|
||||||
@ -405,43 +404,6 @@
|
|||||||
pw.document.close();
|
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 = "☆☆☆☆☆";
|
let str = "☆☆☆☆☆";
|
||||||
for(let s=1;s<=data.rating;s++)
|
for(let s=1;s<=data.rating;s++)
|
||||||
{
|
{
|
||||||
@ -544,17 +506,6 @@
|
|||||||
ero.append(eks);
|
ero.append(eks);
|
||||||
ero.append(ems);
|
ero.append(ems);
|
||||||
ero.append(ert);
|
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);
|
env.append(v.sasaran);
|
||||||
ess.append(v.entityTarget);
|
ess.append(v.entityTarget);
|
||||||
ein.append(v.indicators);
|
ein.append(v.indicators);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user