From 045056dc460415432ff57af61cf730ff2e1db895 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 3 Apr 2018 02:53:57 -0400 Subject: [PATCH] Move image container height control to the document image template. Signed-off-by: Roberto Rosario --- mayan/apps/appearance/static/appearance/css/base.css | 1 - .../templates/documents/forms/widgets/document_page_image.html | 2 +- .../templates/documents/widgets/document_thumbnail.html | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mayan/apps/appearance/static/appearance/css/base.css b/mayan/apps/appearance/static/appearance/css/base.css index f66ebd429d..233d83e08f 100644 --- a/mayan/apps/appearance/static/appearance/css/base.css +++ b/mayan/apps/appearance/static/appearance/css/base.css @@ -68,7 +68,6 @@ body { .thin_border { border: 1px solid black; - max-height: 200px; } .mayan-page-wrapper-interactive { diff --git a/mayan/apps/documents/templates/documents/forms/widgets/document_page_image.html b/mayan/apps/documents/templates/documents/forms/widgets/document_page_image.html index b67e5eb105..5c982116b3 100644 --- a/mayan/apps/documents/templates/documents/forms/widgets/document_page_image.html +++ b/mayan/apps/documents/templates/documents/forms/widgets/document_page_image.html @@ -8,7 +8,7 @@ class="thin_border {{ image_classes }}" data-url="{{ instance.get_api_image_url }}?width={{ image_width }}&height={{ image_height }}&zoom={{ image_zoom }}&rotation={{ image_rotation }}" src="#" - style="{% if display_full_width %}width: 100%{% endif %};" + style="{% if display_full_width %}width: 100%;{% endif %} {% if image_container_height %}max-height: {{ image_container_height }}; {% endif %}" /> diff --git a/mayan/apps/documents/templates/documents/widgets/document_thumbnail.html b/mayan/apps/documents/templates/documents/widgets/document_thumbnail.html index afd1f35f12..3bcb88d6b8 100644 --- a/mayan/apps/documents/templates/documents/widgets/document_thumbnail.html +++ b/mayan/apps/documents/templates/documents/widgets/document_thumbnail.html @@ -11,7 +11,9 @@ > {% with 'lazy-load' as image_classes %} {% with 'true' as display_full_width %} + {% with '200px' as image_container_height %} {% include 'documents/forms/widgets/document_page_image.html' %} {% endwith %} {% endwith %} + {% endwith %}