Animal
10-24-2006, 03:10 AM
Right now, the Element's UpdateManager writes content into the Element being updated which is then wiped when the content comes through.
Can we have a pluggable way to put our own indicators in?
I know we can override YAHOO.ext.UpdateManager.prototype.showLoading
But the clearing of the indicator is left to the update() function dumping the new content in.
What I'd like is my own global indicator. I could have an animation in a tab somewhere else on the page (The MenuBar say), and I'd need a hook into the update comipletion to stop the animation, or clear the indicator.
Perhaps update should look like this:
YAHOO.ext.Element.prototype.update = function(html, loadScripts)
{
this.dom.innerHTML = html +
"<script type='text/javascript'>YAHOO.ext.UpdateManager.prototype.clearLoading.call(new YAHOO.ext.UpdateManager(" + this.dom.id + "));</script>";
Can we have a pluggable way to put our own indicators in?
I know we can override YAHOO.ext.UpdateManager.prototype.showLoading
But the clearing of the indicator is left to the update() function dumping the new content in.
What I'd like is my own global indicator. I could have an animation in a tab somewhere else on the page (The MenuBar say), and I'd need a hook into the update comipletion to stop the animation, or clear the indicator.
Perhaps update should look like this:
YAHOO.ext.Element.prototype.update = function(html, loadScripts)
{
this.dom.innerHTML = html +
"<script type='text/javascript'>YAHOO.ext.UpdateManager.prototype.clearLoading.call(new YAHOO.ext.UpdateManager(" + this.dom.id + "));</script>";