From 8c78c2f6dda9c9075509e99687e1e6f41ca9ac0f Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sat, 8 Feb 2014 12:29:52 +0100 Subject: TJuiSelectable events --- .../JuiControls/Samples/TJuiSelectable/Home.page | 5 +- .../JuiControls/Samples/TJuiSelectable/Home.php | 4 +- framework/Web/UI/JuiControls/TJuiSelectable.php | 99 ++++++++++++++-------- 3 files changed, 70 insertions(+), 38 deletions(-) diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.page b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.page index 4af5d637..cd778625 100644 --- a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.page +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.page @@ -29,7 +29,10 @@ Default options with a little css applied: - + diff --git a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php index cf8d40f1..ada38408 100644 --- a/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php +++ b/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php @@ -21,10 +21,10 @@ class Home extends TPage } } - public function repeater1_onSelectedIndexChanged($sender, $param) + public function repeater1_onStop($sender, $param) { $this->label1->Text="Selected items:"; - $items = $param->getSelectedIndexes(); + $items = $param->getCallbackParameter()->index; foreach($items as $index) $this->label1->Text.=' '.$this->data[$index]; diff --git a/framework/Web/UI/JuiControls/TJuiSelectable.php b/framework/Web/UI/JuiControls/TJuiSelectable.php index 968f0170..8915c4a2 100644 --- a/framework/Web/UI/JuiControls/TJuiSelectable.php +++ b/framework/Web/UI/JuiControls/TJuiSelectable.php @@ -15,6 +15,11 @@ Prado::using('System.Web.UI.ActiveControls.TActivePanel'); /** * TJuiSelectable class. * + * TJuiSelectable is an extension to {@link TActivePanel} based on jQuery-UI's + * {@link http://jqueryui.com/selectable/ Selectable} interaction. + * The panel can be feed a {@link setDataSource DataSource} and will interally + * render a {@link TRepeater} that displays items in an unordered list. + * Items can be selected by clicking on them, individually or in a group. * * *