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" data-dojo-config="isDebug: true"></script>
|
15 |
|
16 | <script type="text/javascript">
|
17 | require(["dojo/dnd/Container", "dojo/dom", "dojo/domReady!"], function(Container, dom){
|
18 | var c1, c2, c3, c4, c5;
|
19 | c1 = new Container(dom.byId("container1"));
|
20 | c2 = new Container(dom.byId("container2"));
|
21 | c3 = new Container(dom.byId("container3"));
|
22 | c4 = new Container(dom.byId("container4"));
|
23 | c5 = new Container(dom.byId("container5"));
|
24 | });
|
25 | </script>
|
26 | </head>
|
27 | <body>
|
28 | <h1>Dojo DnD container test</h1>
|
29 | <p>Containers have a notion of a "current container", and one element can be "current".</p>
|
30 | <p>see <a href="dndDefault.css">dndDefault.css</a> for example styling</p>
|
31 | <h2>DIV container</h2>
|
32 | <div id="container1" class="container">
|
33 | <div class="dojoDndItem">Item 1</div>
|
34 | <div class="dojoDndItem">Item 2</div>
|
35 | <div class="dojoDndItem">Item 3</div>
|
36 | </div>
|
37 | <h2>UL container</h2>
|
38 | <ul id="container2" class="container">
|
39 | <li class="dojoDndItem">Item 1</li>
|
40 | <li class="dojoDndItem">Item 2</li>
|
41 | <li class="dojoDndItem">Item 3</li>
|
42 | </ul>
|
43 | <h2>OL container</h2>
|
44 | <ol id="container3" class="container">
|
45 | <li class="dojoDndItem">Item 1</li>
|
46 | <li class="dojoDndItem">Item 2</li>
|
47 | <li class="dojoDndItem">Item 3</li>
|
48 | </ol>
|
49 | <h2>TABLE container</h2>
|
50 | <table id="container4" class="container" border="1px solid black">
|
51 | <tr class="dojoDndItem">
|
52 | <td>A</td>
|
53 | <td>row 1</td>
|
54 | </tr>
|
55 | <tr class="dojoDndItem">
|
56 | <td>B</td>
|
57 | <td>row 2</td>
|
58 | </tr>
|
59 | <tr class="dojoDndItem">
|
60 | <td>C</td>
|
61 | <td>row 3</td>
|
62 | </tr>
|
63 | </table>
|
64 | <h2>P container with SPAN elements</h2>
|
65 | <p>Elements of this container are layed out horizontally.</p>
|
66 | <p id="container5" class="container">
|
67 | <span class="dojoDndItem"> Item 1 </span>
|
68 | <span class="dojoDndItem"> Item 2 </span>
|
69 | <span class="dojoDndItem"> Item 3 </span>
|
70 | </p>
|
71 | </body>
|
72 | </html>
|