From 76b5c4dc3b82b42787f6dccc9c0445bed24d7509 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 14 Feb 2014 13:38:59 +0000 Subject: [PATCH] close dialog after upload, fixes #2138 --- static/js/uploadDocumentDialog.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/uploadDocumentDialog.js b/static/js/uploadDocumentDialog.js index 8f7ef8b5..4c69c971 100644 --- a/static/js/uploadDocumentDialog.js +++ b/static/js/uploadDocumentDialog.js @@ -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); }