From 99ecc26ddd9c6f0233aff2770e82c9db80fd0b4c Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 31 Jan 2006 01:30:28 +0000 Subject: All events are now defined with public on-functions. This is to comply with the new change introduced since 5.1. --- framework/Web/UI/WebControls/TDatePicker.php | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'framework/Web/UI/WebControls/TDatePicker.php') diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index 60cf882d..30b14add 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -18,7 +18,7 @@ * When the text box receives focus, a calendar will pop up and users can * pick up from it a date that will be automatically entered into the text box. * The format of the date string displayed in the text box is determined by - * the DateFormat property. Valid formats are the combination of the + * the DateFormat property. Valid formats are the combination of the * following tokens, * * @@ -34,14 +34,14 @@ * ----------------------------------------- * * - * TDatePicker has three Mode to show the date picker popup. - * - * # Basic -- Only shows a text input, focusing on the input shows the + * TDatePicker has three Mode to show the date picker popup. + * + * # Basic -- Only shows a text input, focusing on the input shows the * date picker. * # Button -- Shows a button next to the text input, clicking on the - * button shows the date, button text can be by the + * button shows the date, button text can be by the * ButtonText property - * # ImageButton -- Shows an image next to the text input, clicking on + * # ImageButton -- Shows an image next to the text input, clicking on * the image shows the date picker, image source can be * change through the ImageUrl property. * @@ -89,7 +89,7 @@ class TDatePicker extends TTextBox { $this->setViewState('ShowCalendar',TPropertyValue::ensureBoolean($value),true); } - + /** * Gets the current culture. * @return string current culture, e.g. en_AU. @@ -140,7 +140,7 @@ class TDatePicker extends TTextBox } /** - * @param string set the calendar style + * @param string set the calendar style */ public function setCalendarStyle($value) { @@ -153,7 +153,7 @@ class TDatePicker extends TTextBox public function getCalendarStyle() { return $this->getViewState('CalendarStyle', 'default'); - } + } /** * Set the first day of week, with 0 as Sunday, 1 as Monday, etc. @@ -233,7 +233,7 @@ class TDatePicker extends TTextBox $options['UpToYear'] = $this->getUpToYear(); if($this->getMode()!=='Basic') $options['Trigger'] = $this->getDatePickerButtonID(); - + $options = array_merge($options, $this->getCulturalOptions()); return $options; } @@ -247,7 +247,7 @@ class TDatePicker extends TTextBox $app = $this->getApplication()->getGlobalization(); $culture = $this->getCulture() == '' ? $app->getCulture() : $this->getCulture(); if($culture == 'en') return array(); - + //expensive operations Prado::using('System.I18N.core.DateTimeFormatInfo'); $info = Prado::createComponent('System.I18N.core.CultureInfo', $culture); @@ -262,7 +262,7 @@ class TDatePicker extends TTextBox /** * Publish the date picker Css asset files. */ - protected function OnPreRender($param) + public function onPreRender($param) { parent::onPreRender($param); $this->publishCalendarStyle(); @@ -281,7 +281,7 @@ class TDatePicker extends TTextBox { case 'Button': $this->renderButtonDatePicker($writer); break; case 'ImageButton' : $this->renderImageButtonDatePicker($writer); break; - + } } @@ -300,7 +300,7 @@ class TDatePicker extends TTextBox */ protected function renderButtonDatePicker($writer) { - $writer->addAttribute('id', $this->getDatePickerButtonID()); + $writer->addAttribute('id', $this->getDatePickerButtonID()); $writer->addAttribute('type', 'button'); $writer->addAttribute('class', $this->getCssClass().' TDatePickerButton'); $writer->addAttribute('value',$this->getButtonText()); @@ -340,7 +340,7 @@ class TDatePicker extends TTextBox protected function publishCalendarStyle() { $cs = $this->getPage()->getClientScript(); - $style = 'System.Web.Javascripts.datepicker.'.$this->getCalendarStyle(); + $style = 'System.Web.Javascripts.datepicker.'.$this->getCalendarStyle(); $cssFile=Prado::getPathOfNamespace($style,'.css'); $url = $this->getService()->getAsset($cssFile); if(!$cs->isStyleSheetFileRegistered($style)) @@ -350,7 +350,7 @@ class TDatePicker extends TTextBox /** * Registers the javascript code to initialize the date picker. - * Must use "Event.OnLoad" to initialize the date picker when the + * Must use "Event.OnLoad" to initialize the date picker when the * full page is loaded, otherwise IE will throw an error. * @param THtmlWriter writer */ -- cgit v1.2.3