[Jifty-commit] jifty branch, js-refactor, updated. 86d839a03bc1bc7ecd69d94a7e12006d37904623
Jifty commits
jifty-commit at lists.jifty.org
Fri Jan 15 14:42:14 EST 2010
The branch, js-refactor has been updated
via 86d839a03bc1bc7ecd69d94a7e12006d37904623 (commit)
from 4c4b07b3b305f909e17f6caa15ffee405f6b7f70 (commit)
Summary of changes:
lib/Jifty/Web/Form/Field.pm | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 86d839a03bc1bc7ecd69d94a7e12006d37904623
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jan 15 14:42:10 2010 -0500
Move to jQuery event handling from JSAN
diff --git a/lib/Jifty/Web/Form/Field.pm b/lib/Jifty/Web/Form/Field.pm
index 5583a6e..8b9ac8a 100644
--- a/lib/Jifty/Web/Form/Field.pm
+++ b/lib/Jifty/Web/Form/Field.pm
@@ -722,8 +722,8 @@ sub focus_javascript {
my $self = shift;
return undef;
if($self->focus) {
- return qq!document.getElementById("@{[$self->element_id]}").focus()!;
- return qq!DOM.Events.addListener( window, "load", function(){document.getElementById("@{[$self->element_id]}").focus()})!;
+ return qq!document.getElementById("@{[$self->element_id]}").focus();!;
+ return qq!jQuery(document).ready(function(){jQuery("#@{[$self->element_id]}").focus()});!;
}
}
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list