WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 BUG+FIX: method reload() in xloadtree2b.js, lucifer, June 21, 2005

Subject: BUG+FIX: method reload() in xloadtree2b.js From: lucifer Date: June 21, 2005
BUG+FIX [xloadtree.js]: Allow to reload tree and expand only if there are children under active node.

This is not offical bug+fix. You can see where I debug at '##DEBUG'. I guess this will help u. :)


//#########################################
WebFXLoadTree.prototype.reload =
WebFXLoadTreeItem.prototype.reload = function ()
{
// if loading do nothing
//##DEBUG - if (this.loaded)
if (this.loaded && this.hasChildren())
{
var t = this.getTree();
var expanded = this.getExpanded();
var sr = t.getSuspendRedraw();
t.setSuspendRedraw(true);

// remove
//##DEBUG - while (this.childNodes.length > 0)
while (this.hasChildren())
this.remove(this.childNodes[this.childNodes.length - 1]);

this.loaded = false;

this._loadingItem = WebFXLoadTree.createLoadingItem();
this.add(this._loadingItem);

//##DEBUG - if (expanded)
if (expanded && this.hasChildren())
this.setExpanded(true);

t.setSuspendRedraw(sr);
this.update();
}
else if (this.open && !this.loading)
WebFXLoadTree.loadXmlDocument(this);
};
//#########################################



Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX