diff options
Diffstat (limited to 'framework/Web/UI/TClientScriptManager.php')
| -rw-r--r-- | framework/Web/UI/TClientScriptManager.php | 13 | 
1 files changed, 8 insertions, 5 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 3d0ced60..18d6089e 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=$this->getPradoBaseScriptPath(); +			$basePath=$this->getPradoScriptBasePath();  			foreach(self::$_pradoScripts[$name] as $script)  			{  				if(!isset($this->_publishedPradoFiles[$script])) @@ -145,7 +145,10 @@ class TClientScriptManager extends TApplicationComponent  		}  	} -	protected function getPradoBaseScriptPath() +	/** +	 * @return string the directory containing the PRADO js script files +	 */ +	protected function getPradoScriptBasePath()  	{  		$basePath = Prado::getFrameworkPath().'/'.self::SCRIPT_PATH;  		if($this->getApplication()->getMode()===TApplication::STATE_DEBUG) @@ -155,15 +158,15 @@ class TClientScriptManager extends TApplicationComponent  	}  	/** -	 * Renders the <script> tag that will load the javascript library files. -	 * @param THtmlWriter writer that renders the <script> tag. +	 * Renders the HTML tags for PRADO js files +	 * @param THtmlWriter writer  	 */  	protected function renderPradoScripts($writer)  	{  		$files=implode(',',array_keys($this->_publishedPradoFiles));  		if($files!=='')  		{ -			$basePath=$this->getPradoBaseScriptPath(); +			$basePath=$this->getPradoScriptBasePath();  			$scriptLoader=$basePath.'/'.self::SCRIPT_LOADER;  			$url=$this->publishFilePath($scriptLoader).'?js='.trim($files,',');  			if($this->getApplication()->getMode()===TApplication::STATE_DEBUG)  | 
