forked from anabarasan/os.addons
-
Notifications
You must be signed in to change notification settings - Fork 0
dineshkummarc/os.addons
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Print & Export to PDF For print functionality in theme.html, add the below line inside the script tag var isTheme = '$httprequest.getParameters().get("theme")' in import.html, add at the end of file <script src='/static/html/a.custom.js'></script> =============================================================================== In list report, in the first cell {if isTheme != 'off'} <input class='button' style="width:60px;" type='button' value='Print' onClick="printer('report')"/> {/if} =============================================================================== In form / Queue, in the first cell {if isTheme != 'off'} <input class='button' style="width:60px;" type='button' value='Print' onClick="printer('form)"/> {/if} =============================================================================== in queue / list report / form, in last cell {if isTheme == 'off'} {eval}wait_for_jst();{/eval} {/if} =============================================================================== For export to pdf in app.yaml, add the below 2 lines immediately after handlers: - url: /export2pdf script: orangescape/addons/export2pdf/export2pdf.py in import.html, add at the end of file <script src='/static/html/a.custom.js'></script> <form id = "pdfForm" action='/export2pdf' method="post"> <input type="hidden" id="src" name="src" value=""></input> <input type="hidden" name="pdf_name" value="Report.pdf" /> </form> =============================================================================== Add the below code, where you want to give export as pdf option <input type="image" id="pdfdownload" src="/static/images/downloadpdf.png" value="PDF" onClick="export2PDF()"/> =============================================================================== In app.yaml immediately under handlers: add the below two lines - url: /export2pdf script: orangescape/addons/export2pdf.py =============================================================================== Note: print is not applicable for aggregate reports. export to pdf will not work for forms with images. you can get the theme.html & import.html & app.yaml from the gae runtime files
About
A set of functionality for use in OrangeScape.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published