summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TCallbackClientScript.php
diff options
context:
space:
mode:
authorctrlaltca <>2012-05-18 18:00:24 +0000
committerctrlaltca <>2012-05-18 18:00:24 +0000
commit098556f20a2014f8ca211b0820cfa4776052641b (patch)
treec111b60f6a28f9dd966bb26dfa41739bcb564a49 /framework/Web/UI/ActiveControls/TCallbackClientScript.php
parent4560efdc051a3b3f76e74375fadf40f118b6dbb3 (diff)
fix #401
Diffstat (limited to 'framework/Web/UI/ActiveControls/TCallbackClientScript.php')
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackClientScript.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/framework/Web/UI/ActiveControls/TCallbackClientScript.php b/framework/Web/UI/ActiveControls/TCallbackClientScript.php
index 453824db..ecc213f5 100644
--- a/framework/Web/UI/ActiveControls/TCallbackClientScript.php
+++ b/framework/Web/UI/ActiveControls/TCallbackClientScript.php
@@ -434,6 +434,26 @@ class TCallbackClientScript extends TApplicationComponent
}
/**
+ * Appends a block of inline javascript enclosed in a boundary.
+ * Similar to to evaluateScript(), but functions declared in the
+ * inline block will be available to page elements.
+ * @param THtmlWriter writer for the content.
+ */
+ public function appendScriptBlock($content)
+ {
+ if($content instanceof TControl)
+ {
+ $boundary = $this->getRenderedContentBoundary($content);
+ }
+ else if($content instanceof THtmlWriter)
+ {
+ $boundary = $this->getResponseContentBoundary($content);
+ }
+
+ $this->callClientFunction('Prado.Element.appendScriptBlock', array($boundary));
+ }
+
+ /**
* Renders the control and return the content boundary from
* TCallbackResponseWriter. This method should only be used by framework
* component developers. The render() method is defered to be called in the