summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable')
-rw-r--r--demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable/Home.page48
-rw-r--r--demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable/Home.php16
2 files changed, 64 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable/Home.page b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable/Home.page
new file mode 100644
index 00000000..59cd3838
--- /dev/null
+++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable/Home.page
@@ -0,0 +1,48 @@
+<com:TContent ID="body">
+<h1>TJuiDraggable Samples</h1>
+
+<com:TStyleSheet>
+ .ui-draggable {
+ width: 100px;
+ height:100px;
+ background-color: lime;
+ border: 1px solid black;
+ padding: 1em;
+ }
+ .ui-droppable {
+ width: 150px;
+ height:150px;
+ border: 1px solid black;
+ padding: 1em;
+ margin: 1em;
+ }
+ .drop-yellow {
+ background-color: yellow;
+ }
+ .drop-red {
+ background-color: red;
+ }
+</com:TStyleSheet>
+<table class="sampletable">
+
+<tr><td class="samplenote">
+Default options with a little css applied:
+</td><td class="sampleaction" style="height:600px">
+ <com:TJuiDraggable>
+ Drag me around
+ </com:TJuiDraggable>
+
+ <com:TJuiDroppable OnDrop="drop1_ondrop" CssClass="drop-yellow">
+ Drop it here!
+ <br/><com:TActiveLabel ID="label1" />
+ </com:TJuiDroppable ID="drop1">
+
+ <com:TJuiDroppable OnDrop="drop2_ondrop" CssClass="drop-red">
+ Drop it here!
+ <br/><com:TActiveLabel ID="label2" />
+ </com:TJuiDroppable ID="drop1">
+</td></tr>
+
+</table>
+
+</com:TContent>
diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable/Home.php b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable/Home.php
new file mode 100644
index 00000000..cdbe85ba
--- /dev/null
+++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable/Home.php
@@ -0,0 +1,16 @@
+<?php
+
+class Home extends TPage
+{
+ public function drop1_ondrop($sender, $param)
+ {
+ $draggable=$param->getDroppedControl()->ID;
+ $this->label1->Text="Dropped ".$draggable." at: <br/>Top=".$param->getOffsetTop()." Left=".$param->getOffsetLeft();
+ }
+
+ public function drop2_ondrop($sender, $param)
+ {
+ $draggable=$param->getDroppedControl()->ID;
+ $this->label2->Text="Dropped ".$draggable." at: <br/>Top=".$param->getOffsetTop()." Left=".$param->getOffsetLeft();
+ }
+}