From 2fe1ae425bc25331a5285f490f75025f92326e45 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Fri, 21 Jul 2017 01:51:38 -0400 Subject: [PATCH] Make the width of a document image and adjustable property. Allows zoom to work again in the page view. Signed-off-by: Roberto Rosario --- mayan/apps/documents/widgets.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mayan/apps/documents/widgets.py b/mayan/apps/documents/widgets.py index bb811afefe..ea09fe1a36 100644 --- a/mayan/apps/documents/widgets.py +++ b/mayan/apps/documents/widgets.py @@ -231,10 +231,10 @@ class InstanceImageWidget(object): '' '' '' - ' '.format( - height=self.height or '150', + width=self.width or '100%', height=self.height or '150', image_class=self.image_class, preview_full_url=self.get_preview_view_url(instance=instance), alt_text=self.alt_text @@ -285,6 +285,8 @@ class CarouselDocumentPageThumbnailWidget(BaseDocumentThumbnailWidget): class DocumentThumbnailWidget(BaseDocumentThumbnailWidget): + width = '100%' + def get_click_view_kwargs(self, instance): return { 'pk': instance.pk,