Skip to content

Commit

Permalink
sort navtree, related silentHoo@493c73c
Browse files Browse the repository at this point in the history
  • Loading branch information
joni2back committed Jun 29, 2015
1 parent 1fc0d6f commit c92079c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions assets/js/filenavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@
}
parent.nodes.push({name: absName, nodes: []});
}

// sort nodes by name
parent.nodes = parent.nodes.sort(function(a, b) {
if (a.name < b.name) {
return -1;
} else if (a.name > b.name) {
return 1;
}
return 0;
});
};

!self.history.length && self.history.push({name: path, nodes: []});
Expand Down
Loading

0 comments on commit c92079c

Please sign in to comment.