diff options
author | xue <> | 2005-12-08 14:21:44 +0000 |
---|---|---|
committer | xue <> | 2005-12-08 14:21:44 +0000 |
commit | 0d2c3c84ea6457a9d0a04e25e19a26811eef8562 (patch) | |
tree | 227203839cb7be2ad59e274c8ddc392ecc3cff27 /framework | |
parent | 1b0fbdbe10f426de5de8bd361f5e0806b349bdf5 (diff) |
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Web/UI/TClientScriptManager.php | 16 | ||||
-rw-r--r-- | framework/Web/UI/TPage.php | 28 |
2 files changed, 35 insertions, 9 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index ee7ca88f..e42a0b20 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -78,7 +78,7 @@ class TClientScriptManager extends TComponent private $_hiddenFields=array();
private $_beginScripts=array();
private $_endScripts=array();
- private $_scriptIncludes=array();
+ private $_scriptFiles=array();
private $_onSubmitStatements=array();
private $_arrayDeclares=array();
private $_expandoAttributes=array();
@@ -161,7 +161,7 @@ class TClientScriptManager extends TComponent {
$url=$this->_page->getService()->getAssetManager()->publishFilePath(Prado::getFrameworkPath().'/'.self::SCRIPT_DIR.'/'.$scriptFile);
$this->_publishedScriptFiles[$scriptFile]=$url;
- $this->registerScriptInclude('prado:'.$scriptFile,$url);
+ $this->registerScriptFile('prado:'.$scriptFile,$url);
}
return $url;
}
@@ -218,9 +218,9 @@ class TClientScriptManager extends TComponent return isset($this->_scriptBlocks[$key]);
}
- public function isScriptIncludeRegistered($key)
+ public function isScriptFileRegistered($key)
{
- return isset($this->_scriptIncludes[$key]);
+ return isset($this->_scriptFiles[$key]);
}
public function isBeginScriptRegistered($key)
@@ -243,9 +243,9 @@ class TClientScriptManager extends TComponent $this->_arrayDeclares[$name][]=$value;
}
- public function registerScriptInclude($key,$url)
+ public function registerScriptFile($key,$url)
{
- $this->_scriptIncludes[$key]=$url;
+ $this->_scriptFiles[$key]=$url;
}
public function registerHiddenField($name,$value)
@@ -285,9 +285,9 @@ class TClientScriptManager extends TComponent }
}
- public function renderScriptIncludes($writer)
+ public function renderScriptFiles($writer)
{
- foreach($this->_scriptIncludes as $include)
+ foreach($this->_scriptFiles as $include)
$writer->write("<script type=\"text/javascript\" src=\"".THttpUtility::htmlEncode($include)."\"></script>\n");
}
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 1aa0d40b..e2565291 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -41,6 +41,10 @@ class TPage extends TTemplateControl */
private $_form=null;
/**
+ * @var THead head instance
+ */
+ private $_head=null;
+ /**
* @var string template file name
*/
private $_templateFile=null;
@@ -699,7 +703,7 @@ class TPage extends TTemplateControl $cs->renderHiddenFields($writer);
$cs->renderArrayDeclarations($writer);
$cs->renderExpandoAttributes($writer);
- $cs->renderScriptIncludes($writer);
+ $cs->renderScriptFiles($writer);
$cs->renderEndScripts($writer);
}
else
@@ -741,6 +745,28 @@ class TPage extends TTemplateControl protected function initializeCulture()
{
}
+
+ public function getHead()
+ {
+ return $this->_head;
+ }
+
+ public function setHead(THead $value)
+ {
+ if($this->_head)
+ throw new TInvalidOperationException('page_head_duplicated');
+ $this->_head=$value;
+ }
+
+ public function getTitle()
+ {
+ return $this->getViewState('Title','');
+ }
+
+ public function setTitle($value)
+ {
+ $this->setViewState('Title',$value,'');
+ }
}
?>
\ No newline at end of file |