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