diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2014-01-15 00:24:58 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2014-01-15 00:24:58 +0100 |
commit | 53ef46637f49ba745bb43c891cae593454502979 (patch) | |
tree | d8bcb785222da58b271c53154eceb4df4fd4311b /demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable | |
parent | 0a136fe37491281ada5084b6eb5a72d4ca8d948a (diff) |
Added basic events for JuiControls, added quickstart demos
Diffstat (limited to 'demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable')
-rw-r--r-- | demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable/Home.page | 48 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable/Home.php | 16 |
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(); + } +} |