diff options
Diffstat (limited to 'demos/quickstart/protected/pages/JuiControls/Samples')
13 files changed, 384 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDraggable/Home.page b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDraggable/Home.page new file mode 100644 index 00000000..349922cb --- /dev/null +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDraggable/Home.page @@ -0,0 +1,29 @@ +<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; + } +</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 + OnStart="drag1_start" + OnStop="drag1_stop" + > + Drag me around + </com:TJuiDraggable> + <com:TActiveLabel ID="label1" Text="Waiting.." /> +</td></tr> + +</table> + +</com:TContent> diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDraggable/Home.php b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDraggable/Home.php new file mode 100644 index 00000000..348eea55 --- /dev/null +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDraggable/Home.php @@ -0,0 +1,16 @@ +<?php + +class Home extends TPage +{ + protected function drag1_start($sender, $param) + { + $offset=$param->getCallbackParameter()->offset; + $this->label1->Text.="<br/>Start drag at (".$offset->left.",".$offset->top.")"; + } + + protected function drag1_stop($sender, $param) + { + $offset=$param->getCallbackParameter()->offset; + $this->label1->Text.="<br/>Stop drop at (".$offset->left.",".$offset->top.")"; + } +}
\ No newline at end of file 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..6059fe60 --- /dev/null +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable/Home.page @@ -0,0 +1,48 @@ +<com:TContent ID="body"> +<h1>TJuiDroppable 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 ID="drag1"> + Drag me around + </com:TJuiDraggable> + + <com:TJuiDroppable OnDrop="drop1_ondrop" CssClass="drop-yellow"> + Drop it here! + <br/><com:TActiveLabel ID="label1" /> + </com:TJuiDroppable> + + <com:TJuiDroppable OnDrop="drop2_ondrop" CssClass="drop-red"> + Drop it here! + <br/><com:TActiveLabel ID="label2" /> + </com:TJuiDroppable> +</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..c59d035c --- /dev/null +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiDroppable/Home.php @@ -0,0 +1,30 @@ +<?php + +class Home extends TPage +{ + public function drop1_ondrop($sender, $param) + { + $draggable=$param->DraggableControl; + /* Equals to: + * $draggable=$param->getControl($param->getCallbackParameter()->draggable); + */ + $offset=$param->getCallbackParameter()->offset; + $target=$param->getCallbackParameter()->target->offset; + $top=$offset->top - $target->top; + $left=$offset->left - $target->left; + $this->label1->Text="Dropped ".$draggable->ID." at: <br/>Top=".$top." Left=".$left; + } + + public function drop2_ondrop($sender, $param) + { + $draggable=$param->DraggableControl; + /* Equals to: + * $draggable=$param->getControl($param->getCallbackParameter()->draggable); + */ + $offset=$param->getCallbackParameter()->offset; + $target=$param->getCallbackParameter()->target->offset; + $top=$offset->top - $target->top; + $left=$offset->left - $target->left; + $this->label2->Text="Dropped ".$draggable->ID." at: <br/>Top=".$top." Left=".$left; + } +} diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.page b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.page new file mode 100644 index 00000000..63436516 --- /dev/null +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.page @@ -0,0 +1,55 @@ +<com:TContent ID="body"> +<h1>TJuiProgressbar Samples</h1> + +<table class="sampletable"> + +<tr><td class="samplenote"> +Default options, Max=100, Value=50: +</td><td class="sampleaction"> + <com:TJuiProgressbar + Options.Max="100" + Options.Value="50" + /> +</td></tr> + +<tr><td class="samplenote"> +Undefined progressbar, Value=false: +</td><td class="sampleaction"> + <com:TJuiProgressbar + Options.Value="false" + /> +</td></tr> + +<tr><td class="samplenote"> +Undefined progresbar, value changed from javascript: +</td><td class="sampleaction"> + <com:TJuiProgressbar + ID="pbar1" + Options.Max="100" + Options.Value="false" + OnChange="pbar1_changed" + OnComplete="pbar1_complete" + /> + <com:TActiveLabel ID="label1" Text="Waiting.." /> + <com:TButton ID="button1" Text="Start example" Attributes.OnClick="startExample1(); return false" /> + <com:TClientScript> + function progress() { + var pbar = $('#<%= $this->pbar1->ClientID %>'); + var val = pbar.progressbar('value') || 0; + pbar.progressbar('value', val + 10); + if (val < 99) { + setTimeout(progress, 500); + } + } + + function startExample1() + { + $('#<%= $this->pbar1->ClientID %>').progressbar('value', false) + progress(); + } + </com:TClientScript/> +</td></tr> + +</table> + +</com:TContent> diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.php b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.php new file mode 100644 index 00000000..8f6d9ec6 --- /dev/null +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiProgressbar/Home.php @@ -0,0 +1,14 @@ +<?php + +class Home extends TPage +{ + public function pbar1_complete($sender,$param) + { + $this->label1->Text="Progressbar complete!"; + } + + public function pbar1_changed($sender,$param) + { + $this->label1->Text="Progressbar changed."; + } +}
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiResizable/Home.page b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiResizable/Home.page new file mode 100644 index 00000000..6c61f7df --- /dev/null +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiResizable/Home.page @@ -0,0 +1,29 @@ +<com:TContent ID="body"> +<h1>TJuiResizable Samples</h1> + +<com:TStyleSheet> + .resizable { + width: 150px; + height: 150px; + padding: 0.5em; + background: #fff; + border: 1px solid #000; + } + </com:TStyleSheet> +<table class="sampletable"> + +<tr><td class="samplenote"> +Default options with a little css applied: +</td><td class="sampleaction"> + <com:TJuiResizable + CssClass="resizable" + OnStart="resize1_start" + OnStop="resize1_stop" + > + <com:TActiveLabel ID="label1" Text="Resize me!" /> + </com:TJuiResizable> +</td></tr> + +</table> + +</com:TContent> diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiResizable/Home.php b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiResizable/Home.php new file mode 100644 index 00000000..435b8a9b --- /dev/null +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiResizable/Home.php @@ -0,0 +1,16 @@ +<?php + +class Home extends TPage +{ + protected function resize1_start($sender, $param) + { + $size=$param->getCallbackParameter()->size; + $this->label1->Text.="<br/>Start: ".intval($size->width)." x ".intval($size->height); + } + + protected function resize1_stop($sender, $param) + { + $size=$param->getCallbackParameter()->size; + $this->label1->Text.="<br/>Stop: ".intval($size->width)." x ".intval($size->height); + } +}
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.page b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.page new file mode 100644 index 00000000..cd778625 --- /dev/null +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.page @@ -0,0 +1,41 @@ +<com:TContent ID="body"> +<h1>TJuiSelectable Samples</h1> + +<com:TStyleSheet> + .ui-selectable { + list-style: none; + cursor: pointer; + } + .ui-selectable li { + border: 1px solid transparent; + padding: 3px; + border-radius:3px; + } + + .ui-selectable li:hover { + background: #FECA40; + border: 1px solid black; + } + + .ui-selecting { + background: #FECA40; + } + .ui-selected { + background: #F39814; color: white; + } +</com:TStyleSheet> +<table class="sampletable"> + +<tr><td class="samplenote"> +Default options with a little css applied: +</td><td class="sampleaction"> + <com:TJuiSelectable + ID="repeater1" + OnStop="repeater1_onStop" + /> + <com:TActiveLabel ID="label1" /> +</td></tr> + +</table> + +</com:TContent> diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php new file mode 100644 index 00000000..ada38408 --- /dev/null +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php @@ -0,0 +1,32 @@ +<?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_onStop($sender, $param) + { + $this->label1->Text="Selected items:"; + $items = $param->getCallbackParameter()->index; + + foreach($items as $index) + $this->label1->Text.=' '.$this->data[$index]; + } +} 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..cbb1465b --- /dev/null +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSortable/Home.page @@ -0,0 +1,35 @@ +<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" + onStop="repeater1_onStop" + /> + <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..d96df302 --- /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_onStop($sender, $param) + { + $this->label1->Text="Items order:"; + $order = $param->getCallbackParameter()->index; + foreach($order as $index) + $this->label1->Text.=' '.$this->data[$index]; + } +} diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/config.xml b/demos/quickstart/protected/pages/JuiControls/Samples/config.xml new file mode 100644 index 00000000..315e42af --- /dev/null +++ b/demos/quickstart/protected/pages/JuiControls/Samples/config.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Id: config.xml 1405 2006-09-10 01:03:56Z wei $ --> +<configuration> + <paths> + <using namespace="System.Web.UI.JuiControls.*" /> + </paths> + <pages MasterClass="SampleLayout" /> +</configuration>
\ No newline at end of file |