From 642bf0e6e6e9a49c4099200e2af5aafc047bcdba Mon Sep 17 00:00:00 2001 From: Julian Arni Date: Mon, 30 Sep 2013 17:52:34 -0400 Subject: [PATCH] Clear import status on retry --- cms/templates/import.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cms/templates/import.html b/cms/templates/import.html index 68e3ba1189..3714dbc2bd 100644 --- a/cms/templates/import.html +++ b/cms/templates/import.html @@ -179,6 +179,7 @@ $('#fileupload').fileupload({ autoUpload: false, add: function(e, data) { + clearImportDisplay(); submitBtn.unbind('click'); file = data.files[0]; if (file.name.match(/tar\.gz$/)) { @@ -198,10 +199,8 @@ $('#fileupload').fileupload({ else { alert('${_("Your import has failed.")}\n\n' + errMsg); } - submitBtn.show(); bar.hide(); chooseBtn.html('${_("Choose new file")}').show(); - bar.hide(); } }); }); @@ -235,15 +234,14 @@ $('#fileupload').fileupload({ bar.hide(); window.onbeforeunload = null; displayFinishedImport(); - alert('${_("Your import was successful.")}'); - window.location = '${successful_import_redirect_url}'; }, start: function(e) { window.onbeforeunload = function() { return '${_("Your import is in progress; navigating away will abort it.")}'; } }, - sequentialUploads: true + sequentialUploads: true, + notifyOnError: false });