google-code-export / django-grappelli

Automatically exported from code.google.com/p/django-grappelli
0 stars 0 forks source link

Add new collapse class (collapse-toggle) #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Would it be possible to add a new collapse class to be included in a future
release?

Imagine a change-form that has 3 fieldsets, all with 'collapse-toggle' in
the 'classes' section.  Basic functionality would allow for only one of the
fieldsets to be 'collapse-open' while the rest are 'collapse-closed'.  When
one of the 'collapse-closed' fielsets are toggled, it becomes
'collapse-open', and all others would become 'collapse-closed'.

The default 'opened' fieldset would be the first in the list of
'collapse-toggle'.  For added functionality you could add an extra class
called 'collapse-toggle-default' to allow a fieldset other than the first
to be open on page load.

BTW, loving your project.. it has everything I've been looking for to
spruce up the django-admin. The only question I have is regarding the
grappelli-help... how do I view a created help page? lol

Cheers,
  Gontro

Original issue reported on code.google.com by Gontro@gmail.com on 16 Aug 2009 at 8:39

GoogleCodeExporter commented 9 years ago
about the help: the link is /grappelli/help/ ... please be aware that these 
pages
have yet to be styled (there´s already a ticket for this one).

about your proposal: I´m not quite sure about this because of the usability. 
Imagine
an editor using the interface ... usually, with opening a collapsed fieldset 
nothing
else changes. with using collapse-toggle, other fieldsets are closed. how do we
communicated this behaviour to the editor? and what if I (as an editor) want 
two of
the fieldsets to be open?
maybe I´m just missing an exact usecase, but it seems confusing to me.

Original comment by sehmaschine on 16 Aug 2009 at 8:53

GoogleCodeExporter commented 9 years ago

Original comment by sehmaschine on 16 Aug 2009 at 9:21

GoogleCodeExporter commented 9 years ago
cheers for the info on the grappelli-help.

well I have one particular change-form that has 55 form-fields across 5 
fieldsets..
as you can imagine this is a particularly long page and I believe will become 
quiet
confusing to the editor.  When all the fieldsets are collapsed, bar one, the 
form
looks nice and neat and not an overwhelming amount of information.  With the 
toggle
ability I believe it will allow an editor to go through each fieldset, 
one-by-one,
and not feel like they are typing a marathon.

I've already thought of the issues you have raised and believe a middle-ground 
could
be reached by providing a button on the far left of the fieldset title (where 
the '+'
for inlines usually are) that makes the selected fielset 'collapse-open' and 
all the
rest 'collapse-closed'.. this could be used instead of defining a new class to 
handle
the functionallity. 

Original comment by Gontro@gmail.com on 16 Aug 2009 at 9:23

GoogleCodeExporter commented 9 years ago
after reading your reply to my other issue I believe that this could be wrapped 
up in
an admin option also.  something like 'allow_toggle_fieldsets=True/False' that 
would
add that button I described above to the fieldsets title, allowing the 
'collapse all
but this fieldset' functionallity..

Original comment by Gontro@gmail.com on 16 Aug 2009 at 9:27

GoogleCodeExporter commented 9 years ago
I´m not convinced. seems to be overkill IMHO. there´s already a lot of 
options for an
editor and we´d like to keep it as simple as possible.

sorry, but a wontfix for this one.

Original comment by sehmaschine on 16 Aug 2009 at 11:43