diff options
author | xue <> | 2006-03-26 23:47:19 +0000 |
---|---|---|
committer | xue <> | 2006-03-26 23:47:19 +0000 |
commit | 27578bac69d64900e8b252bd5a61a2c5d2b13ee8 (patch) | |
tree | 15b934238c20467a257b88d72a4df2f3beeefdd3 /framework/Web/UI/WebControls/TTextHighlighter.php | |
parent | b1323f31af5dea42c99385c2c50d9e664fbce847 (diff) |
Added tutorial for TTextHighlighter.
Diffstat (limited to 'framework/Web/UI/WebControls/TTextHighlighter.php')
-rw-r--r-- | framework/Web/UI/WebControls/TTextHighlighter.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/framework/Web/UI/WebControls/TTextHighlighter.php b/framework/Web/UI/WebControls/TTextHighlighter.php index 4aa01dc4..6fb1ddbb 100644 --- a/framework/Web/UI/WebControls/TTextHighlighter.php +++ b/framework/Web/UI/WebControls/TTextHighlighter.php @@ -84,8 +84,7 @@ class TTextHighlighter extends TWebControl public function onPreRender($writer)
{
parent::onPreRender($writer);
- $this->registerHighlightStyleSheet();
- $this->getPage()->getClientScript()->registerPradoScript('prado');
+ $this->registerHighlightScripts();
}
/**
@@ -114,11 +113,12 @@ class TTextHighlighter extends TWebControl }
/**
- * Register CSS style sheet file.
+ * Register CSS stylesheet file and javascript file.
+ * @throws TConfigurationException if highlight.css file cannot be found
*/
- protected function registerHighlightStyleSheet()
+ protected function registerHighlightScripts()
{
- $cs = $this->getPage()->getClientScript();
+ $cs=$this->getPage()->getClientScript();
$cssKey='prado:TTextHighlighter';
if(!$cs->isStyleSheetFileRegistered($cssKey))
{
@@ -127,6 +127,7 @@ class TTextHighlighter extends TWebControl $styleSheet = $this->publishFilePath($cssFile);
$cs->registerStyleSheetFile($cssKey, $styleSheet);
}
+ $cs->registerPradoScript('prado');
}
/**
|