Opened 5 years ago
Closed 5 years ago
#31483 closed Cleanup/optimization (fixed)
Remove admin change_form.js dependency on jQuery.
Reported by: | Jon Dufresne | Owned by: | Jon Dufresne |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
https://github.com/django/django/blob/3.0/django/contrib/admin/static/admin/js/change_form.js
The file currently uses jQuery for two purposes:
- To add an onclick handler to elements with the
add-another
class. This event handler has been unused since 07988744b347302925bc6cc66511e34224db55ab (Django 1.8) when the class was removed. Rather than porting and maintaining this code block, it can be removed.
- To find the first visible, enabled input and then focus it. This code is simple enough to port.
Change History (4)
comment:1 by , 5 years ago
Has patch: | set |
---|
comment:2 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
Note:
See TracTickets
for help on using tickets.
https://github.com/django/django/pull/12757