summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TClientScriptManager.php
diff options
context:
space:
mode:
authorxue <>2006-08-31 20:17:39 +0000
committerxue <>2006-08-31 20:17:39 +0000
commit47a3cb88e7ed7f2a87bbf024dff3416fc6cd8002 (patch)
tree0eb41f1ab1f2351905cd95054a328c34361e5080 /framework/Web/UI/TClientScriptManager.php
parentb680e71693696a7b5280787ccd084cf860bcf989 (diff)
merge from 3.0 branch till 1374.
Diffstat (limited to 'framework/Web/UI/TClientScriptManager.php')
-rw-r--r--framework/Web/UI/TClientScriptManager.php13
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)