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 with handles test</title>
|
|
|
5 |
<style type="text/css">
|
|
|
6 |
@import "../../resources/dojo.css";
|
|
|
7 |
@import "../../resources/dnd.css";
|
|
|
8 |
@import "dndDefault.css";
|
|
|
9 |
|
|
|
10 |
body { padding: 1em; background: #ededed; }
|
|
|
11 |
|
|
|
12 |
.container { width: 100px; display: block; }
|
|
|
13 |
.container.handles .dojoDndHandle { background: #fee; }
|
|
|
14 |
.clear { clear: both; }
|
|
|
15 |
</style>
|
|
|
16 |
|
|
|
17 |
<script type="text/javascript" src="../../dojo.js" djConfig="isDebug: true, parseOnLoad: true"></script>
|
|
|
18 |
|
|
|
19 |
<script type="text/javascript" src="../../dnd/Container.js"></script>
|
|
|
20 |
<script type="text/javascript" src="../../dnd/Selector.js"></script>
|
|
|
21 |
<script type="text/javascript" src="../../dnd/Source.js"></script>
|
|
|
22 |
<script type="text/javascript" src="../../dnd/Avatar.js"></script>
|
|
|
23 |
<script type="text/javascript" src="../../dnd/Manager.js"></script>
|
|
|
24 |
|
|
|
25 |
<script type="text/javascript">
|
|
|
26 |
dojo.require("dojo.parser");
|
|
|
27 |
dojo.require("dojo.dnd.Source");
|
|
|
28 |
</script>
|
|
|
29 |
</head>
|
|
|
30 |
<body>
|
|
|
31 |
<h1 class="testTitle">Dojo DnD with handles test</h1>
|
|
|
32 |
|
|
|
33 |
<p>Following selection modes are supported by default:</p>
|
|
|
34 |
<ul>
|
|
|
35 |
<li>Simple click — selects a single element, all other elements will be unselected.</li>
|
|
|
36 |
<li>Ctrl+click — toggles a selection state of an element (use Meta key on Mac).</li>
|
|
|
37 |
<li>Shift+click — selects a range of element from the previous anchor to the current element.</li>
|
|
|
38 |
<li>Ctrl+Shift+click — adds a range of element from the previous anchor to the current element (use Meta key on Mac).</li>
|
|
|
39 |
</ul>
|
|
|
40 |
<p>Following drop modes are supported by default:</p>
|
|
|
41 |
<ul>
|
|
|
42 |
<li>Simple drop — moves elements to the valid target removing them from the source. It can be used to reorganize elements within a single source/target.</li>
|
|
|
43 |
<li>Ctrl+drop — copies elements to the valid target (use Meta key on Mac).</li>
|
|
|
44 |
</ul>
|
|
|
45 |
|
|
|
46 |
<p>Source with handles. Items should be draggable by "Item".</p>
|
|
|
47 |
<div dojoType="dojo.dnd.Source" jsId="c1" withHandles="true" class="container handles">
|
|
|
48 |
<div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Alpha</strong></div>
|
|
|
49 |
<div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Beta</strong></div>
|
|
|
50 |
<div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Gamma</strong></div>
|
|
|
51 |
<div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Delta</strong></div>
|
|
|
52 |
</div>
|
|
|
53 |
|
|
|
54 |
<p>Source without handles.</p>
|
|
|
55 |
<div dojoType="dojo.dnd.Source" jsId="c2" class="container">
|
|
|
56 |
<div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Epsilon</strong></div>
|
|
|
57 |
<div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Zeta</strong></div>
|
|
|
58 |
<div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Eta</strong></div>
|
|
|
59 |
<div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Theta</strong></div>
|
|
|
60 |
</div>
|
|
|
61 |
|
|
|
62 |
<p>HTML after</p>
|
|
|
63 |
|
|
|
64 |
</body>
|
|
|
65 |
</html>
|