diff options
author | knut <> | 2008-08-18 23:00:14 +0000 |
---|---|---|
committer | knut <> | 2008-08-18 23:00:14 +0000 |
commit | b26ef59b9ffbc9b8dfa15b6456fd0071474b9608 (patch) | |
tree | b49cb9de74fc5e68149fbb5e09ca1c15ec2af2ba /framework/Web/UI/WebControls | |
parent | 22c015c995c884cafcbf7a0594684b85b197162d (diff) |
fixed #876
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/TTabPanel.php | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/framework/Web/UI/WebControls/TTabPanel.php b/framework/Web/UI/WebControls/TTabPanel.php index 6688211e..961d0797 100644 --- a/framework/Web/UI/WebControls/TTabPanel.php +++ b/framework/Web/UI/WebControls/TTabPanel.php @@ -4,7 +4,7 @@ *
* @author Tomasz Wolny <tomasz.wolny@polecam.to.pl> and Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2008 PradoSoft + * @copyright Copyright © 2005-2008 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Web.UI.WebControls
@@ -175,7 +175,7 @@ class TTabPanel extends TWebControl implements IPostBackDataHandler */
public function getCssUrl()
{
- return $this->getViewState('CssUrl','');
+ return $this->getViewState('CssUrl','default');
}
/**
@@ -383,9 +383,19 @@ class TTabPanel extends TWebControl implements IPostBackDataHandler */
protected function registerStyleSheet()
{
- if(($url=$this->getCssUrl())==='')
- $url=$this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'tabpanel.css');
- $this->getPage()->getClientScript()->registerStyleSheetFile($url,$url);
+ $url = $this->getCssUrl();
+
+ if($url === '') {
+ return;
+ }
+
+ if($url === 'default') {
+ $url = $this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'tabpanel.css');
+ }
+
+ if($url !== '') {
+ $this->getPage()->getClientScript()->registerStyleSheetFile($url, $url);
+ }
}
/**
@@ -684,4 +694,4 @@ class TTabViewCollection extends TControlCollection }
}
-?> +?>
|