Code

Opened 4 years ago

Last modified 5 weeks ago

#12713 new New feature

Fire 'onChange' event when adding a new option to a select box

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

Description

After adding a new option to a select box in admin (by '+' sign) django automatically selects this new option, but it doesn't fire 'onChange' event after that and I think it should. This behaviour could be helpful when there is a js code with an event listener binded to a select box.

This patch adds functionality to fire the event after the change.

Attachments (1)

fire_onchange_event_after_add_new_option.diff (1.5 KB) - added by mishaaq 4 years ago.
first patch

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by mishaaq

first patch

comment:1 Changed 4 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Marking as accepted, but really I think the solution is to rewrite this using jQuery :)

comment:2 Changed 3 years ago by mattmcc

  • Severity set to Normal
  • Type set to New feature

comment:3 Changed 3 years ago by julien

  • UI/UX set

comment:4 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:6 Changed 2 years ago by aaugustin

  • UI/UX set

Revert accidental batch modification.

comment:7 Changed 5 weeks ago by timo

  • Patch needs improvement set

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new
The owner will be changed from mishaaq to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.