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::DHTMLTreeNav, |
21 |
|
|
// which displays a navigatable tree (expand, collapse) using JavaScript. |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
class SelectNav extends BaseWidget { |
25 |
|
|
|
26 |
|
|
var $pearbridge; |
27 |
|
|
var $menuobject; |
28 |
|
|
|
29 |
|
|
function SelectNav(&$payload) { |
30 |
|
|
|
31 |
|
|
$args[payload] = &$payload; |
32 |
|
|
$args[type] = 'Listbox'; |
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 |
|
|
?> |