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/TAssetManager.php | 239 ----------------- framework/Web/UI/TClientScriptManager.php | 306 +++++++++++++++------- framework/Web/UI/TControl.php | 15 -- framework/Web/UI/TTemplateManager.php | 9 +- 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 +- 8 files changed, 230 insertions(+), 361 deletions(-) delete mode 100644 framework/Web/UI/TAssetManager.php (limited to 'framework/Web/UI') diff --git a/framework/Web/UI/TAssetManager.php b/framework/Web/UI/TAssetManager.php deleted file mode 100644 index 3e341a5e..00000000 --- a/framework/Web/UI/TAssetManager.php +++ /dev/null @@ -1,239 +0,0 @@ - - * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005 PradoSoft - * @license http://www.pradosoft.com/license/ - * @version $Revision: $ $Date: $ - * @package System.Web.UI - */ - -/** - * TAssetManager class - * - * TAssetManager provides a scheme to allow web clients visiting - * private files that are normally web-inaccessible. - * - * TAssetManager will copy the file to be published into a web-accessible - * directory. The default base directory for storing the file is "assets", which - * should be under the application directory. This can be changed by setting - * the {@link setBasePath BasePath} property together with the - * {@link setBaseUrl BaseUrl} property that refers to the URL for accessing the base path. - * - * By default, TAssetManager will not publish a file or directory if it already - * exists in the publishing directory and has an older modification time. - * If the application mode is set as 'Performance', the modification time check - * will be skipped. You can explicitly require a modification time check - * with the function {@link publishFilePath}. This is usually - * very useful during development. - * - * TAssetManager may be configured in application configuration file within - * page service element as follows, - * - * where {@link getBasePath BasePath} and {@link getBaseUrl BaseUrl} are - * configurable properties of TAssetManager. Make sure that BasePath is a namespace - * pointing to a valid directory writable by the Web server process. - * - * @author Qiang Xue - * @version $Revision: $ $Date: $ - * @package System.Web.UI - * @since 3.0 - */ -class TAssetManager extends TModule -{ - /** - * Default web accessible base path for storing private files - */ - const DEFAULT_BASEPATH='assets'; - /** - * @var string base web accessible path for storing private files - */ - private $_basePath=null; - /** - * @var string base URL for accessing the publishing directory. - */ - private $_baseUrl=null; - /** - * @var boolean whether to use timestamp checking to ensure files are published with up-to-date versions. - */ - private $_checkTimestamp=false; - /** - * @var TApplication application instance - */ - private $_application; - /** - * @var array published assets - */ - private $_published=array(); - /** - * @var boolean whether the module is initialized - */ - private $_initialized=false; - - /** - * Initializes the module. - * This method is required by IModule and is invoked by application. - * @param TXmlElement module configuration - */ - public function init($config) - { - $application=$this->getApplication(); - if($this->_basePath===null) - $this->_basePath=dirname($application->getRequest()->getPhysicalApplicationPath()).'/'.self::DEFAULT_BASEPATH; - if(!is_writable($this->_basePath) || !is_dir($this->_basePath)) - throw new TConfigurationException('assetmanager_basepath_invalid',$this->_basePath); - if($this->_baseUrl===null) - $this->_baseUrl=rtrim(dirname($application->getRequest()->getApplicationPath()),'/\\').'/'.self::DEFAULT_BASEPATH; - $application->getService()->setAssetManager($this); - $this->_initialized=true; - } - - /** - * @return string the root directory storing published asset files - */ - public function getBasePath() - { - return $this->_basePath; - } - - /** - * Sets the root directory storing published asset files. - * The directory must be in namespace format. - * @param string the root directory storing published asset files - * @throws TInvalidOperationException if the service is initialized already - */ - public function setBasePath($value) - { - if($this->_initialized) - throw new TInvalidOperationException('assetmanager_basepath_unchangeable'); - else - { - $this->_basePath=Prado::getPathOfAlias($value); - if($this->_basePath===null || !is_dir($this->_basePath) || !is_writable($this->_basePath)) - throw new TInvalidDataValueException('assetmanage_basepath_invalid',$value); - } - } - - /** - * @return string the base url that the published asset files can be accessed - */ - public function getBaseUrl() - { - return $this->_baseUrl; - } - - /** - * @param string the base url that the published asset files can be accessed - * @throws TInvalidOperationException if the service is initialized already - */ - public function setBaseUrl($value) - { - if($this->_initialized) - throw new TInvalidOperationException('assetmanager_baseurl_unchangeable'); - else - $this->_baseUrl=rtrim($value,'/'); - } - - public function getPublishedUrl($path) - { - if(($fullpath=realpath($path))!==false) - { - $dir=$this->hash(dirname($fullpath)); - $file=$this->_basePath.'/'.$dir.'/'.basename($fullpath); - if(is_file($file) || is_dir($file)) - return $this->_baseUrl.'/'.$dir.'/'.basename($fullpath); - } - return null; - } - - public function isPublished($path) - { - return $this->getPublishedUrl($path) !== null; - } - - /** - * Publishes a file or a directory (recursively). - * This method will copy the content in a directory (recursively) to - * a web accessible directory and returns the URL for the directory. - * @param string the path to be published - * @param boolean whether to use file modify time to ensure every published file is latest - * @return string an absolute URL to the published directory - */ - public function publishFilePath($path,$checkTimestamp=false) - { - if(isset($this->_published[$path])) - return $this->_published[$path]; - else if(($fullpath=realpath($path))===false) - return ''; - else if(is_file($fullpath)) - { - $dir=$this->hash(dirname($fullpath)); - $file=$this->_basePath.'/'.$dir.'/'.basename($fullpath); - if(!is_file($file) || $checkTimestamp || $this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE) - { - if(!is_dir($this->_basePath.'/'.$dir)) - @mkdir($this->_basePath.'/'.$dir); - if(!is_file($file) || @filemtime($file)<@filemtime($fullpath)) - { - Prado::trace("Publishing file $fullpath",'System.Web.UI.TAssetManager'); - @copy($fullpath,$file); - } - } - $this->_published[$path]=$this->_baseUrl.'/'.$dir.'/'.basename($fullpath); - return $this->_published[$path]; - } - else - { - $dir=$this->hash($fullpath); - if(!is_dir($this->_basePath.'/'.$dir) || $checkTimestamp || $this->getApplication()->getMode()!==TApplication::STATE_PERFORMANCE) - { - Prado::trace("Publishing directory $fullpath",'System.Web.UI.TAssetManager'); - $this->copyDirectory($fullpath,$this->_basePath.'/'.$dir); - } - $this->_published[$path]=$this->_baseUrl.'/'.$dir; - return $this->_published[$path]; - } - } - - /** - * Generate a CRC32 hash for the directory path. Collisions are higher - * than MD5 but generates a much smaller hash string. - * @param string string to be hashed. - * @return string hashed string. - */ - protected function hash($dir) - { - return sprintf('%x',crc32($dir)); - } - - /** - * Copies a directory recursively as another. - * If the destination directory does not exist, it will be created. - * File modification time is used to ensure the copied files are latest. - * @param string the source directory - * @param string the destination directory - */ - protected function copyDirectory($src,$dst) - { - if(!is_dir($dst)) - @mkdir($dst); - $folder=@opendir($src); - while($file=@readdir($folder)) - { - if($file==='.' || $file==='..') - continue; - else if(is_file($src.'/'.$file)) - { - if(@filemtime($dst.'/'.$file)<@filemtime($src.'/'.$file)) - @copy($src.'/'.$file,$dst.'/'.$file); - } - else - $this->copyDirectory($src.'/'.$file,$dst.'/'.$file); - } - closedir($folder); - } -} - -?> \ No newline at end of file diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 0ff99aa2..1ea4175d 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -10,76 +10,6 @@ * @package System.Web.UI */ -/*class TPostBackOptions extends TComponent -{ - public $_actionUrl=''; - public $_autoPostBack=false; - public $_clientSubmit=true; - public $_performValidation=false; - public $_validationGroup=''; - public $_trackFocus=false; - - public function getActionUrl() - { - return $this->_actionUrl; - } - - public function setActionUrl($value) - { - $this->_actionUrl=THttpUtility::quoteJavaScriptString($value); - } - - public function getAutoPostBack() - { - return $this->_autoPostBack; - } - - public function setAutoPostBack($value) - { - $this->_autoPostBack=$value; - } - - public function getClientSubmit() - { - return $this->_clientSubmit; - } - - public function setClientSubmit($value) - { - $this->_clientSubmit=$value; - } - - public function getPerformValidation() - { - return $this->_performValidation; - } - - public function setPerformValidation($value) - { - $this->_performValidation=$value; - } - - public function getValidationGroup() - { - return $this->_validationGroup; - } - - public function setValidationGroup($value) - { - $this->_validationGroup=$value; - } - - public function getTrackFocus() - { - return $this->_trackFocus; - } - - public function setTrackFocus($value) - { - $this->_trackFocus=$value; - } -} -*/ Prado::using('System.Web.Javascripts.*'); /** @@ -94,21 +24,21 @@ class TClientScriptManager extends TComponent { const SCRIPT_DIR='Web/Javascripts/js'; //const POSTBACK_FUNC='Prado.doPostBack'; - + private $_page; private $_hiddenFields=array(); private $_beginScripts=array(); private $_endScripts=array(); private $_scriptFiles=array(); - + //private $_headScriptFiles=array(); //private $_headScripts=array(); - + private $_styleSheetFiles=array(); private $_styleSheets=array(); - + private $_client; - + /*private $_onSubmitStatements=array(); private $_arrayDeclares=array(); private $_expandoAttributes=array(); @@ -116,17 +46,17 @@ class TClientScriptManager extends TComponent private $_focusScriptRegistered=false; private $_scrollScriptRegistered=false; */ - + private $_publishedScriptFiles=array(); - + public function __construct(TPage $owner) { $this->_page=$owner; $this->_client = new TClientScript($this); } - - + + public function registerPostBackControl($control,$namespace='Prado.WebUI') { $options = $this->getPostBackOptions($control); @@ -134,7 +64,7 @@ class TClientScriptManager extends TComponent $namespace = empty($namespace) ? "window" : $namespace; $code = "new {$namespace}.{$type}($options);"; $this->registerEndScript(sprintf('%08X', crc32($code)), $code); - + $this->registerHiddenField(TPage::FIELD_POSTBACK_TARGET,''); $this->registerHiddenField(TPage::FIELD_POSTBACK_PARAMETER,''); $this->registerClientScript('prado'); @@ -143,7 +73,7 @@ class TClientScriptManager extends TComponent protected function getPostBackOptions($control) { $postback = $control->getPostBackOptions(); - if(!isset($postback['ID'])) + if(!isset($postback['ID'])) $postback['ID'] = $control->getClientID(); if(!isset($postback['FormID'])) $postback['FormID'] = $this->_page->getForm()->getClientID(); @@ -152,7 +82,7 @@ class TClientScriptManager extends TComponent } /** - * Register a default button to panel. When the $panel is in focus and + * Register a default button to panel. When the $panel is in focus and * the 'enter' key is pressed, the $button will be clicked. * @param TControl panel to register the default button action * @param TControl button to trigger a postback @@ -180,12 +110,12 @@ class TClientScriptManager extends TComponent /** - * Register client scripts. + * Register client scripts. */ public function registerClientScript($script) { static $scripts = array(); - $scripts = array_unique(array_merge($scripts, + $scripts = array_unique(array_merge($scripts, TClientScript::getScripts($script))); $this->publishClientScriptAssets($scripts); @@ -209,9 +139,8 @@ class TClientScriptManager extends TComponent { $base = Prado::getFrameworkPath(); $clientScripts = self::SCRIPT_DIR; - $assetManager = $this->_page->getService()->getAssetManager(); $file = "{$base}/{$clientScripts}/{$lib}.js"; - $assetManager->publishFilePath($file); + $this->publishFilePath($file); $this->_publishedScriptFiles[$lib] = true; } } @@ -229,9 +158,8 @@ class TClientScriptManager extends TComponent { $base = Prado::getFrameworkPath(); $clientScripts = self::SCRIPT_DIR; - $assetManager = $this->_page->getService()->getAssetManager(); $file = "{$base}/{$clientScripts}/{$scriptFile}"; - $url= $assetManager->publishFilePath($file); + $url= $this->publishFilePath($file); $this->_publishedScriptFiles[$scriptFile] = $url; return $url; } @@ -485,7 +413,7 @@ class TClientScriptManager extends TComponent { return ""; } - + public function renderStyleSheetFiles($writer) { $str=''; @@ -535,4 +463,204 @@ class TClientScriptManager extends TComponent */ } +/** + * PradoClientScript class. + * + * Resolves Prado client script dependencies. e.g. TPradoClientScript::getScripts("dom"); + * + * - base basic javascript utilities, e.g. $() + * - dom DOM and Form functions, e.g. $F(inputID) to retrive form input values. + * - effects Effects such as fade, shake, move + * - controls Prado client-side components, e.g. Slider, AJAX components + * - validator Prado client-side validators. + * - ajax Prado AJAX library including Prototype's AJAX and JSON. + * + * Dependencies for each library are automatically resolved. + * + * Namespace: System.Web.UI + * + * @author Wei Zhuo + * @version $Revision: 1.1 $ $Date: 2005/11/06 23:02:33 $ + * @package System.Web.UI + */ +class TPradoClientScript +{ + /** + * Client-side javascript library dependencies + * @var array + */ + protected static $_dependencies = array( + 'prado' => array('prado'), + 'effects' => array('prado', 'effects'), + 'ajax' => array('prado', 'effects', 'ajax'), + 'validator' => array('prado', 'validator'), + 'logger' => array('prado', 'logger'), + 'datepicker' => array('prado', 'datepicker'), + 'rico' => array('prado', 'effects', 'ajax', 'rico'), + 'colorpicker' => array('prado', 'colorpicker') + ); + + /** + * Resolve dependencies for the given library name(s). + * @param string|array name(s) of the library to be loaded. + * @return array list of library file names (w/o extension) for the specified library name(s). + */ + public function getScripts($scripts) + { + $files = array(); + if(!is_array($scripts)) $scripts = array($scripts); + foreach($scripts as $script) + { + if(isset(self::$_dependencies[$script])) + $files = array_merge($files, self::$_dependencies[$script]); + $files[] = $script; + } + $files = array_unique($files); + return $files; + } + + + /** + * TODO: clean up + * + public function getPostBackEventReference($control,$parameter='',$options=null,$javascriptPrefix=true) + { + if(!$options || (!$options->getPerformValidation() && !$options->getTrackFocus() && $options->getClientSubmit() && $options->getActionUrl()=='')) + { + $this->registerPostBackScript(); + if(($form=$this->_page->getForm())!==null) + $formID=$form->getClientID(); + else + throw new TConfigurationException('clientscriptmanager_form_required'); + $postback=self::POSTBACK_FUNC.'(\''.$formID.'\',\''.$control->getUniqueID().'\',\''.THttpUtility::quoteJavaScriptString($parameter).'\')'; + if($options && $options->getAutoPostBack()) + $postback='setTimeout(\''.THttpUtility::quoteJavaScriptString($postback).'\',0)'; + return $javascriptPrefix?'javascript:'.$postback:$postback; + } + $opt=''; + $flag=false; + if($options->getPerformValidation()) + { + $flag=true; + $this->registerValidationScript(); + $opt.=',true,'; + } + else + $opt.=',false,'; + if($options->getValidationGroup()!=='') + { + $flag=true; + $opt.='"'.$options->getValidationGroup().'",'; + } + else + $opt.='\'\','; + if($options->getActionUrl()!=='') + { + $flag=true; + $this->_page->setCrossPagePostBack(true); + $opt.='"'.$options->getActionUrl().'",'; + } + else + $opt.='null,'; + if($options->getTrackFocus()) + { + $flag=true; + $this->registerFocusScript(); + $opt.='true,'; + } + else + $opt.='false,'; + if($options->getClientSubmit()) + { + $flag=true; + $opt.='true'; + } + else + $opt.='false'; + if(!$flag) + return ''; + $this->registerPostBackScript(); + if(($form=$this->_page->getForm())!==null) + $formID=$form->getClientID(); + else + throw new TConfigurationException('clientscriptmanager_form_required'); + $postback=self::POSTBACK_FUNC.'(\''.$formID.'\',\''.$control->getUniqueID().'\',\''.THttpUtility::quoteJavaScriptString($parameter).'\''.$opt.')'; + if($options && $options->getAutoPostBack()) + $postback='setTimeout(\''.THttpUtility::quoteJavaScriptString($postback).'\',0)'; + return $javascriptPrefix?'javascript:'.$postback:$postback; + }*/ + +} + +/*class TPostBackOptions extends TComponent +{ + public $_actionUrl=''; + public $_autoPostBack=false; + public $_clientSubmit=true; + public $_performValidation=false; + public $_validationGroup=''; + public $_trackFocus=false; + + public function getActionUrl() + { + return $this->_actionUrl; + } + + public function setActionUrl($value) + { + $this->_actionUrl=THttpUtility::quoteJavaScriptString($value); + } + + public function getAutoPostBack() + { + return $this->_autoPostBack; + } + + public function setAutoPostBack($value) + { + $this->_autoPostBack=$value; + } + + public function getClientSubmit() + { + return $this->_clientSubmit; + } + + public function setClientSubmit($value) + { + $this->_clientSubmit=$value; + } + + public function getPerformValidation() + { + return $this->_performValidation; + } + + public function setPerformValidation($value) + { + $this->_performValidation=$value; + } + + public function getValidationGroup() + { + return $this->_validationGroup; + } + + public function setValidationGroup($value) + { + $this->_validationGroup=$value; + } + + public function getTrackFocus() + { + return $this->_trackFocus; + } + + public function setTrackFocus($value) + { + $this->_trackFocus=$value; + } +} +*/ + ?> \ No newline at end of file diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index 49ba629f..4f905a1a 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -296,21 +296,6 @@ class TControl extends TComponent return $this->getPage(); } - /** - * Publishes a private asset and gets its URL. - * This method will publish a private asset (file or directory) - * and gets the URL to the asset. Note, if the asset refers to - * a directory, all contents under that directory will be published. - * @param string path of the asset that is relative to the directory containing the control class file. - * @return string URL to the asset path. - */ - public function getAsset($assetPath) - { - $class=new ReflectionClass(get_class($this)); - $assetPath=dirname($class->getFileName()).'/'.$assetPath; - return $this->getService()->getAsset($assetPath); - } - /** * Returns the id of the control. * Control ID can be either manually set or automatically generated. diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index 4c71de51..67bda1b2 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -182,10 +182,6 @@ class TTemplate extends TComponent implements ITemplate * @var string template file path (if available) */ private $_tplFile=null; - /** - * @var TAssetManager asset manager - */ - private $_assetManager; /** * @var integer the line number that parsing starts from (internal use) */ @@ -264,7 +260,6 @@ class TTemplate extends TComponent implements ITemplate { if(($page=$tplControl->getPage())===null) $page=$this->getService()->getRequestedPage(); - $this->_assetManager=$this->getService()->getAssetManager(); $controls=array(); foreach($this->_tpl as $key=>$object) { @@ -376,7 +371,7 @@ class TTemplate extends TComponent implements ITemplate $component->$setter($value[1]); break; case self::CONFIG_ASSET: // asset URL - $url=$this->_assetManager->publishFilePath($this->_contextPath.'/'.$value[1]); + $url=$this->publishFilePath($this->_contextPath.'/'.$value[1]); $component->$setter($url); break; case self::CONFIG_PARAMETER: // application parameter @@ -416,7 +411,7 @@ class TTemplate extends TComponent implements ITemplate $component->setSubProperty($name,$value[1]); break; case self::CONFIG_ASSET: // asset URL - $url=$this->_assetManager->publishFilePath($this->_contextPath.'/'.$value[1]); + $url=$this->publishFilePath($this->_contextPath.'/'.$value[1]); $component->setSubProperty($name,$url); break; case self::CONFIG_PARAMETER: // application parameter 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