From 4ece066e7c05ae6c1e29c96784374f5d02aa3015 Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 12 Jan 2006 23:01:44 +0000 Subject: Moved geshi to 3rdParty --- framework/Web/UI/WebControls/TTextHighlighter.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'framework/Web/UI/WebControls/TTextHighlighter.php') diff --git a/framework/Web/UI/WebControls/TTextHighlighter.php b/framework/Web/UI/WebControls/TTextHighlighter.php index 800d5246..56ae406e 100644 --- a/framework/Web/UI/WebControls/TTextHighlighter.php +++ b/framework/Web/UI/WebControls/TTextHighlighter.php @@ -13,7 +13,7 @@ /** * Using GeSHi and TTextWriter classes */ -Prado::using('System.Web.UI.WebControls.Highlighter.geshi'); +Prado::using('System.3rdParty.geshi.geshi'); Prado::using('System.IO.TTextWriter'); /** @@ -52,11 +52,13 @@ class TTextHighlighter extends TWebControl /** * @param string language whose syntax is to be used for highlighting. - * Valid values include 'php','prado','css','html','javascript','xml'. + * Valid values are those file names (without suffix) that are contained + * in '3rdParty/geshi/geshi' (e.g. 'php','prado','css','html','javascript', + * 'xml'.) */ public function setLanguage($value) { - $this->setViewState('Language', TPropertyValue::ensureEnum($value,'php','prado','css','html','javascript','xml'), 'php'); + $this->setViewState('Language', $value, 'php'); } /** @@ -120,7 +122,8 @@ class TTextHighlighter extends TWebControl $cssKey='prado:TTextHighlighter'; if(!$cs->isStyleSheetFileRegistered($cssKey)) { - $styleSheet = $this->getAsset('Highlighter/code_highlight.css'); + $cssFile=Prado::getPathOfNamespace('System.3rdParty.geshi.highlight','.css'); + $styleSheet = $this->getService()->getAsset($cssFile); $cs->registerStyleSheetFile($cssKey, $styleSheet); } } -- cgit v1.2.3