summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TClientScriptManager.php
diff options
context:
space:
mode:
authorxue <>2006-02-20 05:16:06 +0000
committerxue <>2006-02-20 05:16:06 +0000
commitd830818a513a255e2ae047e7d0057238aa462f3d (patch)
treec05774f6e0ec899026708d5581611ce100169f37 /framework/Web/UI/TClientScriptManager.php
parent4ed5ce91c7b1c0e6e5262734711f630ee82e3f1c (diff)
TPage::setFocus is working.
Diffstat (limited to 'framework/Web/UI/TClientScriptManager.php')
-rw-r--r--framework/Web/UI/TClientScriptManager.php30
1 files changed, 2 insertions, 28 deletions
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("<div>\n".$str."</div>\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