Update to Fancybox 3. Update to jQuery 3.3.1. Update and simplify MayanImage class.
Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
committed by
Roberto Rosario
parent
13d36ab174
commit
d03c6b4646
@@ -261,6 +261,8 @@ class Document(models.Model):
|
||||
latest_version = self.latest_version
|
||||
if latest_version:
|
||||
return latest_version.get_api_image_url()
|
||||
else:
|
||||
return '#'
|
||||
|
||||
def invalidate_cache(self):
|
||||
for document_version in self.versions.all():
|
||||
@@ -430,6 +432,8 @@ class DocumentVersion(models.Model):
|
||||
first_page = self.pages.first()
|
||||
if first_page:
|
||||
return first_page.get_api_image_url()
|
||||
else:
|
||||
return '#'
|
||||
|
||||
def get_rendered_string(self, preserve_extension=False):
|
||||
if preserve_extension:
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
data-caption="<a class='a-caption' href='{{ instance.get_absolute_url }}'>{{ instance }} <i class='fa fa-external-link-alt'></i></a>"
|
||||
{% endif %}
|
||||
href="{{ instance.get_api_image_url }}?width={{ size_preview_width }}&height={{ size_preview_height }}"
|
||||
{% if gallery_name %}rel="{{ gallery_name }}"{% endif %}
|
||||
data-type="image"
|
||||
{% if gallery_name %}data-fancybox="{{ gallery_name }}"{% endif %}
|
||||
>
|
||||
{% with 'lazy-load' as image_classes %}
|
||||
{% with 'true' as display_full_width %}
|
||||
|
||||
Reference in New Issue
Block a user