diff options
author | xue <> | 2006-01-24 02:55:55 +0000 |
---|---|---|
committer | xue <> | 2006-01-24 02:55:55 +0000 |
commit | 51694d32a1b85a02809f55e1f406c98ba755b4bf (patch) | |
tree | 5fc4658cb11c2a2fc36335166e0f1ff57f2df3b3 | |
parent | c5f2fb2c77e7140277349d5b1f1a8f6017909dc6 (diff) |
Make quickstart demos disable theme if under FT situation.
-rw-r--r-- | demos/quickstart/protected/controls/SampleLayout.php | 8 | ||||
-rw-r--r-- | framework/Web/UI/TPage.php | 4 | ||||
-rw-r--r-- | framework/Web/UI/TThemeManager.php | 2 | ||||
-rw-r--r-- | framework/core.php | 2 |
4 files changed, 12 insertions, 4 deletions
diff --git a/demos/quickstart/protected/controls/SampleLayout.php b/demos/quickstart/protected/controls/SampleLayout.php index ee7f41ff..94b7ac74 100644 --- a/demos/quickstart/protected/controls/SampleLayout.php +++ b/demos/quickstart/protected/controls/SampleLayout.php @@ -2,6 +2,14 @@ class SampleLayout extends TTemplateControl
{
+
+ public function __construct()
+ {
+ if($this->Request->Items->contains('functionaltest'))
+ $this->Service->RequestedPage->EnableTheming=false;
+ parent::__construct();
+ }
+
public function toggleTopicPanel($sender,$param)
{
$this->TopicPanel->Visible=!$this->TopicPanel->Visible;
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 53090e7f..f4d5fa99 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -455,14 +455,14 @@ class TPage extends TTemplateControl {
$this->raiseEvent('OnPreRenderComplete',$this,$param);
$cs=$this->getClientScript();
- if($this->_theme)
+ if($this->_theme instanceof ITheme)
{
foreach($this->_theme->getStyleSheetFiles() as $url)
$cs->registerStyleSheetFile($url,$url);
foreach($this->_theme->getJavaScriptFiles() as $url)
$cs->registerHeadScriptFile($url,$url);
}
- if($this->_styleSheet)
+ if($this->_styleSheet instanceof ITheme)
{
foreach($this->_styleSheet->getStyleSheetFiles() as $url)
$cs->registerStyleSheetFile($url,$url);
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php index f2243e7c..f29a8def 100644 --- a/framework/Web/UI/TThemeManager.php +++ b/framework/Web/UI/TThemeManager.php @@ -164,7 +164,7 @@ class TThemeManager extends TModule * @package System.Web.UI
* @since 3.0
*/
-class TTheme extends TComponent
+class TTheme extends TComponent implements ITheme
{
/**
* prefix for cache variable name used to store parsed themes
diff --git a/framework/core.php b/framework/core.php index f3d826cc..64668625 100644 --- a/framework/core.php +++ b/framework/core.php @@ -147,7 +147,7 @@ interface ITheme * Applies this theme to the specified control.
* @param TControl the control to be applied with this theme
*/
- public function apply($control);
+ public function applySkin($control);
}
/**
|