Opened 5 years ago

Closed 5 years ago

#31013 closed Cleanup/optimization (fixed)

Remove jQuery dependency from SelectBox.js

Reported by: Johannes Maron Owned by: Johannes Maron
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

Currently, django/contrib/admin/static/admin/js/SelectBox.js uses jQuery only to execute $(box).empty(); which can easily replaced with

while (box.options.length)
                box.options.remove(0);

I'd suggest making that tiny change and drop the jQuery dependency.

Change History (6)

comment:1 by Johannes Maron, 5 years ago

Owner: changed from nobody to Johannes Maron
Status: newassigned

comment:2 by Carlton Gibson, 5 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Carlton Gibson, 5 years ago

Patch needs improvement: set

comment:4 by Johannes Maron, 5 years ago

Patch needs improvement: unset

comment:5 by Claude Paroz, 5 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In ef93fd46:

Fixed #31013 -- Removed jQuery usage in SelectBox.js.

Note: See TracTickets for help on using tickets.
Back to Top