#46: Collapse and expand sections with javascript
- Contents
Collapse and expand sections with javascript
- Proposed by
- elvix
- Proposal type
- User interface
- State
- completed
Motivation
Sometimes forms can get cluttered by information that is purely optional and used very rarely, in special cases.
Having the possibility of collapsing the section with the not-so-commonly-used data makes it possible to keep the user interface cleaner and neater.
Proposal
Add a javascript to enable consistent collapsing / expanding of sections clientside.
Implementation
Add a small, non-intrusive script that lives in plone_javascripts.js
The javascript will search for fieldsets with a class of "collapsible" and apply the collpase-behavior to them after loading.
The behavior adds an icon [+][-] inside the legend of the fieldset. The user can click the icon to collapse or expand the section visually.
Progress log
skins/plone_ecmascript/collapsiblesections.js has made it into Plone 2.1 and is used to collapse the workflow history on item views.

