diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Web/UI/TClientScriptManager.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 9a83c550..75effa50 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -194,10 +194,12 @@ class TClientScriptManager extends TApplicationComponent */ public function registerFocusControl($target) { - $this->registerPradoScript('prado'); + $this->registerPradoScript('effects'); if($target instanceof TControl) $target=$target->getClientID(); - $this->registerEndScript('prado:focus','Prado.Focus.setFocus("'.TJavaScript::quoteString($target).'");'); + $id = TJavaScript::quoteString($target); + $script = 'new Effect.ScrollTo("'.$id.'"); Prado.Element.focus("'.$id.'");'; + $this->registerEndScript('prado:focus',$script); } /** |