Skip to content

Commit

Permalink
Merge branch 'feature/open-pdf-links-in-new-tab' into develop
Browse files Browse the repository at this point in the history
 [SVCS-423]
 Closes: #273
  • Loading branch information
felliott committed Nov 14, 2017
2 parents dd5dd3e + 784f80f commit 9e9fc26
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mfr/extensions/pdf/templates/viewer.mako
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ http://sourceforge.net/adobe/cmap/wiki/License/
-->
<html dir="ltr" mozdisallowselectionprint moznomarginboxes>
<head>
<base href="${base}/web/">
<base href="${base}/web/" target="_blank">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="google" content="notranslate">
Expand Down
2 changes: 1 addition & 1 deletion mfr/server/static/js/mfr.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
self.pymParent.iframe.setAttribute('allowfullscreen', '');
self.pymParent.iframe.setAttribute('webkitallowfullscreen', '');
self.pymParent.iframe.setAttribute('scrolling', 'yes');
self.pymParent.iframe.setAttribute('sandbox', 'allow-scripts');
self.pymParent.iframe.setAttribute('sandbox', 'allow-scripts allow-popups');

self.pymParent.el.appendChild(self.spinner);
$(self.pymParent.iframe).on('load', function () {
Expand Down
2 changes: 1 addition & 1 deletion tests/extensions/pdf/test_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ class TestPdfRenderer:

def test_render_pdf(self, renderer, metadata, assets_url):
body = renderer.render()
assert '<base href="{}/{}/web/">'.format(assets_url, 'pdf') in body
assert '<base href="{}/{}/web/" target="_blank">'.format(assets_url, 'pdf') in body
assert '<div id="viewer" class="pdfViewer"></div>' in body
assert 'DEFAULT_URL = \'{}\''.format(metadata.download_url) in body

0 comments on commit 9e9fc26

Please sign in to comment.