Home » HTML » HTML_TreeMenu » Bug #9615
Bug with collapsed icon
Details
| Submitted | 2006-12-14 17:24 UTC |
|---|---|
| From | dantasv at 3il dot fr |
| Status | No Feedback |
| Package | HTML_TreeMenu |
| PHP Version | 5.0.2 |
| OS | Win2K |
| Roadmaps | (Not assigned) |
Comments
[2006-12-14 17:24 UTC] dantasv at 3il dot fr
Description:
------------
I find a bug while I was running HTML_TreeMenu on Firefox 2.0
When I collapse a child, the icon doesn't change to the collapsed icon, it's still the expanded icon.
To solve this problem I suggest to change the javascript function "TreeMenu.prototype.swapIcon" like this ( see below )
Test script:
---------------
TreeMenu.prototype.swapIcon = function (layerID)
{
if (document.images['icon_' + layerID]) {
var imgSrc = document.images['icon_' + layerID].src;
if (this.nodeRefs[layerID].icon && this.nodeRefs[layerID].expandedIcon) {
var newSrc = (imgSrc.indexOf('expanded') == -1 ? this.nodeRefs[layerID].expandedIcon : this.nodeRefs[layerID].icon);
document.images['icon_' + layerID].src = this.iconpath + '/' + newSrc;
}
}
}