From d042fed88e7ed55e2a7deee037c8073e6c545290 Mon Sep 17 00:00:00 2001
From: "Christophe.Boulain" <>
Date: Wed, 8 Apr 2009 07:06:36 +0000
Subject: Fixed Issue#136
---
HISTORY | 3 ++-
.../source/prado/activecontrols/activedatepicker.js | 3 ++-
framework/Web/UI/ActiveControls/TActiveDatePicker.php | 7 ++++---
.../active-controls/protected/pages/ActiveDatePicker.page | 8 ++++++++
.../active-controls/protected/pages/ActiveDatePicker.php | 4 ++++
.../active-controls/tests/ActiveDatePickerTestCase.php | 15 ++++++++++++++-
6 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/HISTORY b/HISTORY
index 115e1496..fe699f42 100644
--- a/HISTORY
+++ b/HISTORY
@@ -12,7 +12,8 @@ BUG: Issue#107 - typo in TDbConnection::getCharset() (Christophe)
BUG: Issue#126 - THtmlArea: boolean options output as strings (Christophe)
BUG: Issue#127 - TDataSourceConfig::findConnectionByID try to access private var (Cristophe)
BUG: Issue#129 - TDbLogRoute::init don't close the sql command (Christophe)
-Bug: Issue#130 - TDbLogRoute::processLogs wrong values binding (Christophe)
+BUG: Issue#130 - TDbLogRoute::processLogs wrong values binding (Christophe)
+BUG: Issue#136 - TActiveDatePicker don't callback when ShowCalendar is false (Christophe)
CHG: Issue#7 - Clients Scripts are not combined anymore in Debug application mode (Christophe)
ENH: Issue#115 - Registry for Prado generated clientside counterparts of serverside controls (Yves Berkholz)
ENH: Added caching of message files to TException (Michael)
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js b/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js
index 87b48bf3..3aacda21 100755
--- a/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js
+++ b/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js
@@ -33,7 +33,8 @@ Prado.WebUI.TActiveDatePicker = Class.extend(Prado.WebUI.TDatePicker,
Object.extend(this,options);
- Event.observe(this.trigger, triggerEvent, this.show.bindEvent(this));
+ if (this.options.ShowCalendar)
+ Event.observe(this.trigger, triggerEvent, this.show.bindEvent(this));
// Listen to change event
if(this.options.InputMode == "TextBox")
diff --git a/framework/Web/UI/ActiveControls/TActiveDatePicker.php b/framework/Web/UI/ActiveControls/TActiveDatePicker.php
index 052ed199..4ef43198 100755
--- a/framework/Web/UI/ActiveControls/TActiveDatePicker.php
+++ b/framework/Web/UI/ActiveControls/TActiveDatePicker.php
@@ -39,6 +39,7 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I
protected function getDatePickerOptions(){
$options = parent::getDatePickerOptions();
$options['EventTarget'] = $this->getUniqueID();
+ $options['ShowCalendar'] = $this->getShowCalendar();
return $options;
}
@@ -108,8 +109,8 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I
*/
protected function registerCalendarClientScript()
{
- if($this->getShowCalendar())
- {
+ // if($this->getShowCalendar())
+ // {
$cs = $this->getPage()->getClientScript();
$cs->registerPradoScript("activedatepicker");
@@ -123,7 +124,7 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I
$options = TJavaScript::encode($this->getDatePickerOptions());
$code = "new Prado.WebUI.TActiveDatePicker($options);";
$cs->registerEndScript("prado:".$this->getClientID(), $code);
- }
+ // }
}
}
?>
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page
index ed35293e..64f37867 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page
@@ -11,6 +11,14 @@
+ShowCalendar=false +
+
+
+