summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php
diff options
context:
space:
mode:
authorJens Klaer <kj.landwehr.software@gmail.com>2015-05-20 15:56:09 +0200
committerJens Klaer <kj.landwehr.software@gmail.com>2015-05-20 15:56:09 +0200
commit55338f1cf947b8593a3e23094d6feab625370e28 (patch)
treee8d714ed8afad949c9e3ee93cf1fcc0602d92b36 /demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php
parent0fb75d64f8dbcc98b4c06e7556125b94bf612819 (diff)
extended quichstart tutorial for TJuiControl option changes during callback
Diffstat (limited to 'demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php')
-rw-r--r--demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php13
1 files changed, 10 insertions, 3 deletions
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;
}
}