PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_TreeMenu » Bug #9615

Bug with collapsed icon

Details

Submitted2006-12-14 17:24 UTC
Fromdantasv at 3il dot fr
StatusNo Feedback
PackageHTML_TreeMenu
PHP Version5.0.2
OSWin2K
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;
}
}
}