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 markup selector test</title>
|
|
|
5 |
<style type="text/css">
|
|
|
6 |
@import "../../resources/dojo.css";
|
|
|
7 |
@import "dndDefault.css";
|
|
|
8 |
|
|
|
9 |
body { padding: 20px; }
|
|
|
10 |
</style>
|
|
|
11 |
<script type="text/javascript" src="../../dojo.js" djConfig="isDebug: true, parseOnLoad: true"></script>
|
|
|
12 |
<script type="text/javascript" src="../../dnd/Selector.js"></script>
|
|
|
13 |
<script type="text/javascript">
|
|
|
14 |
dojo.require("dojo.parser");
|
|
|
15 |
dojo.require("dojo.dnd.Selector");
|
|
|
16 |
</script>
|
|
|
17 |
</head>
|
|
|
18 |
<body>
|
|
|
19 |
<h1>Dojo DnD markup selector test</h1>
|
|
|
20 |
<p>This example is functionally equivalent to <a href="test_selector.html">test_selector.html</a> example but is done using the Dojo markup.</p>
|
|
|
21 |
<p>Containers have a notion of a "current container", and one element can be "current". All containers on this page are selectors that allow to select elements.</p>
|
|
|
22 |
<p>Following selection modes are supported by default:</p>
|
|
|
23 |
<ul>
|
|
|
24 |
<li>Simple click — selects a single element, all other elements will be unselected.</li>
|
|
|
25 |
<li>Ctrl+click — toggles a selection state of an element (use Meta key on Mac).</li>
|
|
|
26 |
<li>Shift+click — selects a range of elements from the previous anchor to the current element.</li>
|
|
|
27 |
<li>Ctrl+Shift+click — adds a range of elements from the previous anchor to the current element (use Meta key on Mac).</li>
|
|
|
28 |
</ul>
|
|
|
29 |
<h2>DIV selector</h2>
|
|
|
30 |
<p>This selector can select just one element a time. It was specified during the creation time.</p>
|
|
|
31 |
<div dojoType="dojo.dnd.Selector" jsId="c1" singular="true" class="container">
|
|
|
32 |
<div class="dojoDndItem">Item 1</div>
|
|
|
33 |
<div class="dojoDndItem">Item 2</div>
|
|
|
34 |
<div class="dojoDndItem">Item 3</div>
|
|
|
35 |
</div>
|
|
|
36 |
<h2>UL selector</h2>
|
|
|
37 |
<ul dojoType="dojo.dnd.Selector" jsId="c2" class="container">
|
|
|
38 |
<li class="dojoDndItem">Item 1</li>
|
|
|
39 |
<li class="dojoDndItem">Item 2</li>
|
|
|
40 |
<li class="dojoDndItem">Item 3</li>
|
|
|
41 |
</ul>
|
|
|
42 |
<h2>OL selector</h2>
|
|
|
43 |
<ol dojoType="dojo.dnd.Selector" jsId="c3" class="container">
|
|
|
44 |
<li class="dojoDndItem">Item 1</li>
|
|
|
45 |
<li class="dojoDndItem">Item 2</li>
|
|
|
46 |
<li class="dojoDndItem">Item 3</li>
|
|
|
47 |
</ol>
|
|
|
48 |
<h2>TABLE selector</h2>
|
|
|
49 |
<table dojoType="dojo.dnd.Selector" jsId="c4" class="container" border="1px solid black">
|
|
|
50 |
<tr class="dojoDndItem">
|
|
|
51 |
<td>A</td>
|
|
|
52 |
<td>row 1</td>
|
|
|
53 |
</tr>
|
|
|
54 |
<tr class="dojoDndItem">
|
|
|
55 |
<td>B</td>
|
|
|
56 |
<td>row 2</td>
|
|
|
57 |
</tr>
|
|
|
58 |
<tr class="dojoDndItem">
|
|
|
59 |
<td>C</td>
|
|
|
60 |
<td>row 3</td>
|
|
|
61 |
</tr>
|
|
|
62 |
</table>
|
|
|
63 |
<h2>P selector with SPAN elements</h2>
|
|
|
64 |
<p>Elements of this container are layed out horizontally.</p>
|
|
|
65 |
<p dojoType="dojo.dnd.Selector" jsId="c5" class="container">
|
|
|
66 |
<span class="dojoDndItem"> Item 1 </span>
|
|
|
67 |
<span class="dojoDndItem"> Item 2 </span>
|
|
|
68 |
<span class="dojoDndItem"> Item 3 </span>
|
|
|
69 |
</p>
|
|
|
70 |
</body>
|
|
|
71 |
</html>
|