Permalink
Browse files

More changing of names for clarity.

  • Loading branch information...
1 parent 6d5f1ee commit 91dc69bba8d6dce72f50a14a4bf581f91cc873ae @mcantelon committed Apr 10, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/backbone-file-editor.js
View
14 lib/backbone-file-editor.js
@@ -91,13 +91,13 @@ var DirectoryView = Backbone.View.extend({
this.entryTemplate = _.template(this.options.entryTemplate);
},
- appendChildElements: function(destEl, entry, level) {
+ renderDirectoryLevel: function(destEl, entry, level) {
var level = level || 1
- , container = $(this.levelTemplate());
+ , levelEl = $(this.levelTemplate());
- $(destEl).append(container);
+ $(destEl).append(levelEl);
- // if entry is a directory, render children to container
+ // if entry is a directory, render children to directory level
if (entry.children != undefined) {
for (var index in entry.children) {
var child = entry.children[index];
@@ -109,8 +109,8 @@ var DirectoryView = Backbone.View.extend({
if (child.children != undefined) {
$(entryEl).addClass('directory_open');
}
- $(container).append(entryEl);
- this.appendChildElements(container, child, level + 1);
+ $(levelEl).append(entryEl);
+ this.renderDirectoryLevel(levelEl, child, level + 1);
}
}
},
@@ -128,7 +128,7 @@ var DirectoryView = Backbone.View.extend({
.empty()
.append(entryEl);
- this.appendChildElements(this.el, this.model);
+ this.renderDirectoryLevel(this.el, this.model);
return this;
}

0 comments on commit 91dc69b

Please sign in to comment.