Merge pull request #855 from ultraklon/modification12

Provide a default record path for JSON & XML importers
This commit is contained in:
Tom Morris 2014-07-03 15:37:05 -04:00
commit 62fb9632f9
2 changed files with 8 additions and 0 deletions

View File

@ -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 = $('<div>').addClass('node').addClass('indented').appendTo(elmts.domContainer);
this._config.defaultRecordPath=[ANONYMOUS_NODE_NAME];
renderNode(this._config.dom, rootNode, [ANONYMOUS_NODE_NAME]);
};

View File

@ -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, []);
}
};