From d830818a513a255e2ae047e7d0057238aa462f3d Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 20 Feb 2006 05:16:06 +0000 Subject: TPage::setFocus is working. --- framework/Web/UI/TClientScriptManager.php | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) (limited to 'framework/Web/UI/TClientScriptManager.php') diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 180106ce..2fe67308 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -75,7 +75,6 @@ class TClientScriptManager extends TApplicationComponent * @var array registered PRADO script files */ private $_registeredPradoFiles=array(); - /** * Client-side javascript library dependencies * @var array @@ -420,36 +419,11 @@ class TClientScriptManager extends TApplicationComponent $writer->write("
\n".$str."
\n"); } -/* public function registerClientEvent($control, $event, $code) - { - if(empty($code)) return; - $this->registerPradoScript("prado"); - $script= "Event.observe('{$control->ClientID}', '{$event}', function(e){ {$code} });"; - $key = "prado:{$control->ClientID}:{$event}"; - $this->registerEndScript($key, $script); - } - public function registerFocusScript($target) { - if(!$this->_focusScriptRegistered) - { - $this->_focusScriptRegistered=true; - $this->registerPradoScript('prado'); - $this->registerEndScript('prado:focus','Prado.Focus.setFocus("'.THttpUtility::quoteJavaScriptString($target).'");'); - } - } - - public function registerScrollScript($x,$y) - { - if(!$this->_scrollScriptRegistered) - { - $this->_scrollScriptRegistered=true; - $this->registerHiddenField(TPage::FIELD_SCROLL_X,$x); - $this->registerHiddenField(TPage::FIELD_SCROLL_Y,$y); - // TBD, need scroll.js - } + $this->registerPradoScript('prado'); + $this->registerEndScript('prado:focus','Prado.Focus.setFocus("'.TJavaScript::quoteString($target).'");'); } -*/ } ?> \ No newline at end of file -- cgit v1.2.3