Remove a few calls do document.createElement
authorRobert Sesek <rsesek@bluestatic.org>
Tue, 27 Dec 2011 00:19:48 +0000 (19:19 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Tue, 27 Dec 2011 00:19:48 +0000 (19:19 -0500)
web_frontend/file.js

index 7f81d1ff4f3ac6d0a3385706f42c95e1363a289c..e5344860396c02b07deb171ad81a321cceffbbfe 100644 (file)
@@ -112,17 +112,17 @@ armadillo.File.prototype.draw = function() {
   $(this.element_).empty();
 
   // Set the name of the entry.
-  this.title_ = document.createElement('div');
+  this.title_ = $.createDom('div');
   if (this.isDirectory()) {
-    this.link_ = $(document.createElement('a'));
+    this.link_ = $.createDom('a');
     this.link_.text(this.name_);
     this.link_.click(this.clickHandler_.bind(this));
-    $(this.title_).append(this.link_);
+    this.title_.append(this.link_);
   } else {
-    $(this.title_).text(this.name_);
+    this.title_.text(this.name_);
   }
   $(this.element_).append(this.title_);
-  $(this.title_).click(handler.bind(this));
+  this.title_.click(handler.bind(this));
 
   return this.element_;
 };