0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Set data-focal-point-* values to be '' instead of 'None' when they are empty.

This commit is contained in:
Asanka Lihiniyagoda 2019-02-03 22:17:51 +05:30 committed by LB Johnston
parent 8b7efc0b16
commit 74218a7e43
3 changed files with 6 additions and 4 deletions

View File

@ -23,6 +23,7 @@ Changelog
* Fix: Added missing collection column specifier on document listing template (Sergey Fedoseev)
* Fix: Page Copy will now also copy ParentalManyToMany field relations (LB (Ben Johnston))
* Fix: Admin HTML header now includes correct language code (Matt Westcott)
* Fix: Unclear error message when saving image after focal point edit (Hugo van den Berg)
2.4 (19.12.2018)

View File

@ -38,6 +38,7 @@ Bug fixes
* Added missing collection column specifier on document listing template (Sergey Fedoseev)
* Page Copy will now also copy ParentalManyToMany field relations (LB (Ben Johnston))
* Admin HTML header now includes correct language code (Matt Westcott)
* Unclear error message when saving image after focal point edit (Hugo van den Berg)
Upgrade considerations

View File

@ -59,10 +59,10 @@
<div class="focal-point-chooser"
style="max-width: {{ rendition.width }}px; max-height: {{ rendition.height }}px;"
data-focal-point-x="{{ image.focal_point_x }}"
data-focal-point-y="{{ image.focal_point_y }}"
data-focal-point-width="{{ image.focal_point_width }}"
data-focal-point-height="{{ image.focal_point_height }}">
data-focal-point-x="{{ image.focal_point_x|default_if_none:'' }}"
data-focal-point-y="{{ image.focal_point_y|default_if_none:'' }}"
data-focal-point-width="{{ image.focal_point_width|default_if_none:'' }}"
data-focal-point-height="{{ image.focal_point_height|default_if_none:'' }}">
<img {{ rendition.attrs }} data-original-width="{{ image.width|unlocalize }}" data-original-height="{{ image.height|unlocalize }}" class="show-transparency">
<div class="current-focal-point-indicator{% if not image.has_focal_point %} hidden{% endif %}"></div>