You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.3 KiB
JavaScript
40 lines
1.3 KiB
JavaScript
_id("printforms").addEventListener("click", function () {
|
|
//alert("ok")
|
|
$('#paper-print').printThis({
|
|
// base: 'https://jasonday.github.io/printThis',
|
|
header: null, // prefix to html
|
|
footer: null,
|
|
importCSS: true,
|
|
loadCSS: "{{PATH}}/print.css?v=" + Date.now(),
|
|
//header: "<h1 style=\" text-align:center\">"+dataPrintX.title+"</h1>",
|
|
});
|
|
}, false);
|
|
|
|
(function () {
|
|
globalThis.realHeight;
|
|
setTimeout(function () {
|
|
var report = _id('cardMenuReport').querySelector('.card-body');
|
|
if (report.clientWidth < 837) {
|
|
if (globalThis.realHeight == undefined) {
|
|
globalThis.realHeight = report.clientHeight;
|
|
};
|
|
report.style.transform = 'scale(' + report.clientWidth / 837 + ')';
|
|
report.style.transformOrigin = 'left top';
|
|
report.parentNode.style.overflow = 'hidden';
|
|
var max = globalThis.realHeight * (
|
|
report.clientWidth
|
|
/ 837
|
|
);
|
|
|
|
report
|
|
.parentNode
|
|
.style
|
|
.height = (Math.round(max) + 50) + 'px';
|
|
|
|
report
|
|
.parentNode
|
|
.marginBottom = '50px';
|
|
|
|
};
|
|
}, 0);
|
|
})(); |