1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00

Moved up handleDocumentUploaded counter

This commit is contained in:
Hillel Coren 2016-06-07 21:46:07 +03:00
parent 4976d5b057
commit a91f257f01
2 changed files with 3 additions and 3 deletions

View File

@ -371,7 +371,7 @@
} }
window.countUploadingDocuments = 0; window.countUploadingDocuments = 0;
function handleDocumentAdded(file){ function handleDocumentAdded(file){
// open document when clicked // open document when clicked
if (file.url) { if (file.url) {
@ -397,9 +397,9 @@
} }
function handleDocumentUploaded(file, response){ function handleDocumentUploaded(file, response){
window.countUploadingDocuments--;
file.public_id = response.document.public_id file.public_id = response.document.public_id
model.documents()[file.index].update(response.document); model.documents()[file.index].update(response.document);
window.countUploadingDocuments--;
if(response.document.preview_url){ if(response.document.preview_url){
dropzone.emit('thumbnail', file, response.document.preview_url); dropzone.emit('thumbnail', file, response.document.preview_url);
} }

View File

@ -1490,9 +1490,9 @@
} }
function handleDocumentUploaded(file, response){ function handleDocumentUploaded(file, response){
window.countUploadingDocuments--;
file.public_id = response.document.public_id file.public_id = response.document.public_id
model.invoice().documents()[file.index].update(response.document); model.invoice().documents()[file.index].update(response.document);
window.countUploadingDocuments--;
@if ($account->invoice_embed_documents) @if ($account->invoice_embed_documents)
refreshPDF(true); refreshPDF(true);
@endif @endif