Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert "Fix #516 - format colour values and fix wrong test for comma"
This reverts commit f51e862.
  • Loading branch information
JohnSmith-LT committed May 28, 2016
1 parent f51e862 commit fd0398e
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions editor/js/toolbox.js
Expand Up @@ -1726,7 +1726,6 @@ var EDITOR = (function ($, parent) {
var tree = $.jstree.reference("#treeview");
var lo_node = tree.get_node("treeroot", false);
var pages=[];
//console.log(lo_node);
$.each(lo_node.children, function(i, key){
var name = getAttributeValue(lo_data[key]['attributes'], 'name', [], key);
var pageID = getAttributeValue(lo_data[key]['attributes'], 'pageID', [], key);
Expand All @@ -1736,25 +1735,17 @@ var EDITOR = (function ($, parent) {
var page = [];
// Also make sure we only take the text from the name, and not the full HTML
page.push(getTextFromHTML(name.value));
page.push(pageID.found ? pageID.value : linkID.value);
if (pageID.found)
{
page.push(pageID.value);
}
else
{
page.push(linkID.value);
}
pages.push(page);

// Now we do the children
var childNode = tree.get_node(key, false);
$.each(childNode.children, function(i, key){
var name = getAttributeValue(lo_data[key]['attributes'], 'name', [], key);
var pageID = getAttributeValue(lo_data[key]['attributes'], 'pageID', [], key);
var linkID = getAttributeValue(lo_data[key]['attributes'], 'linkID', [], key);
if ((pageID.found && pageID.value != "") || (linkID.found && linkID.value != ""))
{
var page = [];
// Also make sure we only take the text from the name, and not the full HTML
page.push(getTextFromHTML(" - "+name.value));
page.push(pageID.found ? pageID.value : linkID.value);
pages.push(page);
}
});
}

});
return pages;
},
Expand Down

0 comments on commit fd0398e

Please sign in to comment.