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 » XML » XML_XUL » Bug #6172

Tree rows need to be able to have attributes

Details

Request #6172Tree rows need to be able to have attributes
Submitted2005-12-06 18:30 UTC
Frommike at eire dot ca
Assignedamir
StatusBogus
PackageXML_XUL
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2005-12-06 18:30 UTC] mike at eire dot ca

Description:
------------
For a tree to be the slightest bit useful, each row needs to be able to have (at least) an ID assigned to it for retrieval by Javascript. I suggest the following change (in fake diff format) to XML_XUL_Element_Treeitem->addItem()

Test script:
---------------
if (!isset($this->childNodes[1])) {
$this->childNodes[1] = &$this->_doc->createElement('Treechildren');
$this->setAttribute( 'container', 'true' );
}
+ $atts = func_get_args();
+ array_shift($atts);
+ if (!isset($atts)) $atts=array();

+ $item = &$this->_doc->createElement('Treeitem',$atts[0]);
- $item = &$this->_doc->createElement('Treeitem');
$row = &$this->_doc->createElement('Treerow');

$item->appendChild($row);