2150 |
mathias |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
|
2 |
<html>
|
|
|
3 |
<head>
|
|
|
4 |
<title>Dojo DnD container test</title>
|
|
|
5 |
<style type="text/css">
|
|
|
6 |
@import "../../resources/dojo.css";
|
|
|
7 |
@import "dndDefault.css";
|
|
|
8 |
|
|
|
9 |
body {
|
|
|
10 |
padding: 20px;
|
|
|
11 |
}
|
|
|
12 |
|
|
|
13 |
</style>
|
|
|
14 |
<script type="text/javascript" src="../../dojo.js" djConfig="isDebug: true"></script>
|
|
|
15 |
<script type="text/javascript" src="../../dnd/Container.js"></script>
|
|
|
16 |
<script type="text/javascript">
|
|
|
17 |
// dojo.require("dojo.dnd.Container");
|
|
|
18 |
var c1, c2, c3, c4, c5;
|
|
|
19 |
var init = function(){
|
|
|
20 |
c1 = new dojo.dnd.Container(dojo.byId("container1"));
|
|
|
21 |
c2 = new dojo.dnd.Container(dojo.byId("container2"));
|
|
|
22 |
c3 = new dojo.dnd.Container(dojo.byId("container3"));
|
|
|
23 |
c4 = new dojo.dnd.Container(dojo.byId("container4"));
|
|
|
24 |
c5 = new dojo.dnd.Container(dojo.byId("container5"));
|
|
|
25 |
};
|
|
|
26 |
dojo.addOnLoad(init);
|
|
|
27 |
</script>
|
|
|
28 |
</head>
|
|
|
29 |
<body>
|
|
|
30 |
<h1>Dojo DnD container test</h1>
|
|
|
31 |
<p>Containers have a notion of a "current container", and one element can be "current".</p>
|
|
|
32 |
<p>see <a href="dndDefault.css">dndDefault.css</a> for example styling</p>
|
|
|
33 |
<h2>DIV container</h2>
|
|
|
34 |
<div id="container1" class="container">
|
|
|
35 |
<div class="dojoDndItem">Item 1</div>
|
|
|
36 |
<div class="dojoDndItem">Item 2</div>
|
|
|
37 |
<div class="dojoDndItem">Item 3</div>
|
|
|
38 |
</div>
|
|
|
39 |
<h2>UL container</h2>
|
|
|
40 |
<ul id="container2" class="container">
|
|
|
41 |
<li class="dojoDndItem">Item 1</li>
|
|
|
42 |
<li class="dojoDndItem">Item 2</li>
|
|
|
43 |
<li class="dojoDndItem">Item 3</li>
|
|
|
44 |
</ul>
|
|
|
45 |
<h2>OL container</h2>
|
|
|
46 |
<ol id="container3" class="container">
|
|
|
47 |
<li class="dojoDndItem">Item 1</li>
|
|
|
48 |
<li class="dojoDndItem">Item 2</li>
|
|
|
49 |
<li class="dojoDndItem">Item 3</li>
|
|
|
50 |
</ol>
|
|
|
51 |
<h2>TABLE container</h2>
|
|
|
52 |
<table id="container4" class="container" border="1px solid black">
|
|
|
53 |
<tr class="dojoDndItem">
|
|
|
54 |
<td>A</td>
|
|
|
55 |
<td>row 1</td>
|
|
|
56 |
</tr>
|
|
|
57 |
<tr class="dojoDndItem">
|
|
|
58 |
<td>B</td>
|
|
|
59 |
<td>row 2</td>
|
|
|
60 |
</tr>
|
|
|
61 |
<tr class="dojoDndItem">
|
|
|
62 |
<td>C</td>
|
|
|
63 |
<td>row 3</td>
|
|
|
64 |
</tr>
|
|
|
65 |
</table>
|
|
|
66 |
<h2>P container with SPAN elements</h2>
|
|
|
67 |
<p>Elements of this container are layed out horizontally.</p>
|
|
|
68 |
<p id="container5" class="container">
|
|
|
69 |
<span class="dojoDndItem"> Item 1 </span>
|
|
|
70 |
<span class="dojoDndItem"> Item 2 </span>
|
|
|
71 |
<span class="dojoDndItem"> Item 3 </span>
|
|
|
72 |
</p>
|
|
|
73 |
</body>
|
|
|
74 |
</html>
|