EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: hbento on May 11, 2015, 03:02:47 AM



Title: Saving Layout and Accordion States
Post by: hbento on May 11, 2015, 03:02:47 AM
Hi

I'm trying to save my layout and accordion state.
Any idea on how to achieve this goal?

Thanks


Title: Re: Saving Layout and Accordion States
Post by: stworthy on May 11, 2015, 08:10:58 AM
What do the layout and accordion states mean? If you want the 'selected' or the 'collapsed' states, please set the 'selected' and 'collapsed' properties for what panels you want to set.


Title: Re: Saving Layout and Accordion States
Post by: hbento on May 11, 2015, 08:35:22 AM
Yes, I want those properties and also the size of the panes.

But how do I catch the callback resize events? Or colapse events, ...?


Title: Re: Saving Layout and Accordion States
Post by: stworthy on May 11, 2015, 06:31:14 PM
The 'onCollapse' and 'onResize' events are available for the panels. The code below shows how to catch the events of the region panel.
Code:
<body class="easyui-layout">
<div data-options="region:'west',split:true,title:'West',width:180,
onCollapse:function(){
// ...
},
onResize:function(){
// ...
}
">west content</div>
<div data-options="region:'center',title:'Center'"></div>
</body>