numerous updates

This commit is contained in:
Ross
2022-05-20 20:26:02 +01:00
parent 0373b22e78
commit 77ccdbc92a
246 changed files with 22615 additions and 2409 deletions
+5 -2
View File
@@ -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 () {
+1
View File
@@ -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');
+3 -3
View File
@@ -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);
}
}
});
+1 -1
View File
@@ -36,7 +36,7 @@ Cl.mediator = new Mediator();
showErrorTimeout = setTimeout(function () {
$('.' + filerErrorClass).remove();
}, 3000);
}, 5000);
};
// Focal point logic init