From 6da2f379b1b4ddd0c27db2185ca7408b43a9a97a Mon Sep 17 00:00:00 2001 From: wei <> Date: Mon, 16 Jan 2006 05:24:58 +0000 Subject: --- framework/Web/UI/TClientScriptManager.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'framework/Web/UI/TClientScriptManager.php') diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index acbe7f20..c5b828dc 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -249,7 +249,7 @@ class TClientScriptManager extends TComponent $this->_postBackScriptRegistered=true; $this->registerHiddenField(TPage::FIELD_POSTBACK_TARGET,''); $this->registerHiddenField(TPage::FIELD_POSTBACK_PARAMETER,''); - $this->registerPradoScript('base'); + $this->registerPradoScript('prado'); } } @@ -258,7 +258,7 @@ class TClientScriptManager extends TComponent if(!$this->_focusScriptRegistered) { $this->_focusScriptRegistered=true; - $this->registerPradoScript('base'); + $this->registerPradoScript('prado'); $this->registerEndScript('prado:focus','Prado.Focus.setFocus("'.THttpUtility::quoteJavaScriptString($target).'");'); } } @@ -274,10 +274,12 @@ class TClientScriptManager extends TComponent } } - public function registerDefaultButtonScript($button) + public function registerDefaultButtonScript($source, $target) { $this->registerPradoScript('prado'); - return 'return Prado.Button.fireButton(event,\''.$button->getClientID().'\')'; + $button = $target->getClientID(); + $panel = $source->getClientID(); + return "Event.observe('{$panel}', 'keypress', Prado.Button.fireButton.bindEvent($('{$panel}'), '$button'));"; } public function registerValidationScript() -- cgit v1.2.3