|
|
@@ -194,15 +194,17 @@ frappe.upload = { |
|
|
|
$(document).on('upload_complete', on_upload); |
|
|
|
|
|
|
|
function upload_next() { |
|
|
|
i += 1; |
|
|
|
var file = files[i]; |
|
|
|
args.is_private = file.is_private; |
|
|
|
if(files) { |
|
|
|
i += 1; |
|
|
|
var file = files[i]; |
|
|
|
args.is_private = file.is_private; |
|
|
|
frappe.show_progress(__('Uploading'), i+1, files.length); |
|
|
|
} |
|
|
|
frappe.upload.upload_file(file, args, opts); |
|
|
|
frappe.show_progress(__('Uploading'), i+1, files.length); |
|
|
|
} |
|
|
|
|
|
|
|
function on_upload(e, attachment) { |
|
|
|
if (i === files.length - 1) { |
|
|
|
if (!files || i === files.length - 1) { |
|
|
|
$(document).off('upload_complete', on_upload); |
|
|
|
frappe.hide_progress(); |
|
|
|
return; |
|
|
|