summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TClientScriptManager.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2013-11-20 21:32:47 +0100
committerFabio Bas <ctrlaltca@gmail.com>2013-11-26 11:42:50 +0100
commit926287d5bac1e1c9f58143611ad725e8324cfdac (patch)
tree33e83d48d1510f0569c039cff2f88089c04352ba /framework/Web/UI/TClientScriptManager.php
parent92d42a3c00836ba5f74fa829bcedd595614d6f3e (diff)
Fixed TControl::focus()
Diffstat (limited to 'framework/Web/UI/TClientScriptManager.php')
-rw-r--r--framework/Web/UI/TClientScriptManager.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php
index 80a71ea0..a9f6c5b4 100644
--- a/framework/Web/UI/TClientScriptManager.php
+++ b/framework/Web/UI/TClientScriptManager.php
@@ -340,11 +340,10 @@ class TClientScriptManager extends TApplicationComponent
*/
public function registerFocusControl($target)
{
- $this->registerPradoScriptInternal('effects');
+ $this->registerPradoScriptInternal('jquery');
if($target instanceof TControl)
$target=$target->getClientID();
- $id = TJavaScript::quoteString($target);
- $this->_endScripts['prado:focus'] = 'new Effect.ScrollTo('.$id.'); Prado.Element.focus('.$id.');';
+ $this->_endScripts['prado:focus'] = 'new Prado.Element.scrollTo(\''.$target.'\'); jQuery(\'#'.$target.'\').focus();';
$params=func_get_args();
$this->_page->registerCachingAction('Page.ClientScript','registerFocusControl',$params);