Skip to content
This repository
Browse code

add folder icon for folders in navigator

  • Loading branch information...
commit 1dfdbf526809985b383dda941c6c14e8f1e7a734 1 parent de4f50f
Justin Cooper authored

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. +7 2 editor/public/javascripts/occ_editor.js
9 editor/public/javascripts/occ_editor.js
@@ -407,13 +407,18 @@
407 407 }
408 408
409 409 function build_navigator_list(list) {
410   - var ul = $(".filesystem").html('');
  410 + var item_icon, ul = $(".filesystem").html('');
411 411 $.each(list, function(i, item) {
  412 + if (item.type === 'file') {
  413 + item_icon = "<i class='icon-chevron-right'></i>";
  414 + } else {
  415 + item_icon = "<i class='icon-folder-open'></i>";
  416 + }
412 417 if (i > 0) {
413 418 item.id = i + "-item";
414 419 $("<li id='" + i + "-item' class='navigator-item'></li>")
415 420 .data( "file", item )
416   - .append("<a href=''>" + item.name + "</a><i class='icon-chevron-right'></i>")
  421 + .append("<a href=''>" + item.name + item_icon)
417 422 .appendTo(ul);
418 423 }
419 424 });

0 comments on commit 1dfdbf5

Please sign in to comment.
Something went wrong with that request. Please try again.