added success message after image update

pull/1830/merge
shredding 2015-10-15 11:45:52 +02:00 zatwierdzone przez Matt Westcott
rodzic c65b155f2f
commit 6422c7f618
5 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -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)

Wyświetl plik

@ -87,6 +87,7 @@ Contributors
* Maris Serzans
* Shu Ishida
* Ben Kerle
* Christian Peters
Translators

Wyświetl plik

@ -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

Wyświetl plik

@ -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);

Wyświetl plik

@ -48,6 +48,7 @@
<div class="right col9">
<p class="status-msg success">{% 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." %}</p>
<p class="status-msg failure">{% trans "Sorry, upload failed." %}</p>
<p class="status-msg update-success">{% trans "Image updated." %}</p>
<p class="status-msg failure error_messages"></p>
</div>
</li>