cvs: pear /HTML_TreeMenu TreeMenu.js TreeMenu.php /HTML_TreeMenu/docs example.php
| From: | Richard Heyes | Date: | Wed, 02 Mar 2005 02:16:51 +0000 |
| Subject: | cvs: pear /HTML_TreeMenu TreeMenu.js TreeMenu.php /HTML_TreeMenu/docs example.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-29980@lists.php.net to get a copy of this message | ||
richard Tue Mar 1 21:16:51 2005 EDT
Modified files:
/pear/HTML_TreeMenu TreeMenu.js TreeMenu.php
/pear/HTML_TreeMenu/docs example.php
Log:
Update copyright year
http://cvs.php.net/diff.php/pear/HTML_TreeMenu/TreeMenu.js?r1=1.19&r2=1.20&ty=u Index: pear/HTML_TreeMenu/TreeMenu.js diff -u pear/HTML_TreeMenu/TreeMenu.js:1.19 pear/HTML_TreeMenu/TreeMenu.js:1.20 --- pear/HTML_TreeMenu/TreeMenu.js:1.19 Tue Mar 1 20:09:51 2005 +++ pear/HTML_TreeMenu/TreeMenu.js Tue Mar 1 21:16:51 2005 @@ -1,5 +1,5 @@ // +-----------------------------------------------------------------------+ -// | Copyright (c) 2002-2003, Richard Heyes, Harald Radi | +// | Copyright (c) 2002-2005, Richard Heyes, Harald Radi | // | All rights reserved. | // | | // | Redistribution and use in source and binary forms, with or without | @@ -32,7 +32,7 @@ // | Harald Radi <harald.radi@nme.at> | // +-----------------------------------------------------------------------+ // -// $Id: TreeMenu.js,v 1.19 2005/03/02 01:09:51 richard Exp $ +// $Id: TreeMenu.js,v 1.20 2005/03/02 02:16:51 richard Exp $ /** * Function to create copies of objects which are http://cvs.php.net/diff.php/pear/HTML_TreeMenu/TreeMenu.php?r1=1.19&r2=1.20&ty=u Index: pear/HTML_TreeMenu/TreeMenu.php diff -u pear/HTML_TreeMenu/TreeMenu.php:1.19 pear/HTML_TreeMenu/TreeMenu.php:1.20 --- pear/HTML_TreeMenu/TreeMenu.php:1.19 Tue Mar 1 21:14:51 2005 +++ pear/HTML_TreeMenu/TreeMenu.php Tue Mar 1 21:16:51 2005 @@ -1,6 +1,6 @@ <?php // +-----------------------------------------------------------------------+ -// | Copyright (c) 2002-2003, Richard Heyes, Harald Radi | +// | Copyright (c) 2002-2005, Richard Heyes, Harald Radi | // | All rights reserved. | // | | // | Redistribution and use in source and binary forms, with or without | @@ -29,11 +29,11 @@ // | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | // | | // +-----------------------------------------------------------------------+ -// | Author: Richard Heyes <richard@phpguru.org> | +// | Author: Richard Heyes <http://www.phpguru.org/> | // | Harald Radi <harald.radi@nme.at> | // +-----------------------------------------------------------------------+ // -// $Id: TreeMenu.php,v 1.19 2005/03/02 02:14:51 richard Exp $ +// $Id: TreeMenu.php,v 1.20 2005/03/02 02:16:51 richard Exp $ /** * HTML_TreeMenu Class http://cvs.php.net/diff.php/pear/HTML_TreeMenu/docs/example.php?r1=1.13&r2=1.14&ty=u Index: pear/HTML_TreeMenu/docs/example.php diff -u pear/HTML_TreeMenu/docs/example.php:1.13 pear/HTML_TreeMenu/docs/example.php:1.14 --- pear/HTML_TreeMenu/docs/example.php:1.13 Sat Dec 20 08:33:10 2003 +++ pear/HTML_TreeMenu/docs/example.php Tue Mar 1 21:16:51 2005 @@ -1,6 +1,6 @@ <?php // +-----------------------------------------------------------------------+ -// | Copyright (c) 2002-2003, Richard Heyes, Harald Radi | +// | Copyright (c) 2002-2005, Richard Heyes, Harald Radi | // | All rights reserved. | // | | // | Redistribution and use in source and binary forms, with or without | @@ -29,74 +29,77 @@ // | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | // | | // +-----------------------------------------------------------------------+ -// | Author: Richard Heyes <richard@phpguru.org> | +// | Author: Richard Heyes <http://www.phpguru.org/> | // | Harald Radi <harald.radi@nme.at> | // +-----------------------------------------------------------------------+ // -// $Id: example.php,v 1.13 2003/12/20 13:33:10 richard Exp $ - - require_once('HTML/TreeMenu.php'); - //require_once('../TreeMenu.php'); - - $icon = 'folder.gif'; - $expandedIcon = 'folder-expanded.gif'; - - $menu = new HTML_TreeMenu(); - - $node1 = new HTML_TreeNode(array('text' => "First level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => true), array('onclick' => "alert('foo'); return false", 'onexpand' => "alert('Expanded')")); - $node1_1 = &$node1->addItem(new HTML_TreeNode(array('text' => "Second level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); - $node1_1_1 = &$node1_1->addItem(new HTML_TreeNode(array('text' => "Third level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); - $node1_1_1_1 = &$node1_1_1->addItem(new HTML_TreeNode(array('text' => "Fourth level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); - $node1_1_1_1->addItem(new HTML_TreeNode(array('text' => "Fifth level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'cssClass' => 'treeMenuBold'))); - - $node1->addItem(new HTML_TreeNode(array('text' => "Second level, item 2", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); - $node1->addItem(new HTML_TreeNode(array('text' => "Second level, item 3", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); - - $menu->addItem($node1); - $menu->addItem($node1); - - // Create the presentation class - $treeMenu = &new HTML_TreeMenu_DHTML($menu, array('images' => '../images', 'defaultClass' => 'treeMenuDefault')); - $listBox = &new HTML_TreeMenu_Listbox($menu, array('linkTarget' => '_self')); +// $Id: example.php,v 1.14 2005/03/02 02:16:51 richard Exp $ +//error_reporting(E_ALL | E_STRICT); + //require_once('HTML/TreeMenu.php'); + require_once('../TreeMenu.php'); + + $icon = 'folder.gif'; + $expandedIcon = 'folder-expanded.gif'; + + $menu = new HTML_TreeMenu(); + + $node1 = new HTML_TreeNode(array('text' => "First level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => true), array('onclick' => "alert('foo'); return false", 'onexpand' => "alert('Expanded')")); + $node1_1 = &$node1->addItem(new HTML_TreeNode(array('text' => "Second level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); + $node1_1_1 = &$node1_1->addItem(new HTML_TreeNode(array('text' => "Third level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); + $node1_1_1_1 = &$node1_1_1->addItem(new HTML_TreeNode(array('text' => "Fourth level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); + $node1_1_1_1->addItem(new HTML_TreeNode(array('text' => "Fifth level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'cssClass' => 'treeMenuBold'))); + + $node1->addItem(new HTML_TreeNode(array('text' => "Second level, item 2", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); + $node1->addItem(new HTML_TreeNode(array('text' => "Second level, item 3", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); + + $menu->addItem($node1); + $menu->addItem($node1); + + // Create the presentation class + $treeMenu = &new HTML_TreeMenu_DHTML($menu, array('images' => '../images', 'defaultClass' => 'treeMenuDefault')); + $listBox = &new HTML_TreeMenu_Listbox($menu, array('linkTarget' => '_self')); + //$treeMenuStatic = &new HTML_TreeMenu_staticHTML($menu, array('images' => '../images', 'defaultClass' => 'treeMenuDefault', 'noTopLevelImages' => true)); ?> <html> <head> - <style type="text/css"> - body { - font-family: Georgia; - font-size: 11pt; - } - - .treeMenuDefault { - font-style: italic; - } - - .treeMenuBold { - font-style: italic; - font-weight: bold; - } - </style> - <script src="TreeMenu.js" language="JavaScript" type="text/javascript"></script> + <style type="text/css"> + body { + font-family: Georgia; + font-size: 11pt; + } + + .treeMenuDefault { + font-style: italic; + } + + .treeMenuBold { + font-style: italic; + font-weight: bold; + } + </style> + <script src="../TreeMenu.js" language="JavaScript" type="text/javascript"></script> </head> <body> <script language="JavaScript" type="text/javascript"> <!-- - a = new Date(); - a = a.getTime(); + a = new Date(); + a = a.getTime(); //--> </script> -<?$treeMenu->printMenu()?> +<?$treeMenu->printMenu()?><br /><br /> <?$listBox->printMenu()?> <script language="JavaScript" type="text/javascript"> <!-- - b = new Date(); - b = b.getTime(); - - document.write("Time to render tree: " + ((b - a) / 1000) + "s"); + b = new Date(); + b = b.getTime(); + + document.write("Time to render tree: " + ((b - a) / 1000) + "s"); //--> </script> + + </body> </html>
http://cvs.php.net/diff.php/pear/HTML_TreeMenu/TreeMenu.js?r1=1.19&r2=1.20&ty=u Index: pear/HTML_TreeMenu/TreeMenu.js diff -u pear/HTML_TreeMenu/TreeMenu.js:1.19 pear/HTML_TreeMenu/TreeMenu.js:1.20 --- pear/HTML_TreeMenu/TreeMenu.js:1.19 Tue Mar 1 20:09:51 2005 +++ pear/HTML_TreeMenu/TreeMenu.js Tue Mar 1 21:16:51 2005 @@ -1,5 +1,5 @@ // +-----------------------------------------------------------------------+ -// | Copyright (c) 2002-2003, Richard Heyes, Harald Radi | +// | Copyright (c) 2002-2005, Richard Heyes, Harald Radi | // | All rights reserved. | // | | // | Redistribution and use in source and binary forms, with or without | @@ -32,7 +32,7 @@ // | Harald Radi <harald.radi@nme.at> | // +-----------------------------------------------------------------------+ // -// $Id: TreeMenu.js,v 1.19 2005/03/02 01:09:51 richard Exp $ +// $Id: TreeMenu.js,v 1.20 2005/03/02 02:16:51 richard Exp $ /** * Function to create copies of objects which are http://cvs.php.net/diff.php/pear/HTML_TreeMenu/TreeMenu.php?r1=1.19&r2=1.20&ty=u Index: pear/HTML_TreeMenu/TreeMenu.php diff -u pear/HTML_TreeMenu/TreeMenu.php:1.19 pear/HTML_TreeMenu/TreeMenu.php:1.20 --- pear/HTML_TreeMenu/TreeMenu.php:1.19 Tue Mar 1 21:14:51 2005 +++ pear/HTML_TreeMenu/TreeMenu.php Tue Mar 1 21:16:51 2005 @@ -1,6 +1,6 @@ <?php // +-----------------------------------------------------------------------+ -// | Copyright (c) 2002-2003, Richard Heyes, Harald Radi | +// | Copyright (c) 2002-2005, Richard Heyes, Harald Radi | // | All rights reserved. | // | | // | Redistribution and use in source and binary forms, with or without | @@ -29,11 +29,11 @@ // | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | // | | // +-----------------------------------------------------------------------+ -// | Author: Richard Heyes <richard@phpguru.org> | +// | Author: Richard Heyes <http://www.phpguru.org/> | // | Harald Radi <harald.radi@nme.at> | // +-----------------------------------------------------------------------+ // -// $Id: TreeMenu.php,v 1.19 2005/03/02 02:14:51 richard Exp $ +// $Id: TreeMenu.php,v 1.20 2005/03/02 02:16:51 richard Exp $ /** * HTML_TreeMenu Class http://cvs.php.net/diff.php/pear/HTML_TreeMenu/docs/example.php?r1=1.13&r2=1.14&ty=u Index: pear/HTML_TreeMenu/docs/example.php diff -u pear/HTML_TreeMenu/docs/example.php:1.13 pear/HTML_TreeMenu/docs/example.php:1.14 --- pear/HTML_TreeMenu/docs/example.php:1.13 Sat Dec 20 08:33:10 2003 +++ pear/HTML_TreeMenu/docs/example.php Tue Mar 1 21:16:51 2005 @@ -1,6 +1,6 @@ <?php // +-----------------------------------------------------------------------+ -// | Copyright (c) 2002-2003, Richard Heyes, Harald Radi | +// | Copyright (c) 2002-2005, Richard Heyes, Harald Radi | // | All rights reserved. | // | | // | Redistribution and use in source and binary forms, with or without | @@ -29,74 +29,77 @@ // | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | // | | // +-----------------------------------------------------------------------+ -// | Author: Richard Heyes <richard@phpguru.org> | +// | Author: Richard Heyes <http://www.phpguru.org/> | // | Harald Radi <harald.radi@nme.at> | // +-----------------------------------------------------------------------+ // -// $Id: example.php,v 1.13 2003/12/20 13:33:10 richard Exp $ - - require_once('HTML/TreeMenu.php'); - //require_once('../TreeMenu.php'); - - $icon = 'folder.gif'; - $expandedIcon = 'folder-expanded.gif'; - - $menu = new HTML_TreeMenu(); - - $node1 = new HTML_TreeNode(array('text' => "First level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => true), array('onclick' => "alert('foo'); return false", 'onexpand' => "alert('Expanded')")); - $node1_1 = &$node1->addItem(new HTML_TreeNode(array('text' => "Second level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); - $node1_1_1 = &$node1_1->addItem(new HTML_TreeNode(array('text' => "Third level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); - $node1_1_1_1 = &$node1_1_1->addItem(new HTML_TreeNode(array('text' => "Fourth level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); - $node1_1_1_1->addItem(new HTML_TreeNode(array('text' => "Fifth level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'cssClass' => 'treeMenuBold'))); - - $node1->addItem(new HTML_TreeNode(array('text' => "Second level, item 2", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); - $node1->addItem(new HTML_TreeNode(array('text' => "Second level, item 3", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); - - $menu->addItem($node1); - $menu->addItem($node1); - - // Create the presentation class - $treeMenu = &new HTML_TreeMenu_DHTML($menu, array('images' => '../images', 'defaultClass' => 'treeMenuDefault')); - $listBox = &new HTML_TreeMenu_Listbox($menu, array('linkTarget' => '_self')); +// $Id: example.php,v 1.14 2005/03/02 02:16:51 richard Exp $ +//error_reporting(E_ALL | E_STRICT); + //require_once('HTML/TreeMenu.php'); + require_once('../TreeMenu.php'); + + $icon = 'folder.gif'; + $expandedIcon = 'folder-expanded.gif'; + + $menu = new HTML_TreeMenu(); + + $node1 = new HTML_TreeNode(array('text' => "First level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => true), array('onclick' => "alert('foo'); return false", 'onexpand' => "alert('Expanded')")); + $node1_1 = &$node1->addItem(new HTML_TreeNode(array('text' => "Second level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); + $node1_1_1 = &$node1_1->addItem(new HTML_TreeNode(array('text' => "Third level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); + $node1_1_1_1 = &$node1_1_1->addItem(new HTML_TreeNode(array('text' => "Fourth level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); + $node1_1_1_1->addItem(new HTML_TreeNode(array('text' => "Fifth level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'cssClass' => 'treeMenuBold'))); + + $node1->addItem(new HTML_TreeNode(array('text' => "Second level, item 2", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); + $node1->addItem(new HTML_TreeNode(array('text' => "Second level, item 3", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); + + $menu->addItem($node1); + $menu->addItem($node1); + + // Create the presentation class + $treeMenu = &new HTML_TreeMenu_DHTML($menu, array('images' => '../images', 'defaultClass' => 'treeMenuDefault')); + $listBox = &new HTML_TreeMenu_Listbox($menu, array('linkTarget' => '_self')); + //$treeMenuStatic = &new HTML_TreeMenu_staticHTML($menu, array('images' => '../images', 'defaultClass' => 'treeMenuDefault', 'noTopLevelImages' => true)); ?> <html> <head> - <style type="text/css"> - body { - font-family: Georgia; - font-size: 11pt; - } - - .treeMenuDefault { - font-style: italic; - } - - .treeMenuBold { - font-style: italic; - font-weight: bold; - } - </style> - <script src="TreeMenu.js" language="JavaScript" type="text/javascript"></script> + <style type="text/css"> + body { + font-family: Georgia; + font-size: 11pt; + } + + .treeMenuDefault { + font-style: italic; + } + + .treeMenuBold { + font-style: italic; + font-weight: bold; + } + </style> + <script src="../TreeMenu.js" language="JavaScript" type="text/javascript"></script> </head> <body> <script language="JavaScript" type="text/javascript"> <!-- - a = new Date(); - a = a.getTime(); + a = new Date(); + a = a.getTime(); //--> </script> -<?$treeMenu->printMenu()?> +<?$treeMenu->printMenu()?><br /><br /> <?$listBox->printMenu()?> <script language="JavaScript" type="text/javascript"> <!-- - b = new Date(); - b = b.getTime(); - - document.write("Time to render tree: " + ((b - a) / 1000) + "s"); + b = new Date(); + b = b.getTime(); + + document.write("Time to render tree: " + ((b - a) / 1000) + "s"); //--> </script> + + </body> </html>