[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
Vincent Massol wrote:
> Yes, that's what we do now.... :) Check in edit mode for example,
> there are panels that are collapsed. Edit those panels and you'll see
> how it's done.
>
> Moreover we even remember when a user has collapsed/expanded a panel
> in a cookie... :)
Hi,
I am afraid I am not able to understand how this is done.
There is a JavaScript script at the end of the panels show as collapsed
"by default". It must be togglePanelVisibility which is controlling the
collapsed state, but I am not able to understand how. For instance, the
XWiki Syntax Help panel reads:
<script type="text/javascript">new Rico.Accordion(
'xwikisyntaxhelp',
{panelHeight:'max'}
);togglePanelVisibility((document.getElementById('xwikisyntaxhelppanel')).getElementsByTagName(
'div').item(0));</script>
As far as I see here, if there are no child nodes in the accordion, it
is not possible to establish a "collapsed" state for the panel. Or I am
not able to find how.
Please, how could I collapse a panel as simple as...
#panelheader('Consumidores/as')
item 1
#panelfooter()
Thanks you so much for your help,
Ricardo
--
Ricardo RodrÃguez
Your EPEC Network ICT Team