/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/widgets/DHTMLTreeNav.inc
ViewVC logotype

Annotation of /nfo/php/libs/com.newsblob.phphtmllib/widgets/DHTMLTreeNav.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu Feb 27 16:57:17 2003 UTC (21 years, 6 months ago) by joko
Branch: MAIN
+ initial commit, inherits from BaseWidget, uses pear-bridge

1 joko 1.1 <?php
2     /*
3     ## -------------------------------------------------------------------------
4     ## $Id: bstatus_left.php,v 1.1 2003/02/20 22:39:13 joko Exp $
5     ## -------------------------------------------------------------------------
6     ## $Log: bstatus_left.php,v $
7     ## -------------------------------------------------------------------------
8     */
9    
10    
11    
12     // This is a phpHtmlLib extension class implementing nested trees.
13    
14     // It inherits from phpHtmlLib's BaseWidget to be transparently spooled
15     // down when rendering (->render!).
16    
17     // It uses phpHtmlLib::TreeNav::PearHtmlTreeMenuBridge to access
18     // some fine component libraries from PEAR to get things done.
19    
20     // Please also visit its sister class phpHtmlLib::TreeNav::SelectNav,
21     // which displays a nested tree flattened into a html-form "select" element.
22    
23    
24     class DHTMLTreeNav extends BaseWidget {
25    
26     var $pearbridge;
27     var $menuobject;
28    
29     function DHTMLTreeNav(&$payload) {
30    
31     $args[payload] = &$payload;
32     $args[type] = 'DHTML';
33     $this->pearbridge = new TreeNav_PearHtmlTreeMenuBridge(&$args);
34     $this->menuobject = $this->pearbridge->getMenuObject();
35    
36     // initialize output the phpHtmlLib way
37     $this->_init_output();
38    
39     }
40    
41    
42     function _init_output() {
43    
44     /*
45     $this->add('
46     <style type="text/css">
47     body {
48     font-family: Georgia;
49     font-size: 11pt;
50     }
51    
52     .treeMenuDefault {
53     font-style: italic;
54     }
55    
56     .treeMenuBold {
57     font-style: italic;
58     font-weight: bold;
59     }
60     </style>
61     ');
62     */
63    
64     $this->add('
65     <script src="inc/js/TreeMenu.js" language="JavaScript" type="text/javascript"></script>
66    
67     <script language="JavaScript" type="text/javascript">
68     <!--
69     a = new Date();
70     a = a.getTime();
71     //-->
72     </script>
73     ');
74    
75     // V1:
76     /*
77     //$this->treeMenu->printMenu();
78     $this->add("treeMenu: ", html_br(), $this->treeMenu->toHTML(), html_br(), html_br());
79     //$this->listBox->printMenu();
80     $this->add("listBox: ", $this->listBox->toHTML());
81     */
82    
83     // V2:
84     $this->add($this->menuobject->toHTML());
85    
86    
87     $this->add('
88     <script language="JavaScript" type="text/javascript">
89     <!--
90     b = new Date();
91     b = b.getTime();
92    
93     document.write("Time to render tree: " + ((b - a) / 1000) + "s");
94     //-->
95     </script>
96     ');
97    
98     }
99    
100     /*
101     function render() {
102     $this->_init1();
103     $this->_init2();
104     }
105     */
106    
107     }
108    
109     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed