From aae3d5e88463202728e0c1c387d5840ce9d08db0 Mon Sep 17 00:00:00 2001 From: Pablo Moyano Date: Wed, 12 Feb 2014 01:00:17 -0800 Subject: [PATCH 1/2] proposed fix for #480 --- .../core/scripts/index/parser-interfaces/json-parser-ui.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/webapp/modules/core/scripts/index/parser-interfaces/json-parser-ui.js b/main/webapp/modules/core/scripts/index/parser-interfaces/json-parser-ui.js index ebc5a16f4..465ec147c 100644 --- a/main/webapp/modules/core/scripts/index/parser-interfaces/json-parser-ui.js +++ b/main/webapp/modules/core/scripts/index/parser-interfaces/json-parser-ui.js @@ -66,6 +66,9 @@ Refine.JsonParserUI.prototype.confirmReadyToCreateProject = function() { }; Refine.JsonParserUI.prototype.getOptions = function() { + if(!this._config.recordPath){ + this._setRecordPath(this._config.defaultRecordPath); + } var options = { recordPath: this._config.recordPath }; @@ -236,6 +239,7 @@ Refine.JsonParserUI.prototype._showPickRecordNodesUI = function() { } }; rootNode = $('
').addClass('node').addClass('indented').appendTo(elmts.domContainer); + this._config.defaultRecordPath=[ANONYMOUS_NODE_NAME]; renderNode(this._config.dom, rootNode, [ANONYMOUS_NODE_NAME]); }; From 0c475890ed641301ba066011fb2816dd4d33f6b6 Mon Sep 17 00:00:00 2001 From: Pablo Moyano Date: Wed, 12 Feb 2014 01:11:31 -0800 Subject: [PATCH 2/2] applying changes to xml parser too --- .../core/scripts/index/parser-interfaces/xml-parser-ui.js | 4 ++++ 1 file changed, 4 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 ebe6696fb..6fce35b24 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 @@ -66,6 +66,9 @@ Refine.XmlParserUI.prototype.confirmReadyToCreateProject = function() { }; Refine.XmlParserUI.prototype.getOptions = function() { + if(!this._config.recordPath){ + this._setRecordPath(this._config.defaultRecordPath); + } var options = { recordPath: this._config.recordPath }; @@ -229,6 +232,7 @@ Refine.XmlParserUI.prototype._showPickRecordElementsUI = function() { } }; if (this._config.dom) { + this._config.defaultRecordPath=[]; renderNode(this._config.dom, elmts.domContainer, []); } };