From fd2460914c0ea5aae6cd79bb27257e364d8d7e06 Mon Sep 17 00:00:00 2001 From: Lisa Chandra <52909743+lisa761@users.noreply.github.com> Date: Sat, 14 Mar 2020 20:06:54 +0530 Subject: [PATCH] Fixes no selected record element error (#2407) * fixes no record element error * made relevant changes * alert message from i18n instead * removed the boolean variable --- .../core/scripts/index/parser-interfaces/xml-parser-ui.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/webapp/modules/core/scripts/index/parser-interfaces/xml-parser-ui.js b/main/webapp/modules/core/scripts/index/parser-interfaces/xml-parser-ui.js index 2b599a55c..a59f0f9be 100644 --- a/main/webapp/modules/core/scripts/index/parser-interfaces/xml-parser-ui.js +++ b/main/webapp/modules/core/scripts/index/parser-interfaces/xml-parser-ui.js @@ -131,6 +131,7 @@ Refine.XmlParserUI.prototype._initialize = function() { this._optionContainerElmts.includeFileSourcesCheckbox.prop("checked", true); } this._optionContainerElmts.pickRecordElementsButton.click(function() { + self._config.recordPath = undefined; self._showPickRecordElementsUI(); }); @@ -257,6 +258,11 @@ Refine.XmlParserUI.prototype._setRecordPath = function(path) { Refine.XmlParserUI.prototype._updatePreview = function() { var self = this; + + if(!this._config.recordPath){ + window.alert($.i18n('core-index-import/warning-record-path')); + return; + } this._progressContainer.show();