EasyUI Forum

General Category => General Discussion => Topic started by: y.bykov on March 12, 2017, 01:41:27 AM



Title: How to change collapsedContent ?
Post by: y.bykov on March 12, 2017, 01:41:27 AM
Is it exist any way to change collapsedContent when layout region in collapsed state (everything already parsed)?
I mean without direct DOM modify.

Thank you


Title: Re: How to change collapsedContent ?
Post by: stworthy on March 12, 2017, 07:42:15 AM
Please take a look at this example https://www.jeasyui.com/demo/main/index.php?plugin=Layout&theme=default&dir=ltr&pitem=Custom%20Collapse%20Title


Title: Re: How to change collapsedContent ?
Post by: y.bykov on March 12, 2017, 12:28:18 PM
Thanks for feedback! But it is not the same I asked.
In my app I need correct layout conf after loading templates & i18n data, but when I call layout.layout(conf) where
Code:
conf = {
  collapsedContent: myFunc
}
nothing change because 'createExpandPanel' result save in panels cache after first parse
Code:
panels[expandP] = createExpandPanel(region);
So I can't find a way to change collapsedContent.


Title: Re: How to change collapsedContent ?
Post by: stworthy on March 12, 2017, 05:08:07 PM
Please notice that the 'collapsedContent' property is defined in layout panel. You must declare it in a special region panel.
Code:
<div style="width:100px;" data-options="
        region:'west',
        title: 'West',
        split:true,
        collapsed:true,
        hideCollapsedContent: false,
        collapsedContent: function(){
            return '<div class=\'panel-title layout-expand-title\'>Customized Title</div>';
        }"></div>


Title: Re: How to change collapsedContent ?
Post by: y.bykov on March 12, 2017, 11:18:16 PM
Thank you