summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/ActiveControls/TActivePageAdapter.php2
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackClientScript.php11
-rw-r--r--framework/Web/UI/TClientScriptManager.php16
3 files changed, 27 insertions, 2 deletions
diff --git a/framework/Web/UI/ActiveControls/TActivePageAdapter.php b/framework/Web/UI/ActiveControls/TActivePageAdapter.php
index 03fe2f16..c594ed42 100644
--- a/framework/Web/UI/ActiveControls/TActivePageAdapter.php
+++ b/framework/Web/UI/ActiveControls/TActivePageAdapter.php
@@ -198,7 +198,7 @@ class TActivePageAdapter extends TControlAdapter
if($this->getPage()->getClientScript()->hasEndScripts())
{
$writer = $response->createHtmlWriter();
- $this->getPage()->getClientScript()->renderEndScripts($writer);
+ $this->getPage()->getClientScript()->renderEndScriptsCallback($writer);
$this->getPage()->getCallbackClient()->evaluateScript($writer);
}
diff --git a/framework/Web/UI/ActiveControls/TCallbackClientScript.php b/framework/Web/UI/ActiveControls/TCallbackClientScript.php
index a25e7f41..96c8d38e 100644
--- a/framework/Web/UI/ActiveControls/TCallbackClientScript.php
+++ b/framework/Web/UI/ActiveControls/TCallbackClientScript.php
@@ -452,7 +452,16 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function evaluateScript($writer)
{
- $this->callClientFunction('Prado.Element.evaluateScript', array($writer));
+ if($writer instanceof THtmlWriter)
+ {
+ $boundary = $this->getResponseContentBoundary($writer);
+ $content = null;
+ } else {
+ $boundary = null;
+ $content = $writer;
+ }
+
+ $this->callClientFunction('Prado.Element.evaluateScript', array($content, $boundary));
}
/**
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php
index 5f9ea8b4..80a71ea0 100644
--- a/framework/Web/UI/TClientScriptManager.php
+++ b/framework/Web/UI/TClientScriptManager.php
@@ -697,6 +697,22 @@ class TClientScriptManager extends TApplicationComponent
$writer->write(TJavaScript::renderScriptBlocks($this->_endScripts));
}
+ /**
+ * @param THtmlWriter writer for the rendering purpose
+ */
+ public function renderBeginScriptsCallback($writer)
+ {
+ $writer->write(TJavaScript::renderScriptBlocksCallback($this->_beginScripts));
+ }
+
+ /**
+ * @param THtmlWriter writer for the rendering purpose
+ */
+ public function renderEndScriptsCallback($writer)
+ {
+ $writer->write(TJavaScript::renderScriptBlocksCallback($this->_endScripts));
+ }
+
public function renderHiddenFieldsBegin($writer)
{
$this->renderHiddenFieldsInt($writer,true);