Code

Opened 7 years ago

Closed 16 months ago

#4120 closed Cleanup/optimization (fixed)

some admin Javascript cleanups

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

Description

Here are the pure javascript cleanups from ticket 4045.

Attachments (1)

admin-js.2.diff (4.0 KB) - added by arvin 7 years ago.

Download all attachments as: .zip

Change History (14)

Changed 7 years ago by arvin

comment:1 Changed 7 years ago by anonymous

  • Component changed from Uncategorized to Admin interface
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from jacob to adrian
  • Patch needs improvement unset

comment:2 Changed 7 years ago by Simon G. <dev@…>

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 7 years ago by ubernostrum

  • Owner changed from nobody to xian

Reassigning to xian since he's doing admin JS stuff.

comment:4 Changed 4 years ago by adamnelson

  • Patch needs improvement set

xian obviously isn't doing anything with this. Patch needs to be updated to current js.

comment:5 Changed 4 years ago by adamnelson

  • Owner changed from xian to nobody

comment:6 Changed 3 years ago by lrekucki

  • Severity set to Normal
  • Type set to Cleanup/optimization

comment:7 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:8 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:9 Changed 16 months ago by andrewjesaitis

  • Cc andrewjesaitis added
  • Owner changed from nobody to andrewjesaitis
  • Status changed from new to assigned

This was quite an old ticket, but most of the original patch still applies. Consider it spring cleaning?!

It is just js cleanup. No admin functionality. The most import change is that it removes a duplicative function from calendar.js, which is also found in core.js.

The other two commits shuffle a couple functions into core.js. This ticket seemed to be a prerequisite to addressing #4045 which I will pick up once a call is made on this ticket.

The only part of the original patch that didn't apply were the changes to js/admin/ordering.js, which appears to have been removed. This change looked to be removing a duplicative function as well.

The associated pull request -- https://github.com/django/django/pull/948

Last edited 16 months ago by andrewjesaitis (previous) (diff)

comment:10 Changed 16 months ago by aaugustin

  • Patch needs improvement unset
  • Triage Stage changed from Accepted to Ready for checkin

Looks good to me, I don't think any of these is subject to the backwards compatibility policy.

comment:11 Changed 16 months ago by Claude Paroz <claude@…>

In d5824ef69d7b58ef71175bdb5e9420d601aa194c:

Removed quickElement from calendar.js

The function quickElement in calendar.js is a duplicate of the
quickElement function in core.js. Refs #4120.

comment:12 Changed 16 months ago by Claude Paroz <claude@…>

In 0a9ea56056ee4a7ded265dc56fff309c906473d1:

Moved cancelEventPropagation into core.js

The cancelEventPropagation function is a general utility function that
can be reused by other widgets. Refs #4120.

comment:13 Changed 16 months ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In d9b12ecbe62aa7c9fb0f913e7eefc21662f8e21b:

Moved removeChildren to core.js

The function removeChildren is a general utility that other functions
might want to use.
Fixes #4120. Thanks arvin for the initial patch.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.