File Upload: Clear notifications before success/error
So we don't end up with both file-upload and success at the same time when uploading files that go up fast.
This commit is contained in:
@@ -114,6 +114,7 @@ function setup_file_uploader(index, upload_element) {
|
|||||||
$('.node-edit-title').html(filename);
|
$('.node-edit-title').html(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toastr.clear();
|
||||||
toastr.success('File uploaded!');
|
toastr.success('File uploaded!');
|
||||||
set_progress_bar(100);
|
set_progress_bar(100);
|
||||||
|
|
||||||
@@ -131,6 +132,7 @@ function setup_file_uploader(index, upload_element) {
|
|||||||
uploadErrors.push(fileupload.messages[key]);
|
uploadErrors.push(fileupload.messages[key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toastr.clear();
|
||||||
toastr.error(uploadErrors.join("; "), 'Upload error');
|
toastr.error(uploadErrors.join("; "), 'Upload error');
|
||||||
|
|
||||||
set_progress_bar(100, 'progress-error');
|
set_progress_bar(100, 'progress-error');
|
||||||
|
Reference in New Issue
Block a user