#17373: TabularInline with extra = 0: "Add another" wraps in <div> instead of
<tr>
inside of <table>
-------------------------------+--------------------
Reporter: jpic | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.3
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
To reproduce the bug, set extra = 0 in a TabularInline. Then open the
admin page with the inline table, the "Add another" link is in a tr/td
inside the table. Click "Add another" and it will add a row and wrap the
"Add another" link inside a <div> instead of tr/td.
It is semantically wrong (a <div> may not have <table> for parent) and
displays wrong ("Add another X" shouldn't wordwrap).
To fix the bug, change in
https://code.djangoproject.com/browser/django/trunk/django/contrib/admin/static/admin/js/inlines.js#L44:
{{{
$(this).attr("tagName") == "TR"
}}}
Into:
{{{
$(this).is('tr')
}}}
FTR is there a better way than this command to enable non-compressed admin
js ?
{{{
ln -Lfn ../env/lib/python2.7/site-
packages/django/contrib/admin/media/js/inlines.js
static/admin/js/inlines.min.js
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/17373>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.