summaryrefslogtreecommitdiff
path: root/framework/Web/UI/JuiControls/TJuiSelectable.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-02-06 16:23:42 +0100
committerFabio Bas <ctrlaltca@gmail.com>2014-02-06 16:23:42 +0100
commit2c1d9d453404ec2e3344ef477bf834a2a3c065af (patch)
treed309eca34de724db2804e0febaab76a68b50b889 /framework/Web/UI/JuiControls/TJuiSelectable.php
parent705a311b3bbc223737a51bec1d2f978554da086a (diff)
Implemented basic support for callback events for JUI controls; TJuiDraggable and TJuiDroppable examples
Diffstat (limited to 'framework/Web/UI/JuiControls/TJuiSelectable.php')
-rw-r--r--framework/Web/UI/JuiControls/TJuiSelectable.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/framework/Web/UI/JuiControls/TJuiSelectable.php b/framework/Web/UI/JuiControls/TJuiSelectable.php
index e895c1f8..968f0170 100644
--- a/framework/Web/UI/JuiControls/TJuiSelectable.php
+++ b/framework/Web/UI/JuiControls/TJuiSelectable.php
@@ -10,6 +10,7 @@
*/
Prado::using('System.Web.UI.JuiControls.TJuiControlAdapter');
+Prado::using('System.Web.UI.ActiveControls.TActivePanel');
/**
* TJuiSelectable class.
@@ -33,6 +34,8 @@ Prado::using('System.Web.UI.JuiControls.TJuiControlAdapter');
*/
class TJuiSelectable extends TActivePanel implements IJuiOptions, ICallbackEventHandler
{
+ protected $_options;
+
/**
* Creates a new callback control, sets the adapter to
* TActiveControlAdapter. If you override this class, be sure to set the
@@ -50,10 +53,9 @@ class TJuiSelectable extends TActivePanel implements IJuiOptions, ICallbackEvent
*/
public function getOptions()
{
- static $options;
- if($options===null)
- $options=new TJuiControlOptions($this);
- return $options;
+ if($this->_options===null)
+ $this->_options=new TJuiControlOptions($this);
+ return $this->_options;
}
/**
@@ -66,6 +68,15 @@ class TJuiSelectable extends TActivePanel implements IJuiOptions, ICallbackEvent
}
/**
+ * Array containing valid javascript events
+ * @return array()
+ */
+ public function getValidEvents()
+ {
+ return array('create', 'selected', 'selecting', 'start', 'stop', 'unselected', 'unselecting');
+ }
+
+ /**
* @return array list of callback options.
*/
protected function getPostBackOptions()