aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/resources
diff options
context:
space:
mode:
authorfschneider <florian.schneider@student.tugraz.at>2015-09-17 08:19:38 +0200
committerfschneider <florian.schneider@student.tugraz.at>2015-09-17 08:19:38 +0200
commiteba877880d96f1335ef2e593ae02782357a7de3f (patch)
tree79f55548732b8b62afc7619b87223d5343cf4e11 /pdf-as-web/src/main/resources
parente739c3c7fd02ed8fd73474080b05b8b4096186fc (diff)
downloadpdf-as-4-eba877880d96f1335ef2e593ae02782357a7de3f.tar.gz
pdf-as-4-eba877880d96f1335ef2e593ae02782357a7de3f.tar.bz2
pdf-as-4-eba877880d96f1335ef2e593ae02782357a7de3f.zip
before cherry pick
Diffstat (limited to 'pdf-as-web/src/main/resources')
-rw-r--r--pdf-as-web/src/main/resources/template_error.html17
-rw-r--r--pdf-as-web/src/main/resources/template_provide.html13
2 files changed, 9 insertions, 21 deletions
diff --git a/pdf-as-web/src/main/resources/template_error.html b/pdf-as-web/src/main/resources/template_error.html
index 47ba9c56..21faa082 100644
--- a/pdf-as-web/src/main/resources/template_error.html
+++ b/pdf-as-web/src/main/resources/template_error.html
@@ -8,20 +8,11 @@ Error Page:
<p>##ERROR_MESSAGE##</p>
<p>##ERROR_STACK##</p>
<script type="text/javascript">
- try {
- var data = {
- pdfas: {
- error: true,
- msg: "##ERROR_MESSAGE##"
- }
- }
- parent.postMessage(data, '##PUBLICURL##');
- } catch(error) {
- if(window.console) {
- window.console.log("Sending message failed! to parent: " + parent, error);
- }
- }
+ console.log("sending error msg to parent: " + parent);
+ window.parent.respond("##PDFDATAURL##", false);
+
+
</script>
</body>
</html>
diff --git a/pdf-as-web/src/main/resources/template_provide.html b/pdf-as-web/src/main/resources/template_provide.html
index 28b51ed4..76287404 100644
--- a/pdf-as-web/src/main/resources/template_provide.html
+++ b/pdf-as-web/src/main/resources/template_provide.html
@@ -7,15 +7,12 @@
PDF ready @: <a href="##PDFDATAURL##">download here</a>
<script type="text/javascript">
- var data = {
- pdfas: {
- success: true,
- pdfUrl: "##PDFDATAURL##"
- }
- }
- console.log("sending msg to parent: " + parent);
- parent.postMessage(data, '*'); //'##PUBLICURL##');
+
+ console.log("sending success msg to parent: " + parent);
+ window.parent.respond("##PDFDATAURL##", true);
+
+
</script>
</body>
</html>