close dialog after upload, fixes #2138

This commit is contained in:
j 2014-02-14 13:38:59 +00:00
parent 157c4f2755
commit 76b5c4dc3b

View file

@ -141,10 +141,11 @@ pandora.ui.uploadDocumentDialog = function(files, callback) {
done: function(data) { done: function(data) {
if (data.progress == 1) { if (data.progress == 1) {
part++; part++;
ids.push(data.response.id);
if (part == files.length) { if (part == files.length) {
$progress.options({progress: data.progress}); $progress.options({progress: data.progress});
$uploadDialog.options('buttons')[0].options({title: Ox._('Done')}); callback({ids: ids});
ids.push(data.id); $uploadDialog.close();
} else { } else {
uploadFile(part); uploadFile(part);
} }