summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Monniez <moc@odoo.com>2017-10-26 16:22:33 +0200
committerChristophe Monniez <moc@odoo.com>2017-10-27 08:39:01 +0200
commite47e78e2e9005268bc7ba6d22ac581c6cec23e82 (patch)
treeeed11382901bd8ccc3034cb2337dbf8ae5a6af1c
parent809aaf9e7b9de28383444d5059b19a67bb513f51 (diff)
[FIX] website_slides: pdf slide viewer slug
When trying to get the pdf content in an IFrame, the url based on ID was not found and then redirected to a rewritten URL eventually with wrong protocol (https became http). This causes a bug in modern browser that doesn't allow mixed content if the base website is in https. By using the slug in the URL, there is no redirection and we avoid changing the protocol. Thanks @Gorash and @nim-odoo opw-777950
-rw-r--r--addons/website_slides/view/website_slides_embed.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_slides/view/website_slides_embed.xml b/addons/website_slides/view/website_slides_embed.xml
index 4dd3036d2d6..89ae0f8e4db 100644
--- a/addons/website_slides/view/website_slides_embed.xml
+++ b/addons/website_slides/view/website_slides_embed.xml
@@ -61,7 +61,7 @@
<!-- PDF Viewer Body : contains the canvas, the loader, or the image-->
<div id="PDFSlideViewer" style="position:relative;"
t-attf-data-slideid="#{slide.id}"
- t-attf-data-slideurl="/slides/slide/#{slide.id}/pdf_content"
+ t-attf-data-slideurl="/slides/slide/#{slug(slide)}/pdf_content"
t-attf-data-downloadable="#{slide.download_security}"
t-att-data-defaultpage="page">
<t t-if="is_embedded">
@@ -135,7 +135,7 @@
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-center"></div>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 pull-right text-right">
- <a t-if="slide.download_security and not is_embedded" target="_top" t-attf-href="/slides/slide/#{slide.id}/download" title="Download" id="download">
+ <a t-if="slide.download_security and not is_embedded" target="_top" t-attf-href="/slides/slide/#{slug(slide)}/download" title="Download" id="download">
<i class="fa fa-download fa-2x"></i>
</a>
<span id="fullscreen" title="View fullscreen">