summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TDatePicker.php
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-06-25 09:08:40 +0000
committerctrlaltca@gmail.com <>2011-06-25 09:08:40 +0000
commitcda44920115f2aadd7c3fbe2df13cb48a2cbc0c5 (patch)
treeb367d872dcf3cec40497f4d6755ce7bb47312058 /framework/Web/UI/WebControls/TDatePicker.php
parent87e7366d4d9d3de79772b851f8772a4011d6227d (diff)
applied further "progressive rendering" patches (#235)
added TFlushOutput component fixed THtmlarea quickstart demo
Diffstat (limited to 'framework/Web/UI/WebControls/TDatePicker.php')
-rw-r--r--framework/Web/UI/WebControls/TDatePicker.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php
index 2f9758d1..1dabb7ce 100644
--- a/framework/Web/UI/WebControls/TDatePicker.php
+++ b/framework/Web/UI/WebControls/TDatePicker.php
@@ -407,6 +407,7 @@ class TDatePicker extends TTextBox
$page->registerPostDataLoader($uniqueID.TControl::ID_SEPARATOR.'year');
}
$this->publishCalendarStyle();
+ $this->registerCalendarClientScriptPre();
}
/**
@@ -427,7 +428,7 @@ class TDatePicker extends TTextBox
$this->renderDropDownListCalendar($writer);
if($this->hasDayPattern())
{
- $this->registerCalendarClientScript();
+ $this->registerCalendarClientScriptPost();
$this->renderDatePickerButtons($writer);
}
}
@@ -840,20 +841,27 @@ class TDatePicker extends TTextBox
{
parent::addAttributesToRender($writer);
$writer->addAttribute('id',$this->getClientID());
- $this->registerCalendarClientScript();
+ $this->registerCalendarClientScriptPost();
}
/**
* Registers the javascript code to initialize the date picker.
*/
- protected function registerCalendarClientScript()
+ protected function registerCalendarClientScriptPre()
{
if($this->getShowCalendar())
{
$cs = $this->getPage()->getClientScript();
$cs->registerPradoScript("datepicker");
+ }
+ }
+ protected function registerCalendarClientScriptPost()
+ {
+ if($this->getShowCalendar())
+ {
+ $cs = $this->getPage()->getClientScript();
if(!$cs->isEndScriptRegistered('TDatePicker.spacer'))
{
$spacer = $this->getAssetUrl('spacer.gif');