summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSortable
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/JuiControls/Samples/TJuiSortable')
-rw-r--r--demos/quickstart/protected/pages/JuiControls/Samples/TJuiSortable/Home.page32
-rw-r--r--demos/quickstart/protected/pages/JuiControls/Samples/TJuiSortable/Home.php31
2 files changed, 63 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSortable/Home.page b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSortable/Home.page
new file mode 100644
index 00000000..2e1d2f55
--- /dev/null
+++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSortable/Home.page
@@ -0,0 +1,32 @@
+<com:TContent ID="body">
+<h1>TJuiSortable Samples</h1>
+
+<com:TStyleSheet>
+ .ui-sortable {
+ list-style: none;
+ cursor: pointer;
+ }
+
+ .ui-sortable li {
+ border: 1px solid transparent;
+ padding: 3px;
+ border-radius:3px;
+ }
+
+ .ui-sortable li:hover {
+ background: lime;
+ border: 1px solid black;
+ }
+</com:TStyleSheet>
+<table class="sampletable">
+
+<tr><td class="samplenote">
+Default options with a little css applied:
+</td><td class="sampleaction">
+ <com:TJuiSortable ID="repeater1" onSort="repeater1_onSort"/>
+ <com:TActiveLabel ID="label1" />
+</td></tr>
+
+</table>
+
+</com:TContent>
diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSortable/Home.php b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSortable/Home.php
new file mode 100644
index 00000000..4b3a0ff4
--- /dev/null
+++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSortable/Home.php
@@ -0,0 +1,31 @@
+<?php
+
+class Home extends TPage
+{
+ protected $data = array(
+ 'PRADO',
+ 'quickstart',
+ 'tutorial',
+ 'sample',
+ 'for the',
+ 'TJuiSortable',
+ 'control',
+ );
+
+ public function onLoad($param)
+ {
+ if(!$this->IsPostback)
+ {
+ $this->repeater1->DataSource=$this->data;
+ $this->repeater1->dataBind();
+ }
+ }
+
+ public function repeater1_onSort($sender, $param)
+ {
+ $this->label1->Text="Items order:";
+ $order = $param->getOrder();
+ foreach($order as $index)
+ $this->label1->Text.=' '.$this->data[$index];
+ }
+}