mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Make document failure clearer
This commit is contained in:
parent
6a99281fff
commit
1fba1c688e
@ -1716,8 +1716,10 @@
|
|||||||
window.countUploadingDocuments--;
|
window.countUploadingDocuments--;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDocumentError() {
|
function handleDocumentError(file) {
|
||||||
|
dropzone.removeFile(file);
|
||||||
window.countUploadingDocuments--;
|
window.countUploadingDocuments--;
|
||||||
|
swal("{!! trans('texts.error_refresh_page') !!}");
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -271,7 +271,10 @@ function InvoiceModel(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.removeDocument = function(doc) {
|
self.removeDocument = function(doc) {
|
||||||
var public_id = doc.public_id?doc.public_id():doc;
|
var public_id = doc && doc.public_id ? doc.public_id() : doc;
|
||||||
|
if (! public_id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
self.documents.remove(function(document) {
|
self.documents.remove(function(document) {
|
||||||
return document.public_id() == public_id;
|
return document.public_id() == public_id;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user