Opened 10 years ago

Closed 10 years ago

#24405 closed Cleanup/optimization (fixed)

admin: cleanup Open related* popups code so it's easier to extend / replace

Reported by: rm_ Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords: popup admin modal
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

I think it's time to say goodbye to 2000s and embrace the 2010s leaving the windows for modals. Other than that we have separated the js machinery from the widget so this can be customized.

WIP tree here, full of debug prints:
https://github.com/xrmx/django/tree/relatedcleanup

Appear to work when adding new related objects, haven't run automated tests yet.

TODO:

  • cleanup the js
  • switch to a saner modal library with a proper license

Change History (10)

comment:1 by Tim Graham, 10 years ago

Could you please open a discussion on the DevelopersMailingList to get feedback on the idea?

in reply to:  1 comment:2 by rm_, 10 years ago

Replying to timgraham:

Could you please open a discussion on the DevelopersMailingList to get feedback on the idea?

Will do

comment:3 by rm_, 10 years ago

Summary: admin: Open related* popups in modals instead of new windowsadmin: cleanup Open related* popups code so it's easier to extend / replace

After list discussion [1] focus the energies on just cleaning up the code in order to be able to replace / extend it downstream. Retitle the bug to reflect that.

[1] https://groups.google.com/forum/#!topic/django-developers/b38JElfE3wk

comment:4 by Tim Graham, 10 years ago

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

comment:5 by rm_, 10 years ago

Patch needs improvement: unset

comment:6 by rm_, 10 years ago

Patch needs improvement: set

comment:7 by rm_, 10 years ago

Patch needs improvement: unset

comment:8 by Tim Graham, 10 years ago

Patch needs improvement: set

Some selenium failures need to be fixed.

comment:9 by rm_, 10 years ago

Patch needs improvement: unset

Updated patch to fix selenium tests.

comment:10 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 0decef3:

Fixed #24405 -- Made admin related object JavaScript overridable

Consolidated it in one file and move the DOM related stuff to the
template so it is easily overridable. To override the popup behavior
you need to add handlers for the custom events triggered in the
admin_change_form_document_ready template block.

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