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) {
if (data.progress == 1) {
part++;
ids.push(data.response.id);
if (part == files.length) {
$progress.options({progress: data.progress});
$uploadDialog.options('buttons')[0].options({title: Ox._('Done')});
ids.push(data.id);
callback({ids: ids});
$uploadDialog.close();
} else {
uploadFile(part);
}