mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Make form input auto-focus declarative.
This commit is contained in:
@@ -705,9 +705,4 @@ $(document).ready( function() {
|
||||
return anchor;
|
||||
});
|
||||
|
||||
// Auto Focus on first item on form
|
||||
if ( $("*:focus").html() == null ) {
|
||||
$(":input:not([type=hidden]):visible:enabled:first").focus();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -73,6 +73,18 @@
|
||||
image_path: '${h.url_for( "/static/images" )}'
|
||||
});
|
||||
</script>
|
||||
|
||||
%if not form_input_auto_focus is UNDEFINED and form_input_auto_focus:
|
||||
<script type="text/javascript">
|
||||
$(document).ready( function() {
|
||||
// Auto Focus on first item on form
|
||||
if ( $("*:focus").html() == null ) {
|
||||
$(":input:not([type=hidden]):visible:enabled:first").focus();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
%endif
|
||||
|
||||
</%def>
|
||||
|
||||
## Additional metas can be defined by templates inheriting from this one.
|
||||
|
||||
Reference in New Issue
Block a user