' + $.$.htmlData(root.name) + '';
if (root.dirs) {
html += '
';
for (var i = 0; i < root.dirs.length; i++) {
cdir = root.dirs[i];
html += _.buildTree(cdir, path + "/");
}
html += '
';
}
html += '
';
return html;
};
_.expandDir = function(dir) {
var path = dir.data('path');
if (dir.children('.brace').hasClass('opened')) {
dir.parent().children('.folders').hide(500, function() {
if (path == _.dir.substr(0, path.length))
_.changeDir(dir);
});
dir.children('.brace').removeClass('opened').addClass('closed');
} else {
if (dir.parent().children('.folders').get(0)) {
dir.parent().children('.folders').show(500);
dir.children('.brace').removeClass('closed').addClass('opened');
} else if (!$('#loadingDirs').get(0)) {
dir.parent().append('