diff options
author | wei <> | 2006-09-01 01:58:35 +0000 |
---|---|---|
committer | wei <> | 2006-09-01 01:58:35 +0000 |
commit | 452fdf99810fae93d3e8735cc9be5e9cbd4b0622 (patch) | |
tree | 47c243a867335bcbe348f2ea029cff257db1db81 | |
parent | 769856093ded9e4aae341a7d79b7f1441e7d5478 (diff) |
resolve adodb defined clashes, add TCallbackClientScript::fireEvent()
7 files changed, 39 insertions, 5 deletions
diff --git a/demos/time-tracker/protected/application.xml b/demos/time-tracker/protected/application.xml index 80ad5ded..40619257 100644 --- a/demos/time-tracker/protected/application.xml +++ b/demos/time-tracker/protected/application.xml @@ -21,6 +21,10 @@ EnableConfigCache="true"
configFile="Application.App_Data.sqlite-sqlmap" />
+ <module id="globalization"
+ class="System.I18N.TGlobalization"
+ Charset="UTF-8" />
+
<!--
<module id="sqlmap" class="TSQLMap"
EnableConfigCache="true"
diff --git a/framework/3rdParty/adodb/adodb-time.inc.php b/framework/3rdParty/adodb/adodb-time.inc.php index 51f69f76..195998c2 100644 --- a/framework/3rdParty/adodb/adodb-time.inc.php +++ b/framework/3rdParty/adodb/adodb-time.inc.php @@ -383,7 +383,8 @@ define('ADODB_DATE_VERSION',0.24); http://lists.debian.org/debian-glibc/2002/debian-glibc-200205/msg00010.html */ -if (!defined('ADODB_ALLOW_NEGATIVE_TS')) define('ADODB_NO_NEGATIVE_TS',1); +if (!defined('ADODB_ALLOW_NEGATIVE_TS') + && !defined('ADODB_NO_NEGATIVE_TS')) define('ADODB_NO_NEGATIVE_TS',1); function adodb_date_test_date($y1,$m,$d=13) { diff --git a/framework/Util/TDateTimeStamp.php b/framework/Util/TDateTimeStamp.php index 6a5bd9e6..d7093ec3 100644 --- a/framework/Util/TDateTimeStamp.php +++ b/framework/Util/TDateTimeStamp.php @@ -28,8 +28,8 @@ http://lists.debian.org/debian-glibc/2002/debian-glibc-200205/msg00010.html
*/
-if (!defined('ADODB_ALLOW_NEGATIVE_TS')) define('ADODB_NO_NEGATIVE_TS',1);
-
+if (!defined('ADODB_ALLOW_NEGATIVE_TS')
+ && !defined('ADODB_NO_NEGATIVE_TS')) define('ADODB_NO_NEGATIVE_TS',1);
/**
* TDateTimeStamp Class
*
diff --git a/framework/Web/UI/ActiveControls/TBaseActiveControl.php b/framework/Web/UI/ActiveControls/TBaseActiveControl.php index ed2e50db..0c54521d 100644 --- a/framework/Web/UI/ActiveControls/TBaseActiveControl.php +++ b/framework/Web/UI/ActiveControls/TBaseActiveControl.php @@ -302,6 +302,23 @@ class TBaseActiveCallbackControl extends TBaseActiveControl }
/**
+ * @param mixed callback parameter value.
+ */
+ public function setCallbackParameter($value)
+ {
+ $this->setOption('CallbackParameter', $value, '');
+ }
+
+ /**
+ * @return mixed callback parameter value.
+ */
+ public function getCallbackParameter()
+ {
+ return $this->getOption('CallbackParameter', '');
+ }
+
+
+ /**
* @return array list of callback javascript options.
*/
protected function getClientSideOptions()
@@ -311,6 +328,7 @@ class TBaseActiveCallbackControl extends TBaseActiveControl $validate = $this->getCausesValidation();
$options['CausesValidation']= $validate ? '' : false;
$options['ValidationGroup']=$this->getValidationGroup();
+ $options['params'] = $this->getCallbackParameter();
return $options;
}
diff --git a/framework/Web/UI/ActiveControls/TCallbackClientScript.php b/framework/Web/UI/ActiveControls/TCallbackClientScript.php index bdbe6b1c..498aa681 100644 --- a/framework/Web/UI/ActiveControls/TCallbackClientScript.php +++ b/framework/Web/UI/ActiveControls/TCallbackClientScript.php @@ -146,6 +146,17 @@ class TCallbackClientScript extends TApplicationComponent }
/**
+ * Raise the client side event (given by $eventName) on a particular element.
+ * @param TControl|string control element or element id
+ * @param string Event name, e.g. "click"
+ */
+ public function raiseClientEvent($control, $eventName)
+ {
+ $this->callClientFunction('Event.fireEvent',
+ array($control, strtolower($eventName)));
+ }
+
+ /**
* Sets the attribute of a particular control.
* @param TControl|string control element or element id
* @param string attribute name
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page index 468a524e..7ab4bab9 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page @@ -14,7 +14,7 @@ { Event.observe($("div1"), "click", function() { - Prado.Callback("<%= $this->callback1->ClientID %>") + Prado.Callback("<%= $this->callback1->UniqueID %>") }) }) </script> diff --git a/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page b/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page index d8eacf15..9d3a3d61 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page +++ b/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page @@ -19,7 +19,7 @@ { Event.observe($("div1"), "click", function() { - Prado.Callback("<%= $this->callback1->ClientID %>") + Prado.Callback("<%= $this->callback1->UniqueID %>") }) }) </script> |