diff options
author | ctrlaltca <> | 2012-05-18 18:00:24 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-05-18 18:00:24 +0000 |
commit | 098556f20a2014f8ca211b0820cfa4776052641b (patch) | |
tree | c111b60f6a28f9dd966bb26dfa41739bcb564a49 /framework/Web/UI/WebControls | |
parent | 4560efdc051a3b3f76e74375fadf40f118b6dbb3 (diff) |
fix #401
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/TClientScript.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/framework/Web/UI/WebControls/TClientScript.php b/framework/Web/UI/WebControls/TClientScript.php index 325105bc..4736df0e 100644 --- a/framework/Web/UI/WebControls/TClientScript.php +++ b/framework/Web/UI/WebControls/TClientScript.php @@ -132,9 +132,16 @@ class TClientScript extends TControl {
if($this->getHasControls())
{
- $writer->write("<script type=\"text/javascript\">\n/*<![CDATA[*/\n");
- $this->renderChildren($writer);
- $writer->write("\n/*]]>*/\n</script>\n");
+ if($this->getPage()->getIsCallback())
+ {
+ $extWriter= $this->getPage()->getResponse()->createHtmlWriter();
+ $this->renderChildren($extWriter);
+ $this->getPage()->getCallbackClient()->appendScriptBlock($extWriter);
+ } else {
+ $writer->write("<script type=\"text/javascript\">\n/*<![CDATA[*/\n");
+ $this->renderChildren($writer);
+ $writer->write("\n/*]]>*/\n</script>\n");
+ }
}
}
}
|