From daa4dde508865ef0f08e584987b0695d4847809a Mon Sep 17 00:00:00 2001 From: Ciro Mattia Gonano Date: Wed, 24 Apr 2013 09:59:46 +0200 Subject: Update to 3.2.1 --- framework/Web/UI/TClientScriptManager.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'framework/Web/UI/TClientScriptManager.php') 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 © 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 * @author Gabor Berczi (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 - * @version $Id$ + * @version $Id: TClientScriptManager.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -769,6 +769,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 @@ -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; } -- cgit v1.2.3