From 937b9b4c599055d6d15e08d6edcaa54378c4785c Mon Sep 17 00:00:00 2001 From: Harrys Ravalomanana Date: Tue, 14 Jan 2020 16:56:40 +0400 Subject: [PATCH 1/2] PHRAS-2862 #comment Fix lightbox mobile : video resize #time 3h --- templates/mobile/common/thumbnail.html.twig | 5 ++++- templates/mobile/lightbox/basket_element.html.twig | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/templates/mobile/common/thumbnail.html.twig b/templates/mobile/common/thumbnail.html.twig index d2b805d5fb..f62d84281d 100644 --- a/templates/mobile/common/thumbnail.html.twig +++ b/templates/mobile/common/thumbnail.html.twig @@ -57,9 +57,12 @@ {% 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 %} + + frameborder="0" allowfullscreen class="video-iframe"> {% elseif record_type == 'FLEXPAPER' %} diff --git a/templates/mobile/lightbox/basket_element.html.twig b/templates/mobile/lightbox/basket_element.html.twig index 8414f5d4ac..9d7d8c57a3 100644 --- a/templates/mobile/lightbox/basket_element.html.twig +++ b/templates/mobile/lightbox/basket_element.html.twig @@ -93,21 +93,4 @@ - {% endblock %} diff --git a/yarn.lock b/yarn.lock index 6fc7d8d7bf..b0531eaf13 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7577,10 +7577,10 @@ phraseanet-common@^0.4.5-d: js-cookie "^2.1.0" pym.js "^1.3.1" -phraseanet-production-client@0.34.99-d: - version "0.34.99-d" - resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.99-d.tgz#fc06941163f698dc77ebca8a4c16663aa3ac458a" - integrity sha512-016LZam+eNQqAYyduiGinT79YkGeUDWZ9uk7r01BHmgsYjWc+UoCvUvExhCCHcoyMm+qd29VfHhQAWoyCCkG6g== +phraseanet-production-client@0.34.102-d: + version "0.34.102-d" + resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.102-d.tgz#ee2772fd712a5fb2acc87eae5c7d4a2a46f5a28a" + integrity sha512-3KtY3n9uI42o6mDUDDXX6KgP3Os2FlQE3nkzEJc3eVbstG9V6rNlk8J/ujXaMKy1hibBT+9f7TTSYy0Z9ARPBA== dependencies: "@mapbox/mapbox-gl-language" "^0.9.2" "@turf/turf" "^5.1.6"