From 95d0466521d687b3ab9ac78b07f64c0413962a49 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 13 Nov 2010 16:39:26 -0500 Subject: [PATCH] Start working with the zippy. It opens correctly, but it does not close correcly. --- web_frontend/actor.js | 3 --- web_frontend/file.js | 16 +++++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/web_frontend/actor.js b/web_frontend/actor.js index 23a5874..10ed34c 100644 --- a/web_frontend/actor.js +++ b/web_frontend/actor.js @@ -151,7 +151,6 @@ armadillo.Actor.prototype.tileClickHandler_ = function(e) { } else if (option == armadillo.Actor.options_.DELETE) { this.performDelete_(); } - this.hide(); }; /** @@ -170,7 +169,6 @@ armadillo.Actor.prototype.performMove_ = function() { var newPath = editor.getPath(); this.file_.move(newPath); } - this.dispose(); }; // Will be removed when the event source closes. this.eh_.listen(this.actionObject_, goog.ui.Dialog.SELECT_EVENT, @@ -200,7 +198,6 @@ armadillo.Actor.prototype.performDelete_ = function() { if (e.key != goog.ui.Dialog.DefaultButtonKeys.CANCEL) { this.file_.remove(); } - this.dispose(); }; // Will be removed when the event source closes. this.eh_.listen(this.actionObject_, goog.ui.Dialog.SELECT_EVENT, diff --git a/web_frontend/file.js b/web_frontend/file.js index 9f23ffc..8c0ee5c 100644 --- a/web_frontend/file.js +++ b/web_frontend/file.js @@ -107,20 +107,22 @@ armadillo.File.prototype.draw = function() { this.element_ = goog.dom.createElement('li'); this.element_.representedObject = this; var handler = (this.isSpecial_() ? this.clickHandler_ : this.actorHandler_); - this.actorListener_ = goog.events.listen(this.element_, - goog.events.EventType.CLICK, handler, false, this); } goog.dom.removeChildren(this.element_); // Set the name of the entry. + this.title_ = goog.dom.createDom('div', null); if (this.isDirectory()) { this.link_ = goog.dom.createDom('a', null, this.name_); this.linkListener_ = goog.events.listen(this.link_, goog.events.EventType.CLICK, this.clickHandler_, false, this); - goog.dom.appendChild(this.element_, this.link_); + goog.dom.appendChild(this.title_, this.link_); } else { - goog.dom.setTextContent(this.element_, this.name_); + goog.dom.setTextContent(this.title_, this.name_); } + goog.dom.appendChild(this.element_, this.title_); + this.actorListener_ = goog.events.listen(this.title_, + goog.events.EventType.CLICK, handler, false, this); return this.element_; }; @@ -180,10 +182,10 @@ armadillo.File.prototype.actorHandler_ = function(e) { e.stopPropagation(); if (!this.actor_.isInDocument()) this.actor_.render(this.element_); - if (false && !this.zippy_) - this.zippy_ = new goog.ui.AnimatedZippy(this.element_, + if (!this.zippy_) + this.zippy_ = new goog.ui.AnimatedZippy(this.title_, this.actor_.getElement(), false); - // this.zippy_.toggle(); + this.zippy_.toggle(); }; /** -- 2.43.5