WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Collapse other folders, Isaias Barroso, July 4, 2005
     Re:Collapse other folders, Erik Arvidsson, July 16, 2005

Subject: Re:Collapse other folders From: Erik Arvidsson Date: July 16, 2005
This is not too hard to achieve. Override expand so that it goes over all the siblings and collapses them. Something like this:

var orgExpand = WebFXTreeItem.prototype.expand;
WebFXTreeItem.prototype.expand = function () {
var siblings = this.parentNode.childNodes;
for (var i = 0; i < siblings.length; i++) {
if (siblings[i] == this) {
orgExpand.call(this);
} else {
siblings[i].collapse();
}
}
};

erik



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