diff options
author | wei <> | 2006-01-18 04:20:26 +0000 |
---|---|---|
committer | wei <> | 2006-01-18 04:20:26 +0000 |
commit | 0226f8f5f430d34b3cead40c4eb7b458933d16c6 (patch) | |
tree | 68b21c4bec09ed73edc64019b4e20a2e3853d477 /framework/Web/UI/WebControls/TBaseValidator.php | |
parent | e2219c91b98088289080bfa451d3083851eddf76 (diff) |
update javascript library and usage in web controls
Diffstat (limited to 'framework/Web/UI/WebControls/TBaseValidator.php')
-rw-r--r-- | framework/Web/UI/WebControls/TBaseValidator.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php index e3fc8b2f..9c4dd1be 100644 --- a/framework/Web/UI/WebControls/TBaseValidator.php +++ b/framework/Web/UI/WebControls/TBaseValidator.php @@ -159,7 +159,7 @@ abstract class TBaseValidator extends TLabel implements IValidator $scriptKey = "TBaseValidator"; if($this->getEnableClientScript() && !$scripts->isEndScriptRegistered($scriptKey)) { - $scripts->registerPradoScript('validator'); + $scripts->registerClientScript('validator'); $formID=$this->getPage()->getForm()->getClientID(); $js = "Prado.Validation.AddForm('$formID');"; $scripts->registerEndScript($scriptKey, $js); @@ -179,7 +179,8 @@ abstract class TBaseValidator extends TLabel implements IValidator $class = get_class($this); $scriptKey = "prado:".$this->getClientID(); $scripts = $this->getPage()->getClientScript(); - $options = TJavascript::toList($this->getClientScriptOptions()); + $serializer = new TJavascriptSerializer($this->getClientScriptOptions()); + $options = $serializer->toJavascript(); $js = "new Prado.Validation(Prado.Validation.{$class}, {$options});"; $scripts->registerEndScript($scriptKey, $js); } |