Re: Why are collapsed fieldsets expanded on submit in the admin?
Sorry for the bump, but does no one have an explanation for this weird
behavior? The question comes up regularly when I show the admin
interface to a client.
On 23 Nov., 16:57, Benjamin Wohlwend <piquad...@gmail.com> wrote:
> Hi,
>
> currently, when a form in the admin has collapsed fieldsets, those
> fieldsets are expanded on submit. As I find this rather distracting
> and couldn't find an explanation why this should be desired behavior,
> I suspected that this is probably a hard to find bug somewhere in
> between CSS, HTML and Django's JavaScript code.
>
> When I finally took a look at the code, I was quite surprised that
> this isn't a bug, but a feature:
>
> > if (collapsed_seen) {
> > // Expand all collapsed fieldsets when form is submitted.
> > addEvent(findForm(document.getElementsByTagName('fieldset')[0]), 'submit', function() { CollapsedFieldsets.uncollapse_all(); });
> > }
>
> This code is in the admin since revision 96 [1]. But why? From a
> technical view, both the client and the server couldn't care less if
> the form fields are visible or not, they process them all the same.
> Was it UI-motivated?
>
> I, for one, find it quite disturbing that input fields appear all over
> the place when I click submit, just to vanish moments later to be
> replaced by a new page :)
>
> Regards,
> Benjamin
>
> [1]http://code.djangoproject.com/browser/django/trunk/media/js/admin/Col...
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home