From 655d29ceb9fb62a58d62e3cf2d6e164fa659f079 Mon Sep 17 00:00:00 2001 From: Florian Vessaz Date: Tue, 12 Apr 2016 18:34:09 +0200 Subject: [PATCH] Importer: Reload page after successful import --- importer/indico_importer/static/js/importer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/importer/indico_importer/static/js/importer.js b/importer/indico_importer/static/js/importer.js index bc4677b..4684552 100644 --- a/importer/indico_importer/static/js/importer.js +++ b/importer/indico_importer/static/js/importer.js @@ -586,9 +586,11 @@ var duration = parseInt(self.info.get('duration')); //If last contribution finishes before 24:00 if (time + duration * self.entries.getLength() <= 1440) { + var hasError = false; var killProgress = IndicoUI.Dialogs.Util.progress(); var errorCallback = function(error) { if (error) { + hasError = true; IndicoUtil.errorReport(error); } }; @@ -651,6 +653,9 @@ } self.close(); killProgress(); + if (!hasError) { + location.reload(); + } } else { new WarningPopup("Warning", "Some contributions will end after 24:00. Please modify start time and duration.").open();