Ticket #10573: 10573_r12827.diff

File 10573_r12827.diff, 728 bytes (added by copelco, 5 years ago)

update using jquery

  • django/contrib/admin/templates/admin/change_form.html

     
    5656{% submit_row %}
    5757
    5858{% if adminform and add %}
    59    <script type="text/javascript">document.getElementById("{{ adminform.first_field.auto_id }}").focus();</script>
     59    <script type="text/javascript">
     60    (function($) {
     61        $(document).ready(function($) {
     62            $("input:visible:enabled:first").focus();
     63        });
     64    })(jQuery.noConflict());
     65    </script>
    6066{% endif %}
    6167
    6268{# JavaScript for prepopulated fields #}
Back to Top