Skip to content

Commit

Permalink
add folder icon for folders in navigator
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Cooper authored and Justin Cooper committed Sep 21, 2012
1 parent de4f50f commit 1dfdbf5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions editor/public/javascripts/occ_editor.js
Expand Up @@ -407,13 +407,18 @@
}

function build_navigator_list(list) {
var ul = $(".filesystem").html('');
var item_icon, ul = $(".filesystem").html('');
$.each(list, function(i, item) {
if (item.type === 'file') {
item_icon = "<i class='icon-chevron-right'></i>";
} else {
item_icon = "<i class='icon-folder-open'></i>";
}
if (i > 0) {
item.id = i + "-item";
$("<li id='" + i + "-item' class='navigator-item'></li>")
.data( "file", item )
.append("<a href=''>" + item.name + "</a><i class='icon-chevron-right'></i>")
.append("<a href=''>" + item.name + item_icon)
.appendTo(ul);
}
});
Expand Down

0 comments on commit 1dfdbf5

Please sign in to comment.