From 55338f1cf947b8593a3e23094d6feab625370e28 Mon Sep 17 00:00:00 2001 From: Jens Klaer Date: Wed, 20 May 2015 15:56:09 +0200 Subject: extended quichstart tutorial for TJuiControl option changes during callback --- .../pages/JuiControls/Samples/TJuiSelectable/Home.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php') 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('none'); } } 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; } } -- cgit v1.2.3