diff options
author | xue <> | 2006-08-30 12:33:43 +0000 |
---|---|---|
committer | xue <> | 2006-08-30 12:33:43 +0000 |
commit | 1f560ccd8a9e21871dbedd548fc97f231131c771 (patch) | |
tree | 90d054108a0bce4668ca16d425655b22c99ed6d3 /framework/Web/UI/TClientScriptManager.php | |
parent | f4482f9c17825b63242fee42252e097dd85f53c5 (diff) |
merge from 3.0 branch till 1363.
Diffstat (limited to 'framework/Web/UI/TClientScriptManager.php')
-rw-r--r-- | framework/Web/UI/TClientScriptManager.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 504cfb40..3d0ced60 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -133,7 +133,7 @@ class TClientScriptManager extends TApplicationComponent $this->_registeredPradoScripts[$name]=true; else 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->_publishedPradoFiles[$script])) @@ -145,6 +145,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'; + } + /** * Renders the <script> tag that will load the javascript library files. * @param THtmlWriter writer that renders the <script> tag. @@ -154,7 +163,7 @@ class TClientScriptManager extends TApplicationComponent $files=implode(',',array_keys($this->_publishedPradoFiles)); 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) @@ -631,4 +640,4 @@ abstract class TClientSideOptions extends TComponent } } -?>
\ No newline at end of file +?> |