diff options
author | wei <> | 2006-08-29 11:12:33 +0000 |
---|---|---|
committer | wei <> | 2006-08-29 11:12:33 +0000 |
commit | 13b256cdf8e3cef810d1b3dcf580be751b94c9fe (patch) | |
tree | 95ad1e52c74caae1df3b1af1eff2f9c048ce05af /framework/Web/UI | |
parent | 07f24ace21f71baba4a3e278fad90033efb6fea2 (diff) |
Add separate debug javascript build.
Diffstat (limited to 'framework/Web/UI')
-rw-r--r-- | framework/Web/UI/TClientScriptManager.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 54bf2aa4..5546ed3f 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -121,7 +121,7 @@ class TClientScriptManager extends TApplicationComponent $this->_registeredPradoScripts[$name]=true; if(!isset(self::$_pradoScripts[$name])) throw new TInvalidOperationException('csmanager_pradoscript_invalid',$name); - $basePath=Prado::getFrameworkPath().'/'.self::SCRIPT_PATH; + $basePath=$this->getPradoBaseScriptPath(); foreach(self::$_pradoScripts[$name] as $script) { if(!isset($this->_registeredPradoFiles[$script])) @@ -133,6 +133,15 @@ class TClientScriptManager extends TApplicationComponent } } + protected function getPradoBaseScriptPath() + { + $basePath = Prado::getFrameworkPath().'/'.self::SCRIPT_PATH; + if($this->getApplication()->getMode()===TApplication::STATE_DEBUG) + return $basePath.'/debug'; + else + return $basePath.'/compressed'; + } + protected function renderPradoScripts($writer) { $files=''; @@ -146,7 +155,7 @@ class TClientScriptManager extends TApplicationComponent } if($files!=='') { - $basePath=Prado::getFrameworkPath().'/'.self::SCRIPT_PATH; + $basePath=$this->getPradoBaseScriptPath(); $scriptLoader=$basePath.'/'.self::SCRIPT_LOADER; $url=$this->publishFilePath($scriptLoader).'?js='.trim($files,','); if($this->getApplication()->getMode()===TApplication::STATE_DEBUG) |