numerous updates
This commit is contained in:
@@ -130,8 +130,11 @@ djQuery(function ($) {
|
||||
event.preventDefault();
|
||||
});
|
||||
},
|
||||
error: function (file, response) {
|
||||
showError(file.name + ': ' + response.error);
|
||||
error: function (file, msg, response) {
|
||||
if (response && response.error) {
|
||||
msg += ' ; ' + response.error;
|
||||
}
|
||||
showError(file.name + ': ' + msg);
|
||||
this.removeAllFiles(true);
|
||||
},
|
||||
reset: function () {
|
||||
|
||||
@@ -33,6 +33,7 @@ if (django.jQuery) {
|
||||
element.val(chosenId);
|
||||
element.closest('.js-filer-dropzone').addClass('js-object-attached');
|
||||
image.attr('src', chosenThumbnailUrl).removeClass('hidden');
|
||||
image.removeAttr('srcset'); // would be nicer, but much more complicate to also replace 'srcset'
|
||||
descriptionText.text(chosenDescriptionTxt);
|
||||
clearer.removeClass('hidden');
|
||||
lookup.addClass('related-lookup-change');
|
||||
|
||||
@@ -199,14 +199,14 @@ if (django.jQuery) {
|
||||
window.location.reload();
|
||||
}
|
||||
},
|
||||
error: function (file, errorText) {
|
||||
error: function (file, error) {
|
||||
updateUploadNumber();
|
||||
if (errorText === 'duplicate') {
|
||||
if (error === 'duplicate') {
|
||||
return;
|
||||
}
|
||||
hasErrors = true;
|
||||
if (window.filerShowError) {
|
||||
window.filerShowError(file.name + ': ' + errorText);
|
||||
window.filerShowError(file.name + ': ' + error.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ Cl.mediator = new Mediator();
|
||||
|
||||
showErrorTimeout = setTimeout(function () {
|
||||
$('.' + filerErrorClass).remove();
|
||||
}, 3000);
|
||||
}, 5000);
|
||||
};
|
||||
|
||||
// Focal point logic init
|
||||
|
||||
Reference in New Issue
Block a user