summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TClientScriptManager.php
diff options
context:
space:
mode:
authorchristophe.boulain <>2008-12-03 14:22:03 +0000
committerchristophe.boulain <>2008-12-03 14:22:03 +0000
commit6228873cf9d6471463d2413e7dfd7447f759baf2 (patch)
tree496a0e658330c39d4caa35602ba9f783b6f24f9c /framework/Web/UI/TClientScriptManager.php
parente8f239fea7351b248302a593a8e5eaa2a88c3e80 (diff)
Merge from trunk
Diffstat (limited to 'framework/Web/UI/TClientScriptManager.php')
-rw-r--r--framework/Web/UI/TClientScriptManager.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php
index 83fdf789..f0eb6157 100644
--- a/framework/Web/UI/TClientScriptManager.php
+++ b/framework/Web/UI/TClientScriptManager.php
@@ -169,7 +169,10 @@ class TClientScriptManager extends TApplicationComponent
$scriptLoaderPath = $path.'/'.basename(self::SCRIPT_LOADER);
$scriptLoaderSrc = Prado::getFrameworkPath().DIRECTORY_SEPARATOR.self::SCRIPT_LOADER;
if(!is_file($scriptLoaderPath))
+ {
copy($scriptLoaderSrc, $scriptLoaderPath);
+ chmod($scriptLoaderPath, PRADO_CHMOD);
+ }
$url .= '/'.basename(self::SCRIPT_LOADER).'?js='.implode(',', $packages);
if($debug!==false && $this->getApplication()->getMode()===TApplicationMode::Debug)
{
@@ -230,7 +233,7 @@ class TClientScriptManager extends TApplicationComponent
$class = new TReflectionClass($callbackHandler);
$clientSide = $callbackHandler->getActiveControl()->getClientSide();
$options = array_merge($options, $clientSide->getOptions()->toArray());
- $optionString = TJavascript::encode($options);
+ $optionString = TJavaScript::encode($options);
$this->registerPradoScriptInternal('ajax');
$id = $callbackHandler->getUniqueID();
return "new Prado.CallbackRequest('{$id}',{$optionString})";
@@ -677,8 +680,8 @@ abstract class TClientSideOptions extends TComponent
*/
protected function setFunction($name, $code)
{
- if(!TJavascript::isFunction($code))
- $code = TJavascript::quoteFunction($this->ensureFunction($code));
+ if(!TJavaScript::isFunction($code))
+ $code = TJavaScript::quoteFunction($this->ensureFunction($code));
$this->setOption($name, $code);
}
@@ -717,4 +720,3 @@ abstract class TClientSideOptions extends TComponent
}
}
-?>