Added to print script
This commit is contained in:
parent
2e8f2266a7
commit
aae4c521d5
2 changed files with 14 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
<#include "individual-setup.ftl">
|
<#include "individual-setup.ftl">
|
||||||
${scripts.add('<script async type="text/javascript" src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script>')}
|
${scripts.add('<script async type="text/javascript" src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script>')}
|
||||||
${scripts.add('<script async type="text/javascript" src="//cdn.plu.mx/widget-popup.js"></script>')}
|
${scripts.add('<script async type="text/javascript" src="//cdn.plu.mx/widget-popup.js"></script>')}
|
||||||
|
${scripts.add('<script async type="text/javascript" src="${urls.base}/themes/iph/js/print.js"></script>')}
|
||||||
<#import "individual-qrCodeGenerator.ftl" as qr>
|
<#import "individual-qrCodeGenerator.ftl" as qr>
|
||||||
<#import "lib-vivo-properties.ftl" as vp>
|
<#import "lib-vivo-properties.ftl" as vp>
|
||||||
<#--Number of labels present-->
|
<#--Number of labels present-->
|
||||||
|
|
13
webapp/src/main/webapp/themes/iph/js/print.js
Normal file
13
webapp/src/main/webapp/themes/iph/js/print.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
function printPageContent() {
|
||||||
|
var printContent = null;
|
||||||
|
var winPrint = window.open('','', 'left=0,top=0,width=800,height=900');
|
||||||
|
winPrint.document.write("<!DOCTYPE html><html><head><base href=\'" + document.location.href + "\' target='_blank'/><title>" + document.title + "</title><style>@page { size: auto; margin: 10mm; } .page,header{ page-break-inside: avoid; } .headerTD{ display:none; } * { page-break-before: auto !important; } </style></head><body>");
|
||||||
|
printContent = document.getElementById("wrapper-content");
|
||||||
|
winPrint.document.write(printContent.innerHTML);
|
||||||
|
winPrint.document.write("</body></html>");
|
||||||
|
winPrint.document.close();
|
||||||
|
winPrint.focus();
|
||||||
|
setTimeout(function(){
|
||||||
|
winPrint.print();
|
||||||
|
}, 500);
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue