From 27578bac69d64900e8b252bd5a61a2c5d2b13ee8 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 26 Mar 2006 23:47:19 +0000 Subject: Added tutorial for TTextHighlighter. --- framework/Web/UI/WebControls/TColorPicker.php | 2 ++ framework/Web/UI/WebControls/TTextHighlighter.php | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'framework/Web') diff --git a/framework/Web/UI/WebControls/TColorPicker.php b/framework/Web/UI/WebControls/TColorPicker.php index 3488c912..f222e4ce 100644 --- a/framework/Web/UI/WebControls/TColorPicker.php +++ b/framework/Web/UI/WebControls/TColorPicker.php @@ -13,6 +13,8 @@ /** * TColorPicker class. * + * Be aware, this control is EXPERIMENTAL and may have significant change in future versions. + * * @author Wei Zhuo * @version $Revision: $ $Date: $ * @package System.Web.UI.WebControls 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'); } /** -- cgit v1.2.3