From 1f560ccd8a9e21871dbedd548fc97f231131c771 Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 30 Aug 2006 12:33:43 +0000 Subject: merge from 3.0 branch till 1363. --- framework/Web/UI/TClientScriptManager.php | 15 +++++++++--- framework/Web/UI/TControl.php | 28 ++++------------------ framework/Web/UI/TTemplateManager.php | 14 +++++------ .../Web/UI/WebControls/TDataTypeValidator.php | 2 +- framework/Web/UI/WebControls/TDatePicker.php | 14 +++++++---- framework/Web/UI/WebControls/THead.php | 19 +++++++++++++++ 6 files changed, 52 insertions(+), 40 deletions(-) (limited to 'framework/Web/UI') 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