Add a title attribute to the image displayed in an ImageChooserBlock.

pull/4635/merge
Samir Shah 2018-06-18 14:23:27 +03:00 zatwierdzone przez Matt Westcott
rodzic 5ddba47cc3
commit 265d4baaf2
4 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -10,6 +10,7 @@ Changelog
* EmbedBlock now validates against recognised embed providers on save (Bertrand Bordage)
* Made cache control headers on Wagtail admin consistent with Django admin (Tomasz Knapik)
* Notification emails now include an "Auto-Submitted: auto-generated" header (Dan Braghis)
* Image chooser panels now show alt text as title (Samir Shah)
* Fix: Respect next param on login (Loic Teixeira)
* Fix: InlinePanel now handles relations that specify a related_query_name (Aram Dulyan)
* Fix: before_delete_page / after_delete_page hooks now run within the same database transaction as the page deletion (Tomasz Knapik)

Wyświetl plik

@ -27,6 +27,7 @@ Other features
* EmbedBlock now validates against recognised embed providers on save (Bertrand Bordage)
* Made cache control headers on Wagtail admin consistent with Django admin (Tomasz Knapik)
* Notification emails now include an "Auto-Submitted: auto-generated" header (Dan Braghis)
* Image chooser panels now show alt text as title (Samir Shah)
Bug fixes

Wyświetl plik

@ -15,7 +15,8 @@ function createImageChooser(id) {
src: imageData.preview.url,
width: imageData.preview.width,
height: imageData.preview.height,
alt: imageData.title
alt: imageData.title,
title: imageData.title
});
chooserElement.removeClass('blank');
editLink.attr('href', imageData.edit_link);

Wyświetl plik

@ -6,7 +6,7 @@
{% block chosen_state_view %}
<div class="preview-image">
{% if image %}
{% image image max-165x165 class="show-transparency" %}
{% image image max-165x165 class="show-transparency" title=image.title %}
{% else %}
<img>
{% endif %}