diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2013-11-03 19:33:34 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2013-11-26 11:42:49 +0100 |
commit | 8f389748d555b39d139bc0852e35f2541f4e2cb5 (patch) | |
tree | 461e6acbf7170540777c1522c3cdfd8b3168ae33 /framework/Web/Javascripts/TJavaScript.php | |
parent | 36f481b48d9777963d063e227a10882d318dc8d8 (diff) |
Fixed evaluation of end-scripts on callback
Aka: fix js event creation on callbacks
Diffstat (limited to 'framework/Web/Javascripts/TJavaScript.php')
-rw-r--r-- | framework/Web/Javascripts/TJavaScript.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/framework/Web/Javascripts/TJavaScript.php b/framework/Web/Javascripts/TJavaScript.php index 0f6fef1c..8cfbc9ba 100644 --- a/framework/Web/Javascripts/TJavaScript.php +++ b/framework/Web/Javascripts/TJavaScript.php @@ -60,6 +60,19 @@ class TJavaScript } /** + * Renders a list of javascript code + * @param array javascript blocks + * @return string rendering result + */ + public static function renderScriptBlocksCallback($scripts) + { + if(count($scripts)) + return implode("\n",$scripts)."\n"; + else + return ''; + } + + /** * Renders javascript block * @param string javascript block * @return string rendering result |