[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
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user