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/CollapsedFieldsets.js?rev=96#L50

--

You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=.


Reply via email to