summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TClientScriptManager.php
diff options
context:
space:
mode:
authorwei <>2006-05-06 02:26:20 +0000
committerwei <>2006-05-06 02:26:20 +0000
commita7f6c6640ac9295eec3ae2edbb2250179eb85e33 (patch)
tree8a3879c747dfc3bcd5d65f334341ea7c81ced268 /framework/Web/UI/TClientScriptManager.php
parent46155621cbf97191fca495cbd09a2eedd82afa82 (diff)
Adding TActiveButton and TActiveTextBox
Diffstat (limited to 'framework/Web/UI/TClientScriptManager.php')
-rw-r--r--framework/Web/UI/TClientScriptManager.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php
index 20612ce2..cad317ef 100644
--- a/framework/Web/UI/TClientScriptManager.php
+++ b/framework/Web/UI/TClientScriptManager.php
@@ -177,16 +177,33 @@ class TClientScriptManager extends TApplicationComponent
}
/**
+ * Registers callback javascript for a control.
+ * @param string javascript class responsible for the control being registered for callback
+ * @param array callback options
+ */
+ public function registerCallbackControl($class, $options)
+ {
+ $optionString=TJavaScript::encode($options);
+ $code="new Prado.WebUI.{$class}({$optionString});";
+ $this->_endScripts[sprintf('%08X', crc32($code))]=$code;
+ $this->registerPradoScriptInternal('ajax');
+
+ $params=func_get_args();
+ foreach($this->_page->getCachingStack() as $item)
+ $item->registerAction('Page.ClientScript','registerCallbackControl',$params);
+ }
+
+ /**
* Registers postback javascript for a control.
* @param string javascript class responsible for the control being registered for postback
* @param array postback options
*/
- public function registerPostBackControl($jsClass,$options)
+ public function registerPostBackControl($class,$options)
{
if(!isset($options['FormID']) && ($form=$this->_page->getForm())!==null)
$options['FormID']=$form->getClientID();
$optionString=TJavaScript::encode($options);
- $code="new $jsClass($optionString);";
+ $code="new Prado.WebUI.{$class}({$optionString});";
$this->_endScripts[sprintf('%08X', crc32($code))]=$code;
$this->_hiddenFields[TPage::FIELD_POSTBACK_TARGET]='';