summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable')
-rw-r--r--demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.page6
-rw-r--r--demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php13
2 files changed, 14 insertions, 5 deletions
diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.page b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.page
index cd778625..d7b1e8a8 100644
--- a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.page
+++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.page
@@ -27,13 +27,15 @@
<table class="sampletable">
<tr><td class="samplenote">
-Default options with a little css applied:
+Default options with a little css applied, change options during callback:
</td><td class="sampleaction">
<com:TJuiSelectable
ID="repeater1"
OnStop="repeater1_onStop"
/>
- <com:TActiveLabel ID="label1" />
+ Selected items: <com:TActiveLabel ID="label1" />
+ <div><com:TActiveCheckBox OnCheckedChanged="select1" Text="Disable selectable" /></div>
+ <div><com:TActiveCheckBox OnCheckedChanged="select2" Text="Selecting starts after dragging at least 100px" /></div>
</td></tr>
</table>
diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php
index ada38408..81d5ea27 100644
--- a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php
+++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php
@@ -18,15 +18,22 @@ class Home extends TPage
{
$this->repeater1->DataSource=$this->data;
$this->repeater1->dataBind();
+ $this->label1->setText('<i>none</i>');
}
}
public function repeater1_onStop($sender, $param)
{
- $this->label1->Text="Selected items:";
$items = $param->getCallbackParameter()->index;
+ foreach ($items as $key => $index) $items[$key] = $this->data[$index];
+ $this->label1->Text = implode(' ', $items);
+ }
+
+ public function select1($sender, $param) {
+ $this->repeater1->getOptions()->disabled = $sender->getChecked();
+ }
- foreach($items as $index)
- $this->label1->Text.=' '.$this->data[$index];
+ public function select2($sender, $param) {
+ $this->repeater1->getOptions()->distance = $sender->getChecked() ? 100 : 0;
}
}