cvs: pear /HTML_TreeMenu TreeMenu.php

From: Date: Wed, 02 Mar 2005 02:14:52 +0000
Subject: cvs: pear /HTML_TreeMenu TreeMenu.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-29979@lists.php.net to get a copy of this message
richard Tue Mar 1 21:14:52 2005 EDT Modified files: /pear/HTML_TreeMenu TreeMenu.php Log: Fix bug 2392 http://cvs.php.net/diff.php/pear/HTML_TreeMenu/TreeMenu.php?r1=1.18&r2=1.19&ty=u Index: pear/HTML_TreeMenu/TreeMenu.php diff -u pear/HTML_TreeMenu/TreeMenu.php:1.18 pear/HTML_TreeMenu/TreeMenu.php:1.19 --- pear/HTML_TreeMenu/TreeMenu.php:1.18 Sat Dec 20 08:10:59 2003 +++ pear/HTML_TreeMenu/TreeMenu.php Tue Mar 1 21:14:51 2005 @@ -33,7 +33,7 @@ // | Harald Radi <harald.radi@nme.at> | // +-----------------------------------------------------------------------+ // -// $Id: TreeMenu.php,v 1.18 2003/12/20 13:10:59 richard Exp $ +// $Id: TreeMenu.php,v 1.19 2005/03/02 02:14:51 richard Exp $ /** * HTML_TreeMenu Class @@ -552,7 +552,7 @@ * Whether to use clientside persistence or not * @var bool */ - var $userPersistence; + var $usePersistence; /** * The default CSS class for the nodes @@ -564,6 +564,12 @@ * @var bool */ var $noTopLevelImages; + + /** + * Name of Jabbascript object to use + * @var string + */ + var $jsObjectName; /** * Constructor, takes the tree structure as @@ -579,6 +585,9 @@ * o maxDepth - The maximum depth of indentation. Useful for ensuring * deeply nested trees don't go way off to the right of your * page etc. Defaults to no limit. + * o jsObjectName - Name to use for jabbascript object. Set this if you have + * different menus that should maintain their persistence + * information separately. * * And also a boolean for whether the entire tree is dynamic or not. * This overrides any perNode dynamic settings. @@ -596,6 +605,7 @@ $this->images = 'images'; $this->maxDepth = 0; // No limit $this->linkTarget = '_self'; + $this->jsObjectName = 'objTreeMenu'; $this->defaultClass = ''; $this->usePersistence = true; $this->noTopLevelImages = false; @@ -616,7 +626,7 @@ function toHTML() { static $count = 0; - $menuObj = 'objTreeMenu_' . ++$count; + $menuObj = $this->jsObjectName . '_' . ++$count; $html = "\n"; $html .= '<script language="javascript" type="text/javascript">' . "\n\t";

« previous php.pear.cvs (#29979) next »