From e9bfba959b6d655ed2eba71e4f2a618237d68698 Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 16 Feb 2006 22:48:18 +0000 Subject: Modified asset manipulation APIs. --- framework/Web/UI/WebControls/TColorPicker.php | 4 ++-- framework/Web/UI/WebControls/TDatePicker.php | 4 ++-- framework/Web/UI/WebControls/TRatingList.php | 12 ++++++------ framework/Web/UI/WebControls/TTextHighlighter.php | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'framework/Web/UI/WebControls') diff --git a/framework/Web/UI/WebControls/TColorPicker.php b/framework/Web/UI/WebControls/TColorPicker.php index f168aa5f..2a19125b 100644 --- a/framework/Web/UI/WebControls/TColorPicker.php +++ b/framework/Web/UI/WebControls/TColorPicker.php @@ -133,7 +133,7 @@ class TColorPicker extends TTextBox $cs = $this->getPage()->getClientScript(); $style = 'System.Web.Javascripts.colorpicker.'.$this->getColorPickerStyle(); $cssFile=Prado::getPathOfNamespace($style,'.css'); - $url = $this->getService()->getAsset($cssFile); + $url = $this->publishFilePath($cssFile); if(!$cs->isStyleSheetFileRegistered($style)) $cs->registerStyleSheetFile($style, $url); return $url; @@ -158,7 +158,7 @@ class TColorPicker extends TTextBox { $image = 'System.Web.Javascripts.colorpicker.'.$filename; $file = Prado::getPathOfNamespace($image, $ext); - $list[$filename.$ext] = $this->getService()->getAsset($file); + $list[$filename.$ext] = $this->publishFilePath($file); } $imgs['button.gif'] = $list['button.gif']; $imgs['background.png'] = $list['background.png']; diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index e7e68f6f..6f5eaffb 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -330,7 +330,7 @@ class TDatePicker extends TTextBox $cs = $this->getPage()->getClientScript(); $image = 'System.Web.Javascripts.datepicker.calendar'; $file = Prado::getPathOfNamespace($image, '.png'); - return $this->getService()->getAsset($file); + return $this->publishFilePath($file); } /** @@ -342,7 +342,7 @@ class TDatePicker extends TTextBox $cs = $this->getPage()->getClientScript(); $style = 'System.Web.Javascripts.datepicker.'.$this->getCalendarStyle(); $cssFile=Prado::getPathOfNamespace($style,'.css'); - $url = $this->getService()->getAsset($cssFile); + $url = $this->publishFilePath($cssFile); if(!$cs->isStyleSheetFileRegistered($style)) $cs->registerStyleSheetFile($style, $url); return $url; diff --git a/framework/Web/UI/WebControls/TRatingList.php b/framework/Web/UI/WebControls/TRatingList.php index 6613c08b..3c5a9279 100644 --- a/framework/Web/UI/WebControls/TRatingList.php +++ b/framework/Web/UI/WebControls/TRatingList.php @@ -80,22 +80,22 @@ class TRatingList extends TRadioButtonList { $cs = $this->getPage()->getClientScript(); $style = $this->getRatingStyle()->getStyleSheet(); - $url = $this->getService()->getAsset($style); + $url = $this->publishFilePath($style); if(!$cs->isStyleSheetFileRegistered($style)) - $cs->registerStyleSheetFile($style, $url); + $cs->registerStyleSheetFile($style, $url); return $url; } - + protected function publishRatingListAssets() { $cs = $this->getPage()->getClientScript(); $assets = $this->getRatingStyle()->getAssets(); $list = array(); foreach($assets as $file) - $list[] = $this->getService()->getAsset($file); + $list[] = $this->publishFilePath($file); return $list; } - + /** * @param THtmlWriter writer */ @@ -146,7 +146,7 @@ abstract class TRatingListStyle } class TRatingListDefaultStyle extends TRatingListStyle -{ +{ public function __construct() { parent::__construct(); diff --git a/framework/Web/UI/WebControls/TTextHighlighter.php b/framework/Web/UI/WebControls/TTextHighlighter.php index 80358ff6..281f131e 100644 --- a/framework/Web/UI/WebControls/TTextHighlighter.php +++ b/framework/Web/UI/WebControls/TTextHighlighter.php @@ -123,7 +123,7 @@ class TTextHighlighter extends TWebControl if(!$cs->isStyleSheetFileRegistered($cssKey)) { $cssFile=Prado::getPathOfNamespace('System.3rdParty.geshi.highlight','.css'); - $styleSheet = $this->getService()->getAsset($cssFile); + $styleSheet = $this->publishFilePath($cssFile); $cs->registerStyleSheetFile($cssKey, $styleSheet); } } -- cgit v1.2.3