Opened 5 years ago

Last modified 3 years ago

#16260 assigned New feature

Ability to change dismissRelatedLookupPopup on custom callback function

Reported by: Alex Kamedov Owned by: Alex Kamedov
Component: contrib.admin Version: master
Severity: Normal Keywords: admin javascript
Cc: melinath Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: yes

Description

The best solution for some cases for customizing admin is put some links with showRelatedObjectLookupPopup javascript function on admin changelist, but after user choose the object, custom javascript function must be called instead of dismissRelatedLookupPopup javascript function.

Execution of dismissRelatedLookupPopup is hard coded in python code now. The easiest way to implement use case described higher is adding new GET argument "_callback" to changelist view.

Attachments (2)

related_lookup_popup.diff (11.7 KB) - added by Alex Kamedov 5 years ago.
16260-admin-popup-callback.diff (12.0 KB) - added by Julien Phalip 4 years ago.

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by Alex Kamedov

Attachment: related_lookup_popup.diff added

comment:1 Changed 5 years ago by Alex Kamedov

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:2 Changed 5 years ago by melinath

Cc: melinath added
Keywords: javascript added
Triage Stage: UnreviewedAccepted
Type: Cleanup/optimizationNew feature

I would love to see this implemented! I'm not sure if _callback is the best name for the GET parameter, though.

comment:3 Changed 5 years ago by Alex Kamedov

Version: 1.3SVN

comment:4 Changed 5 years ago by Alex Kamedov

Owner: changed from nobody to Alex Kamedov
Status: newassigned

Changed 4 years ago by Julien Phalip

comment:5 Changed 4 years ago by Julien Phalip

I'm not entirely sold on the implementation but I do want to include this new feature. So I'll chew on it a bit more. In the meantime I've the patch to apply to current code.

comment:6 Changed 3 years ago by Tim Graham

Easy pickings: unset
Patch needs improvement: set
Note: See TracTickets for help on using tickets.
Back to Top