From 6228873cf9d6471463d2413e7dfd7447f759baf2 Mon Sep 17 00:00:00 2001 From: "christophe.boulain" <> Date: Wed, 3 Dec 2008 14:22:03 +0000 Subject: Merge from trunk --- framework/Web/UI/TClientScriptManager.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'framework/Web/UI/TClientScriptManager.php') 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 } } -?> -- cgit v1.2.3