this.hashChanged_, false, this);
this.clearError(false);
- /**
- * If this is the first load, we don't want to flash the error animating
- * out. This will be set to true in the list callback.
- * @type {bool}
- */
- this.initialized_ = false;
var version = goog.string.format('Armadillo %d.%d (%d)',
armadillo.Version.MAJOR, armadillo.Version.MINOR,
app.showError(data['message']);
return; // Error.
} else {
- app.clearError(app.initialized_);
+ app.clearError(true);
}
// Update the listing.
var fileObject = new armadillo.File(file, path);
goog.dom.appendChild(list, fileObject.draw());
});
-
- app.initialized_ = true;
}
this.sendRequest('list', {'path':path}, callback);
};
armadillo.App.prototype.clearError = function(animate) {
var elm = goog.dom.getElement('error');
var anim = new goog.fx.dom.FadeOutAndHide(elm, 500);
- if (animate)
- anim.play();
- else
+ if (!goog.dom.getTextContent(elm) || !animate) {
anim.hide();
+ return;
+ }
goog.events.listenOnce(anim, goog.fx.Animation.EventType.END, function() {
goog.dom.setTextContent(elm, '');
});
+ anim.play();
};
/**