cvs: pear /HTML_TreeMenu/docs example.php

From: Date: Sat, 30 Nov 2002 21:58:12 +0000
Subject: cvs: pear /HTML_TreeMenu/docs example.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-7700@lists.php.net to get a copy of this message
richard Sat Nov 30 16:58:12 2002 EDT Modified files: /pear/HTML_TreeMenu/docs example.php Log: Updated Index: pear/HTML_TreeMenu/docs/example.php diff -u pear/HTML_TreeMenu/docs/example.php:1.8 pear/HTML_TreeMenu/docs/example.php:1.9 --- pear/HTML_TreeMenu/docs/example.php:1.8 Sun Nov 10 13:16:19 2002 +++ pear/HTML_TreeMenu/docs/example.php Sat Nov 30 16:58:12 2002 @@ -33,15 +33,15 @@ // | Harald Radi <harald.radi@nme.at> | // +-----------------------------------------------------------------------+ // -// $Id: example.php,v 1.8 2002/11/10 18:16:19 richard Exp $ +// $Id: example.php,v 1.9 2002/11/30 21:58:12 richard Exp $ //require_once('HTML/TreeMenu.php'); require_once('../TreeMenu.php'); $icon = 'folder.gif'; - $menu = new HTML_TreeMenu(array('images' => '../images', 'defaultClass' => 'treeMenuDefault')); + $menu = new HTML_TreeMenu(); - $node1 = new HTML_TreeNode(array('text' => "First level", 'link' => "test.php", 'icon' => $icon)); + $node1 = new HTML_TreeNode(array('text' => "First level", 'link' => "test.php", 'icon' => $icon), array('onclick' => "alert('foo'); return false", 'onexpand' => "alert('Expanded')")); $foo = &$node1->addItem(new HTML_TreeNode(array('text' => "Second level", 'link' => "test.php", 'icon' => $icon))); $bar = &$foo->addItem(new HTML_TreeNode(array('text' => "Third level", 'link' => "test.php", 'icon' => $icon))); $blaat = &$bar->addItem(new HTML_TreeNode(array('text' => "Fourth level", 'link' => "test.php", 'icon' => $icon))); @@ -49,13 +49,13 @@ $node1->addItem(new HTML_TreeNode(array('text' => "Second level, item 2", 'link' => "test.php", 'icon' => $icon))); $node1->addItem(new HTML_TreeNode(array('text' => "Second level, item 3", 'link' => "test.php", 'icon' => $icon))); - + $menu->addItem($node1); $menu->addItem($node1); // Create the presentation class - $treeMenu = &new HTML_TreeMenu_DHTML($menu, array('isDynamic' => true)); - $listBox = &new HTML_TreeMenu_Listbox($menu); + $treeMenu = &new HTML_TreeMenu_DHTML($menu, array('images' => '../images', 'defaultClass' => 'treeMenuDefault')); + $listBox = &new HTML_TreeMenu_Listbox($menu, array('linkTarget' => '_self')); ?> <html> <head>

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