blob: 6b527375a2fee78ebe8853d2e8ac0550858bccfa (
plain)
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
|
<com:TContent ID="body">
<h1>TJuiDroppable Samples</h1>
<com:TStyleSheet>
.ui-draggable {
width: 100px;
height:100px;
border: 1px solid black;
background-color: lime;
padding: 1em;
cursor: move;
}
.ui-droppable {
width: 150px;
height:150px;
border: 1px solid black;
padding: 1em;
margin: 1em;
}
.drop-yellow {
background-color: yellow;
}
.drop-red {
background-color: red;
}
.drop-red.active {
background-color: orange;
}
</com:TStyleSheet>
<table class="sampletable">
<tr><td class="samplenote">
Default options with a little css applied, change options during callback:
</td><td class="sampleaction" style="height:600px">
<com:TJuiDraggable ID="drag1" CssClass="drag-lime">
Drag me around
<p><com:TActiveLabel ID="label3" /></p>
</com:TJuiDraggable>
<com:TJuiDroppable ID="drop1" OnDrop="drop1_ondrop" CssClass="drop-yellow" Options.accept=".drag-lime">
Drop it here!
<p><com:TActiveLabel ID="label1a" Text="is accepting lime draggable" /></p>
<p><com:TActiveLabel ID="label1b" /></p>
</com:TJuiDroppable>
<com:TJuiDroppable ID="drop2" OnDrop="drop2_ondrop" CssClass="drop-red">
Drop it here!
<p><com:TActiveLabel ID="label2a" Text="is NOT highlighted while dragging" /></p>
<p><com:TActiveLabel ID="label2b" /></p>
</com:TJuiDroppable>
<p><com:TActiveCheckBox Text="yellow droppable accepts lime draggable" OnCheckedChanged="drop1_changed" Checked="true" /></p>
<p><com:TActiveCheckBox Text="highlight red droppable while dragging" OnCheckedChanged="drop2_changed" /></p>
</td></tr>
</table>
</com:TContent>
|