Skip to content

Commit

Permalink
Formatting...
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSmith-LT committed May 11, 2014
1 parent 6a2999e commit d380de8
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions editor/js/functions.js
Expand Up @@ -60,25 +60,25 @@ function build_lo_data(xmlData, parent_id) {

// Build the JSON object for the treeview
// For version 3 jsTree
var this_json = {
id : key,
text : (xmlData[0].attributes['name'] ? xmlData[0].attributes['name'].value : xmlData[0].nodeName),
icon : 'editor/img/page_types/' + xmlData[0].nodeName + '.png'
}

// if we are at top level then make sure it's open and display node data
if (parent_id == null) {
this_json.state = { opened : true };
//showNodeData(key);
}

if (xmlData.children()[0]) {
this_json.children = [];

xmlData.children().each(function(i) {
this_json.children.push( build_lo_data($(this), key) );
});
}
var this_json = {
id : key,
text : (xmlData[0].attributes['name'] ? xmlData[0].attributes['name'].value : xmlData[0].nodeName),
icon : 'editor/img/page_types/' + xmlData[0].nodeName + '.png'
}

// if we are at top level then make sure it's open and display node data
if (parent_id == null) {
this_json.state = { opened : true };
//showNodeData(key);
}

if (xmlData.children()[0]) {
this_json.children = [];

xmlData.children().each(function(i) {
this_json.children.push( build_lo_data($(this), key) );
});
}

return this_json;
}
Expand Down

0 comments on commit d380de8

Please sign in to comment.