diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c6ee8b47b..0843ec10b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,7 @@ Changelog * Notification emails are now sent per user (Matthew Downey) * Added the ability to override the default manager on Page models * Added an optional human-friendly `site_name` field to sites (Timo Rieber) + * Added success message after updating image from the image upload view (Christian Peters) * New translations for Arabic and Latvian * Fix: HTTP cache purge now works again on Python 2 (Mitchel Cabuloy) * Fix: Locked pages can no longer be unpublished (Alex Bridge) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 4dabcf77c..76d8c846b 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -87,6 +87,7 @@ Contributors * Maris Serzans * Shu Ishida * Ben Kerle +* Christian Peters Translators diff --git a/docs/releases/1.3.rst b/docs/releases/1.3.rst index 7e7f2125b..030154255 100644 --- a/docs/releases/1.3.rst +++ b/docs/releases/1.3.rst @@ -64,6 +64,7 @@ Minor features * Notification emails are now sent per user (Matthew Downey) * Added the ability to override the default manager on Page models * Added an optional human-friendly ``site_name`` field to sites (Timo Rieber) + * Added success message after updating image from the image upload view (Christian Peters) * New translations for Arabic and Latvian diff --git a/wagtail/wagtailimages/static_src/wagtailimages/js/add-multiple.js b/wagtail/wagtailimages/static_src/wagtailimages/js/add-multiple.js index a7c72a7e8..7262e60a1 100644 --- a/wagtail/wagtailimages/static_src/wagtailimages/js/add-multiple.js +++ b/wagtail/wagtailimages/static_src/wagtailimages/js/add-multiple.js @@ -25,6 +25,7 @@ $(function() { maxFileSize: window.fileupload_opts.errormessages.max_file_size }, add: function(e, data) { + $('.messages').empty(); var $this = $(this); var that = $this.data('blueimp-fileupload') || $this.data('fileupload') var li = $($('#upload-list-item').html()).addClass('upload-uploading') @@ -134,6 +135,8 @@ $(function() { $.post(this.action, form.serialize(), function(data) { if (data.success) { + var statusText = $('.status-msg.update-success').text(); + addMessage('success', statusText); itemElement.slideUp(function() {$(this).remove()}); } else { form.replaceWith(data.form); diff --git a/wagtail/wagtailimages/templates/wagtailimages/multiple/add.html b/wagtail/wagtailimages/templates/wagtailimages/multiple/add.html index 85a099eea..c4b662529 100644 --- a/wagtail/wagtailimages/templates/wagtailimages/multiple/add.html +++ b/wagtail/wagtailimages/templates/wagtailimages/multiple/add.html @@ -48,6 +48,7 @@

{% trans "Upload successful. Please update this image with a more appropriate title, if necessary. You may also delete the image completely if the upload wasn't required." %}

{% trans "Sorry, upload failed." %}

+

{% trans "Image updated." %}