Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.2

Bug #9750 Using "kriesing" tree type the "nodeOptions" paramether is not working.
Submitted: 2007-01-05 19:31 UTC
From: riku dot tuominen at benchmarking dot fi Assigned:
Status: Open Package: HTML_TreeMenu (version 1.2.0)
PHP Version: Irrelevant OS: XP
Roadmaps: (Not assigned)    
Subscription  


 [2007-01-05 19:31 UTC] riku dot tuominen at benchmarking dot fi (Riku Tuominen)
Description: ------------ TO FIX THE PROBLEM CHANGE ONE LINE OF CODE IN TreeMenu.php FILE. CHANGE line 168 $thisNode = &$curNode[$aNode['level']]->addItem( new HTML_TreeNode( $data , $events ) ); WITH $thisNode = &$curNode[$aNode['level']]->addItem( new HTML_TreeNode( array_merge($params['nodeOptions'], $data) , $events ) ); Test script: --------------- require_once 'Tree/Tree.php'; require_once 'Tree/Memory.php'; require_once 'HTML/TreeMenu.php'; $dbDsn = 'mysql://XXXX:XXXX@XXXX/testdB'; $options = array ('order' => 'name', 'table' => 'mytree'); $tree = Tree :: setup('Memory_DBnested', $dbDsn, $options); $tree->setup(); $nodeOptions = array( 'text' => '', 'link' => 'editCategory.php?id=', 'icon' => 'folder.gif', 'expandedIcon' => 'folder-expanded.gif', 'class' => '', 'expanded' => false, 'linkTarget' => '_self', 'isDynamic' => 'true', 'ensureVisible' => '', ); $options = array('structure' => $tree, 'type' => 'kriesing', 'nodeOptions' => $nodeOptions); $menu = &HTML_TreeMenu::createFromStructure($options); // Chose a generator. You can generate DHTML or a Listbox $treeMenu = &new HTML_TreeMenu_DHTML($menu, array('images' => 'images', 'defaultClass' => 'treeMenuDefault')); echo $treeMenu->toHTML(); Expected result: ---------------- The nodes should have a folder icon and node name be a link, but that is not hapenning. Non of "nodeOptions" setting is in effect. Actual result: -------------- The nodes should have a folder icon and node name be a link, but that is not hapenning. Non of "nodeOptions" setting is in effect.

Comments

 [2008-11-09 08:03 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2011-09-28 01:21 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!