From b3ee9b00375255b3ccdfd2b9af36682d712065f6 Mon Sep 17 00:00:00 2001 From: Florian Vessaz Date: Fri, 20 May 2016 11:55:49 +0200 Subject: [PATCH] Refresh only when closing the importer dialog --- importer/indico_importer/static/js/importer.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/importer/indico_importer/static/js/importer.js b/importer/indico_importer/static/js/importer.js index eac8513..9b078fc 100644 --- a/importer/indico_importer/static/js/importer.js +++ b/importer/indico_importer/static/js/importer.js @@ -310,9 +310,8 @@ self.timetableList.clearSelection(); self.importerList.clearSelection(); self.emptySearchDiv.showAfterSearch(); - } else { - self.close(); } + self.reloadPage = true; }); }], [$t.gettext('Close'), function() { @@ -328,6 +327,14 @@ disabled: true }); return this.ExclusivePopupWithButtons.prototype.draw.call(this, this.drawContent()); + }, + + _onClose: function(evt) { + if (this.reloadPage) { + location.reload(); + IndicoUI.Dialogs.Util.progress(); + } + return self.ExclusivePopupWithButtons.prototype._onClose.call(this, evt); } }, @@ -672,9 +679,6 @@ } 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();