mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-25 11:19:57 +00:00
Small fix in the JS
This commit is contained in:
@@ -96,7 +96,7 @@ $("form").submit(function (event) {
|
|||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success: onSuccess
|
success: onSuccess
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var images = formData.getAll('images');
|
var images = formData.getAll('images');
|
||||||
@@ -141,7 +141,10 @@ $("form").submit(function (event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onSuccess(image, data, status, jqXHR) {
|
function onSuccess(image, data, status, jqXHR) {
|
||||||
|
if ($(data).find('.errorlist.nonfield')[0])
|
||||||
var errors = Array.from($(data).find('.errorlist.nonfield')[0].children);
|
var errors = Array.from($(data).find('.errorlist.nonfield')[0].children);
|
||||||
|
else
|
||||||
|
var errors = []
|
||||||
while(errors.length > 0)
|
while(errors.length > 0)
|
||||||
errorlist.appendChild(errors.shift());
|
errorlist.appendChild(errors.shift());
|
||||||
progress.value = ++completeCount / imagesCount;
|
progress.value = ++completeCount / imagesCount;
|
||||||
|
Reference in New Issue
Block a user