summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
authorxue <>2006-01-12 23:01:44 +0000
committerxue <>2006-01-12 23:01:44 +0000
commit4ece066e7c05ae6c1e29c96784374f5d02aa3015 (patch)
tree9994b8074d59a7942401de925d6427b2b6bb1c5e /framework/Web/UI/WebControls
parent1503b7c7c90f06d75929fe47fc6ee478d447ae9c (diff)
Moved geshi to 3rdParty
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TTextHighlighter.php11
1 files changed, 7 insertions, 4 deletions
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);
}
}