1 | <?php // IF you don't have PHP5 installed, you can't use this index! ?> |
---|
2 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
---|
3 | "http://www.w3.org/TR/html4/strict.dtd"> |
---|
4 | <html> |
---|
5 | <head> |
---|
6 | |
---|
7 | <link rel="stylesheet" href="../../dijit/tests/css/dijitTests.css"> |
---|
8 | <link rel="stylesheet" href="../../dijit/themes/tundra/tundra.css"> |
---|
9 | <link rel="stylesheet" href="../../dojox/widget/Dialog/Dialog.css"> |
---|
10 | <style type="text/css"> |
---|
11 | .innard { |
---|
12 | padding:12px; |
---|
13 | margin-top:0; |
---|
14 | } |
---|
15 | </style> |
---|
16 | <title>Dojo Toolkit - DojoX Demos and Tests by Project</title> |
---|
17 | |
---|
18 | <script src="../../dojo/dojo.js"></script> |
---|
19 | <script type="text/javascript"> |
---|
20 | dojo.require('dojox.widget.Dialog'); |
---|
21 | dojo.require("dojo.fx.easing"); |
---|
22 | dojo.addOnLoad(function(){ |
---|
23 | var dialog = new dojox.widget.Dialog({ title: "About", viewportPadding:100, fixedSize:true }); |
---|
24 | dialog.startup(); |
---|
25 | dojo.query("span.projectname + a") |
---|
26 | .connect("onclick",function(e){ |
---|
27 | e.preventDefault(); |
---|
28 | dojo.xhrGet({ |
---|
29 | url: e.target.href, |
---|
30 | load: function(data){ |
---|
31 | var content = data.replace(/\</g,"<"); |
---|
32 | dialog.show(); |
---|
33 | dialog.setContent("<pre class='innard'>" + content + "</pre>"); |
---|
34 | } |
---|
35 | }) |
---|
36 | }) |
---|
37 | ; |
---|
38 | }); |
---|
39 | </script> |
---|
40 | |
---|
41 | </head> |
---|
42 | <body> |
---|
43 | |
---|
44 | <h1 class="testTitle">DojoX test files overview</h1> |
---|
45 | |
---|
46 | <table id="testMatrix"> |
---|
47 | <thead> |
---|
48 | <tr class="top"><th rowspan="2">Test</th><th colspan="4">Tundra</th><th colspan="4">Nihilo</th><th colspan="4">Soria</th></tr> |
---|
49 | <tr class="tests"><th>Normal</th><th>a11y</th><th>rtl</th><th>a11y + rtl<th>Normal</th><th>a11y</th><th>rtl</th><th>a11y + rtl<th>Normal</th><th>a11y</th><th>rtl</th><th>a11y + rtl</tr> |
---|
50 | </thead> |
---|
51 | <tbody><?php |
---|
52 | |
---|
53 | foreach(getprojects() as $project){ |
---|
54 | $note = ""; |
---|
55 | if($project['readme']){ |
---|
56 | $note = "<a class='readmeLink' href='".$project['readme']."'>about</a>"; |
---|
57 | } |
---|
58 | if($project['tests'] || $project['demos']){ |
---|
59 | print "<tr class='spacer'><td colspan='13'><span class='projectname'>dojox.". $project['name'] . "</span> ".$note."</td></tr>"; |
---|
60 | |
---|
61 | if($project['tests']){ |
---|
62 | printLinks($project['tests']); |
---|
63 | } |
---|
64 | if($project['demos']){ |
---|
65 | printLinks($project['demos']); |
---|
66 | } |
---|
67 | |
---|
68 | } |
---|
69 | |
---|
70 | } |
---|
71 | // printLinks("./tree","Dijit Tree Tests"); |
---|
72 | |
---|
73 | ?> |
---|
74 | </tbody> |
---|
75 | </table> |
---|
76 | |
---|
77 | <p>* note: All themes and modes included for completeness. Some projects don't even use themes. The "basic" link |
---|
78 | is the direct link to the file with no enhancements. The test file must include _testCommon from dijit to |
---|
79 | include theme / rtl / a11y testing capabilities.</p> |
---|
80 | </body> |
---|
81 | </html> |
---|
82 | <?php |
---|
83 | |
---|
84 | function getprojects(){ |
---|
85 | $projects = array(); |
---|
86 | $path = "../../dojox"; |
---|
87 | $handle = opendir($path); |
---|
88 | while(false !== ($file = readdir($handle))){ |
---|
89 | $README = ""; |
---|
90 | $full = $path."/".$file; |
---|
91 | if(is_dir($full)){ |
---|
92 | if(file_exists($full."/README")){ |
---|
93 | $README = $full."/README"; |
---|
94 | } |
---|
95 | $tests = false; $demos = false; |
---|
96 | if(is_dir($full."/tests")){ |
---|
97 | $tests = $full."/tests"; |
---|
98 | } |
---|
99 | if(is_dir($full."/demos")){ |
---|
100 | $demos = $full."/demos"; |
---|
101 | } |
---|
102 | $projects[] = array( |
---|
103 | "name" => $file, |
---|
104 | "tests" => $tests, |
---|
105 | "demos" => $demos, |
---|
106 | "readme" => $README |
---|
107 | ); |
---|
108 | } |
---|
109 | } |
---|
110 | return $projects; |
---|
111 | } |
---|
112 | |
---|
113 | function printLinks($path){ |
---|
114 | $handle = opendir($path); |
---|
115 | $i = 0; |
---|
116 | |
---|
117 | while(false !== ($file = readdir($handle))){ |
---|
118 | if(preg_match("/([a-zA-Z])(.*)\.html/", $file, $matches)){ |
---|
119 | $base = $matches[0]; |
---|
120 | $link = $path."/".$matches[0]; |
---|
121 | print |
---|
122 | "<tr class='testRow ". (++$i % 2 ==0 ? "alt" : "") ."'>" . |
---|
123 | |
---|
124 | "<td class='label'>" . $base . "</td>" . |
---|
125 | |
---|
126 | // standard / tundra: |
---|
127 | "<td><a href='".$link."'>basic</a></td>" . |
---|
128 | "<td><a href='".$link."?a11y=true'>a11y</a></td>" . |
---|
129 | "<td><a href='".$link."?dir=rtl'>rtl</a></td>" . |
---|
130 | "<td><a href='".$link."?dir=rtl&a11y=true'>both</a></td>" . |
---|
131 | |
---|
132 | // nihilo |
---|
133 | "<td><a href='".$link."?theme=nihilo'>nihilo</a></td>" . |
---|
134 | "<td><a href='".$link."?theme=nihilo&a11y=true'>a11y</a></td>" . |
---|
135 | "<td><a href='".$link."?theme=nihilo&dir=rtl'>rtl</a></td>" . |
---|
136 | "<td><a href='".$link."?theme=nihilo&dir=rtl&a11y=true'>combo</a></td>" . |
---|
137 | |
---|
138 | // soria |
---|
139 | "<td><a href='".$link."?theme=soria'>soria</a></td>" . |
---|
140 | "<td><a href='".$link."?theme=soria&a11y=true'>a11y</a></td>" . |
---|
141 | "<td><a href='".$link."?theme=soria&dir=rtl'>rtl</a></td>" . |
---|
142 | "<td><a href='".$link."?theme=soria&dir=rtl&a11y=true'>combo</a></td>" . |
---|
143 | |
---|
144 | "</tr>"; |
---|
145 | } |
---|
146 | } |
---|
147 | } |
---|
148 | |
---|
149 | ?> |
---|