summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TClientScriptManager.php
diff options
context:
space:
mode:
authorCiro Mattia Gonano <ciromattia@gmail.com>2013-04-24 09:59:46 +0200
committerCiro Mattia Gonano <ciromattia@gmail.com>2013-04-24 09:59:48 +0200
commitdaa4dde508865ef0f08e584987b0695d4847809a (patch)
treee4aaed56bea63ec5d569fc74ff10f0e36618c50e /framework/Web/UI/TClientScriptManager.php
parenta08d87f68a22df1ffb001ebe1cc3f438c045b843 (diff)
Update to 3.2.1
Diffstat (limited to 'framework/Web/UI/TClientScriptManager.php')
-rw-r--r--framework/Web/UI/TClientScriptManager.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php
index cab002e4..8a7afdad 100644
--- a/framework/Web/UI/TClientScriptManager.php
+++ b/framework/Web/UI/TClientScriptManager.php
@@ -7,7 +7,7 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2013 PradoSoft
* @license http://www.pradosoft.com/license/
- * @version $Id$
+ * @version $Id: TClientScriptManager.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Web.UI
*/
@@ -18,7 +18,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Gabor Berczi <gabor.berczi@devworx.hu> (lazyload additions & progressive rendering)
- * @version $Id$
+ * @version $Id: TClientScriptManager.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Web.UI
* @since 3.0
*/
@@ -758,7 +758,7 @@ class TClientScriptManager extends TApplicationComponent
* between ActiveControls and validators.
*
* @author <weizhuo[at]gmail[dot]com>
- * @version $Id$
+ * @version $Id: TClientScriptManager.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Web.UI
* @since 3.0
*/
@@ -770,6 +770,14 @@ abstract class TClientSideOptions extends TComponent
private $_options;
/**
+ * Constructor, initialize the options list.
+ */
+ public function __construct()
+ {
+ $this->_options = Prado::createComponent('System.Collections.TMap');
+ }
+
+ /**
* Adds on client-side event handler by wrapping the code within a
* javascript function block. If the code begins with "javascript:", the
* code is assumed to be a javascript function block rather than arbiturary
@@ -789,10 +797,7 @@ abstract class TClientSideOptions extends TComponent
*/
protected function getOption($name)
{
- if ($this->_options)
- return $this->_options->itemAt($name);
- else
- return null;
+ return $this->_options->itemAt($name);
}
/**
@@ -801,7 +806,7 @@ abstract class TClientSideOptions extends TComponent
*/
protected function setOption($name, $value)
{
- $this->getOptions()->add($name, $value);
+ $this->_options->add($name, $value);
}
/**
@@ -809,8 +814,6 @@ abstract class TClientSideOptions extends TComponent
*/
public function getOptions()
{
- if (!$this->_options)
- $this->_options = Prado::createComponent('System.Collections.TMap');
return $this->_options;
}