EasyUI Forum
April 19, 2024, 04:37:21 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to change collapsedContent ?  (Read 7297 times)
y.bykov
Newbie
*
Posts: 49


View Profile
« 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
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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
Logged
y.bykov
Newbie
*
Posts: 49


View Profile
« Reply #2 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.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 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>
Logged
y.bykov
Newbie
*
Posts: 49


View Profile
« Reply #4 on: March 12, 2017, 11:18:16 PM »

Thank you
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!