Merge branch 'master' into PHRAS-2875_Prod_workzone_and_basket_zone_Refacto

This commit is contained in:
Harrys Ravalomanana
2020-01-20 11:08:20 +04:00
committed by GitHub
4 changed files with 10 additions and 15 deletions

View File

@@ -57,9 +57,13 @@
{% set url = app.getAuthenticator().isAuthenticated() ? thumbnail.get_url() : thumbnail.get_permalink().get_url() %}
{% set record_type = thumbnail.get_type() %}
{% if record_type == 'VIDEO_MP4' or record_type == 'VIDEO_FLV' %}
{% set thumbnail_height = thumbnail.get_height() > 0 ? thumbnail.get_height() : 120 %}
{% set thumbnail_width = thumbnail.get_width() > 0 ? thumbnail.get_width() : 120 %}
<input type="hidden" class="hidden" id="videoHeight" name="videoHeight" value="{{ thumbnail_height }}"/>
<input type="hidden" class="hidden" id="videoWidth" name="videoWidth" value="{{ thumbnail_width }}"/>
<iframe width="100%" height="100%"
src="{{ url('alchemy_embed_view', {url: url|trim, autoplay: autoplay|default('false') }) }}"
frameborder="0" allowfullscreen></iframe>
frameborder="0" allowfullscreen class="video-iframe"></iframe>
{% elseif record_type == 'FLEXPAPER' %}
<iframe width="100%" height="100%"
src="{{ url('alchemy_embed_view', {url: url|trim, autoplay: autoplay|default('false') }) }}"

View File

@@ -93,13 +93,4 @@
</div>
</div>
<script type="text/javascript">
/*resize of PDF */
$(window).on("load resize ",function(e){
if($('.pdf-iframe').length > 0) {
var pdfHeight = $('.pdf-iframe').width() / 0.707;
$('.pdf-iframe').css('height', pdfHeight);
}
});
</script>
{% endblock %}