diff options
author | wei <> | 2006-06-24 05:46:22 +0000 |
---|---|---|
committer | wei <> | 2006-06-24 05:46:22 +0000 |
commit | a6be5564823be40670e0cad8dc758557dbd37549 (patch) | |
tree | 13083fe7ea207b5426c9ee29afc36654e1ed623d /framework/Web/UI/ActiveControls/TActiveControlAdapter.php | |
parent | cb8b23aca4c682c58323f432aa38a88c7a695377 (diff) |
Update active controls.
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActiveControlAdapter.php')
-rw-r--r-- | framework/Web/UI/ActiveControls/TActiveControlAdapter.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveControlAdapter.php b/framework/Web/UI/ActiveControls/TActiveControlAdapter.php index e6e8585f..75c9ba21 100644 --- a/framework/Web/UI/ActiveControls/TActiveControlAdapter.php +++ b/framework/Web/UI/ActiveControls/TActiveControlAdapter.php @@ -90,13 +90,17 @@ class TActiveControlAdapter extends TControlAdapter protected function renderCallbackClientScripts()
{
$cs = $this->getPage()->getClientScript();
- $key = get_class($this);
+ $key = 'Prado.CallbackRequest.addPostLoaders';
if(!$cs->isEndScriptRegistered($key))
{
$cs->registerPradoScript('ajax');
- $options = TJavascript::encode($this->getPage()->getPostDataLoaders(),false);
- $script = "Prado.CallbackRequest.addPostLoaders({$options});";
- $cs->registerEndScript($key, $script);
+ $data = $this->getPage()->getPostDataLoaders();
+ if(count($data) > 0)
+ {
+ $options = TJavascript::encode($data,false);
+ $script = "Prado.CallbackRequest.addPostLoaders({$options});";
+ $cs->registerEndScript($key, $script);
+ }
}
}
|