2150 |
mathias |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
|
2 |
"http://www.w3.org/TR/html4/strict.dtd">
|
|
|
3 |
<html>
|
|
|
4 |
<head>
|
|
|
5 |
<title>TitlePane Test</title>
|
|
|
6 |
|
|
|
7 |
<script type="text/javascript" src="../../dojo/dojo.js"
|
|
|
8 |
djConfig="parseOnLoad: true, isDebug: true"></script>
|
|
|
9 |
<script type="text/javascript" src="_testCommon.js"></script>
|
|
|
10 |
|
|
|
11 |
<script language="JavaScript" type="text/javascript">
|
|
|
12 |
dojo.require("dijit.TitlePane");
|
|
|
13 |
dojo.require("dojo.parser"); // scan page for widgets and instantiate them
|
|
|
14 |
|
|
|
15 |
// widgets used inside subpage loaded via href=
|
|
|
16 |
dojo.require("dijit.form.Button");
|
|
|
17 |
dojo.require("dijit.form.ComboBox");
|
|
|
18 |
|
|
|
19 |
function randomMessageId(){
|
|
|
20 |
return Math.floor(Math.random() * 3) + 3;
|
|
|
21 |
}
|
|
|
22 |
</script>
|
|
|
23 |
|
|
|
24 |
<style type="text/css">
|
|
|
25 |
@import "../../dojo/resources/dojo.css";
|
|
|
26 |
@import "css/dijitTests.css";
|
|
|
27 |
</style>
|
|
|
28 |
</head>
|
|
|
29 |
<body>
|
|
|
30 |
<h1 class="testTitle">Dijit TitlePane Test</h1>
|
|
|
31 |
|
|
|
32 |
<h1>Test #1: plain title pane, width=300px</h1>
|
|
|
33 |
<div dojoType="dijit.TitlePane" title="Title Pane #1" style="width: 300px;">
|
|
|
34 |
Lorem Ipsum Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque
|
|
|
35 |
iaculis, nulla id semper faucibus, pede tellus nonummy magna, vitae adipiscing
|
|
|
36 |
orci arcu ut augue. Nunc condimentum, magna a vestibulum convallis, libero purus
|
|
|
37 |
pulvinar orci, sed vestibulum urna sem ut pede. More Ipsum...
|
|
|
38 |
Sed sollicitudin suscipit risus. Nam ullamcorper. Sed nisl lectus, pellentesque
|
|
|
39 |
nec, malesuada eget, ornare a, libero. Lorem ipsum dolor sit amet,
|
|
|
40 |
consectetuer adipiscing elit.
|
|
|
41 |
</div>
|
|
|
42 |
|
|
|
43 |
<h1>Test #2: title pane with form, width=300px</h1>
|
|
|
44 |
|
|
|
45 |
<div dojoType="dijit.TitlePane" title="Title Pane #2" id="pane_2" style="width: 300px;">
|
|
|
46 |
<form>
|
|
|
47 |
Age: <input><br>
|
|
|
48 |
Discount card <input type=checkbox><br>
|
|
|
49 |
<button>Submit</button><br>
|
|
|
50 |
</form>
|
|
|
51 |
</div>
|
|
|
52 |
<br>
|
|
|
53 |
|
|
|
54 |
<h1>Test #3: initially closed pane</h1>
|
|
|
55 |
<div dojoType="dijit.TitlePane" title="Initially closed pane" open="false" width="200">
|
|
|
56 |
<form>
|
|
|
57 |
<title for="age">Age: </title><input id="age"><br>
|
|
|
58 |
<title for="discount">Discount card </title><input type=checkbox id="discount"><br>
|
|
|
59 |
<button>Submit</button><br>
|
|
|
60 |
</form>
|
|
|
61 |
</div>
|
|
|
62 |
|
|
|
63 |
<h1>Test #4: title pane with href (initially closed)</h1>
|
|
|
64 |
<p>The pane should open to "Loading..." message and then 2 seconds later it should slide open more to show loaded data.</p>
|
|
|
65 |
<div dojoType="dijit.TitlePane" duration=1000 title="Pane from href" href="layout/getResponse.php?delay=3000&messId=3" open="false">
|
|
|
66 |
Loading...
|
|
|
67 |
</div>
|
|
|
68 |
|
|
|
69 |
<h1>Test #5: title pane with href (initially closed)</h1>
|
|
|
70 |
<p>The pane should start to open to "Loading..." but halfway through href data will be loaded, and it should expand correctly.</p>
|
|
|
71 |
<div dojoType="dijit.TitlePane" duration=1000 title="Pane from href" href="layout/getResponse.php?delay=500&messId=3" open="false">
|
|
|
72 |
Loading...
|
|
|
73 |
</div>
|
|
|
74 |
|
|
|
75 |
<h1>Test #6: nested title pane</h1>
|
|
|
76 |
<div dojoType="dijit.TitlePane" title="Outer pane" width="300">
|
|
|
77 |
<p>This is a title pane, containing another title pane ...
|
|
|
78 |
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque iaculis, nulla id semper faucibus, pede tellus nonummy magna, vitae adipiscing orci arcu ut augue. Nunc condimentum, magna a vestibulum convallis, libero purus pulvinar orci, sed vestibulum urna sem ut pede.
|
|
|
79 |
More Ipsum...
|
|
|
80 |
|
|
|
81 |
<div dojoType="dijit.TitlePane" title="Inner pane" width="250">
|
|
|
82 |
<p>And this is the inner title pane...
|
|
|
83 |
<p>Sed sollicitudin suscipit risus. Nam ullamcorper. Sed nisl lectus, pellentesque nec, malesuada eget, ornare a, libero. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
|
|
84 |
</div>
|
|
|
85 |
|
|
|
86 |
<p>And this is the closing line for the outer title pane.
|
|
|
87 |
</div>
|
|
|
88 |
|
|
|
89 |
<table style="border: solid blue 2px; margin-top: 1em;">
|
|
|
90 |
<tr>
|
|
|
91 |
<td>
|
|
|
92 |
Here's some text below the title panes (to make sure that closing a title pane releases the space that the content was taking up)
|
|
|
93 |
</td>
|
|
|
94 |
</tr>
|
|
|
95 |
</table>
|
|
|
96 |
|
|
|
97 |
</body>
|
|
|
98 |
</html>
|