From d97e7eb44f921db7e4f03c6a094edf8f8bb990a6 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 28 Dec 2011 17:51:45 -0500 Subject: [PATCH] Replace the final document.createElement with $.createDom --- web_frontend/file.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web_frontend/file.js b/web_frontend/file.js index c6d431a..6c8422b 100644 --- a/web_frontend/file.js +++ b/web_frontend/file.js @@ -95,11 +95,10 @@ armadillo.File.prototype.setHighlight = function(h) { armadillo.File.prototype.createDom = function() { // Create the element if it does not exist. If it does, remove all children. if (!this.element_) { - this.element_ = document.createElement('li'); - this.element_.representedObject = this; + this.element_ = $.createDom('li'); var handler = (this.isSpecial_() ? this.clickHandler_ : this.actorHandler_); } - $(this.element_).empty(); + this.element_.empty(); // Set the name of the entry. this.title_ = $.createDom('div'); @@ -111,7 +110,7 @@ armadillo.File.prototype.createDom = function() { } else { this.title_.text(this.name_); } - $(this.element_).append(this.title_); + this.element_.append(this.title_); this.title_.click(handler.bind(this)); return this.element_; @@ -173,7 +172,7 @@ armadillo.File.prototype.actorHandler_ = function(e) { if (!this.actor_.getElement()) { var elm = this.actor_.createDom(); elm.hide(); - $(this.element_).append(elm); + this.element_.append(elm); } this.actor_.getElement().slideToggle('fast'); }; -- 2.22.5