Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add folder icon for folders in navigator

  • Loading branch information...
commit 1dfdbf526809985b383dda941c6c14e8f1e7a734 1 parent de4f50f
Justin Cooper authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 editor/public/javascripts/occ_editor.js
View
9 editor/public/javascripts/occ_editor.js
@@ -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);
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.