summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2013-11-20 21:32:47 +0100
committerFabio Bas <ctrlaltca@gmail.com>2013-11-21 17:46:09 +0100
commit9342b70444cec0db1d281fd2a03fe5d06f1ef646 (patch)
tree4320510f8ed4f87d98e53d30cf89ecbde1c9336d /framework/Web
parent1f8a1f7381b76c4c2b43437ebc7e30100a4bb36d (diff)
Fixed TControl::focus()
Diffstat (limited to 'framework/Web')
-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);