Commit 642bf0e6 by Julian Arni

Clear import status on retry

parent 1735a0f4
...@@ -179,6 +179,7 @@ $('#fileupload').fileupload({ ...@@ -179,6 +179,7 @@ $('#fileupload').fileupload({
autoUpload: false, autoUpload: false,
add: function(e, data) { add: function(e, data) {
clearImportDisplay();
submitBtn.unbind('click'); submitBtn.unbind('click');
file = data.files[0]; file = data.files[0];
if (file.name.match(/tar\.gz$/)) { if (file.name.match(/tar\.gz$/)) {
...@@ -198,10 +199,8 @@ $('#fileupload').fileupload({ ...@@ -198,10 +199,8 @@ $('#fileupload').fileupload({
else { else {
alert('${_("Your import has failed.")}\n\n' + errMsg); alert('${_("Your import has failed.")}\n\n' + errMsg);
} }
submitBtn.show();
bar.hide(); bar.hide();
chooseBtn.html('${_("Choose new file")}').show(); chooseBtn.html('${_("Choose new file")}').show();
bar.hide();
} }
}); });
}); });
...@@ -235,15 +234,14 @@ $('#fileupload').fileupload({ ...@@ -235,15 +234,14 @@ $('#fileupload').fileupload({
bar.hide(); bar.hide();
window.onbeforeunload = null; window.onbeforeunload = null;
displayFinishedImport(); displayFinishedImport();
alert('${_("Your import was successful.")}');
window.location = '${successful_import_redirect_url}';
}, },
start: function(e) { start: function(e) {
window.onbeforeunload = function() { window.onbeforeunload = function() {
return '${_("Your import is in progress; navigating away will abort it.")}'; return '${_("Your import is in progress; navigating away will abort it.")}';
} }
}, },
sequentialUploads: true sequentialUploads: true,
notifyOnError: false
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment