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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations)
Sat Mar 1 04:54:14 2003 UTC (21 years, 6 months ago) by joko
Branch: MAIN
Changes since 1.2: +5 -8 lines
- purged old code

1 joko 1.1 <?php
2     /*
3     ## -------------------------------------------------------------------------
4 joko 1.3 ## $Id: SelectNav.inc,v 1.2 2003/02/28 04:24:17 joko Exp $
5 joko 1.1 ## -------------------------------------------------------------------------
6 joko 1.2 ## $Log: SelectNav.inc,v $
7 joko 1.3 ## Revision 1.2 2003/02/28 04:24:17 joko
8     ## disabled benchmarking
9     ## - purged old code
10     ##
11 joko 1.2 ## Revision 1.1 2003/02/27 16:57:36 joko
12     ## + initial commit, inherits from BaseWidget, uses pear-bridge
13     ##
14 joko 1.1 ## -------------------------------------------------------------------------
15     */
16    
17    
18    
19     // This is a phpHtmlLib extension class implementing nested trees.
20    
21     // It inherits from phpHtmlLib's BaseWidget to be transparently spooled
22     // down when rendering (->render!).
23    
24     // It uses phpHtmlLib::TreeNav::PearHtmlTreeMenuBridge to access
25     // some fine component libraries from PEAR to get things done.
26    
27     // Please also visit its sister class phpHtmlLib::TreeNav::DHTMLTreeNav,
28     // which displays a navigatable tree (expand, collapse) using JavaScript.
29    
30    
31     class SelectNav extends BaseWidget {
32    
33     var $pearbridge;
34     var $menuobject;
35    
36     function SelectNav(&$payload) {
37    
38     $args[payload] = &$payload;
39     $args[type] = 'Listbox';
40     $this->pearbridge = new TreeNav_PearHtmlTreeMenuBridge(&$args);
41     $this->menuobject = $this->pearbridge->getMenuObject();
42    
43     // initialize output the phpHtmlLib way
44     $this->_init_output();
45    
46     }
47    
48    
49     function _init_output() {
50    
51 joko 1.2 $this->add('<script src="inc/js/TreeMenu.js" language="JavaScript" type="text/javascript"></script>');
52 joko 1.1
53 joko 1.2 /*
54     // benchmarking - before
55 joko 1.1 $this->add('
56     <script language="JavaScript" type="text/javascript">
57     <!--
58     a = new Date();
59     a = a.getTime();
60     //-->
61     </script>
62     ');
63 joko 1.2 */
64 joko 1.1
65 joko 1.2 $this->add($this->menuobject->toHTML());
66 joko 1.1
67 joko 1.2 /*
68     // benchmarking - afterwards
69 joko 1.1 $this->add('
70     <script language="JavaScript" type="text/javascript">
71     <!--
72     b = new Date();
73     b = b.getTime();
74    
75     document.write("Time to render tree: " + ((b - a) / 1000) + "s");
76     //-->
77     </script>
78     ');
79 joko 1.2 */
80 joko 1.1
81     }
82    
83     }
84    
85     ?>

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