14 |
* $Id$ |
* $Id$ |
15 |
* |
* |
16 |
* $Log$ |
* $Log$ |
17 |
|
* Revision 1.2 2004/07/07 02:38:45 joko |
18 |
|
* now independent of Data::Lift |
19 |
|
* |
20 |
* Revision 1.1 2003/06/06 04:18:03 joko |
* Revision 1.1 2003/06/06 04:18:03 joko |
21 |
* rearranged widgets |
* rearranged widgets |
22 |
* |
* |
37 |
* |
* |
38 |
*/ |
*/ |
39 |
|
|
40 |
|
require_once('HTML/TreeMenu.php'); |
41 |
|
|
42 |
/** |
/** |
43 |
* DHTMLTreeNav |
* DHTMLTreeNav |
44 |
* |
* |
47 |
* It inherits from phpHtmlLib's BaseWidget to be transparently spooled |
* It inherits from phpHtmlLib's BaseWidget to be transparently spooled |
48 |
* down when rendering (->render!). |
* down when rendering (->render!). |
49 |
* |
* |
50 |
* It uses phpHtmlLib::TreeNav::PearHtmlTreeMenuBridge to access |
* It uses some fine component libraries from PEAR to get things done. |
|
* some fine component libraries from PEAR to get things done. |
|
51 |
* |
* |
52 |
* Please also visit its sister class phpHtmlLib::TreeNav::SelectNav, |
* Please also visit its sister class phpHtmlLib::TreeNav::SelectNav, |
53 |
* which displays a nested tree flattened into a html-form "select" element. |
* which displays a nested tree flattened into a html-form "select" element. |
69 |
*/ |
*/ |
70 |
class DHTMLTreeNav extends BaseWidget { |
class DHTMLTreeNav extends BaseWidget { |
71 |
|
|
|
var $pearbridge; |
|
72 |
var $menuobject; |
var $menuobject; |
73 |
|
|
74 |
function DHTMLTreeNav(&$payload) { |
function DHTMLTreeNav(&$payload) { |
79 |
return; |
return; |
80 |
} |
} |
81 |
|
|
82 |
$args[payload] = &$payload; |
$params = array( |
83 |
$args[type] = 'DHTML'; |
type => 'kriesing', |
84 |
|
structure => $payload |
85 |
// NEW [2003-04-20]: use HTML_TreeMenu's builtin PEAR::Tree structure handler |
); |
86 |
$args[converter] = 'builtin.kriesing'; |
$treemenu = HTML_TreeMenu::createFromStructure($params); |
87 |
|
|
88 |
$this->pearbridge = new TreeNav_PearHtmlTreeMenuBridge(&$args); |
// menu style: nested tree, nodes rendered hierarchical |
89 |
$this->menuobject = $this->pearbridge->getMenuObject(); |
$this->menuobject = new HTML_TreeMenu_DHTML($treemenu, array('images' => 'img/widgets/tree', 'defaultClass' => 'treeMenuDefault')); |
90 |
|
|
91 |
// initialize output the phpHtmlLib way |
// initialize output the phpHtmlLib way |
92 |
$this->_init_output(); |
$this->_init_output(); |