EasyUI Forum
November 07, 2025, 04:20:25 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: How to add tool buttons on expandPanel in layout? on: October 21, 2014, 06:36:42 PM
In the 'onCollapse' event, get the expanding panel and override the 'tools' property. Please refer the code below:
Code:
	<div class="easyui-layout" style="width:700px;height:350px;">
<div title="North" style="height:100px" data-options="
region:'north',
split:true,
onCollapse:onCollapse
"></div>
<div data-options="region:'center',title:'Main Title',iconCls:'icon-ok'">
</div>
</div>
<script type="text/javascript">
function onCollapse(){
var opts = $(this).panel('options');
var layout = $(this).closest('.layout');
var region = opts.region;
var p = layout.layout('panel', 'expand'+region.substr(0,1).toUpperCase()+region.substr(1));
var tools = p.panel('options').tools;
p.panel({
tools: [{
iconCls:'icon-add'
}].concat(tools.pop())
})
}
</script>

Thank you very much!
2  General Category / EasyUI for jQuery / Re: How to add tool buttons on expandPanel in layout? on: October 20, 2014, 11:23:43 PM
Any region panels accept the 'tools' property that allows you to add icons to the panel header.
Code:
	<div class="easyui-layout" style="width:700px;height:350px;">
<div title="West" style="width:100px;" data-options="
region:'west',
split:true,
tools:[{
iconCls:'icon-add'
}]"></div>
<div data-options="region:'center',title:'Main Title',iconCls:'icon-ok'">
</div>
</div>

Thanks for your reply, but your code only shows how to add icons on normal panel. I just don't know how to add these icons on expand panel when a panel hidden.
3  General Category / EasyUI for jQuery / Re: How to add tool buttons on expandPanel in layout? on: October 20, 2014, 06:15:41 PM
Dose this feature not supported in current version? Or any other ways to get it?
4  General Category / EasyUI for jQuery / How to add tool buttons on expandPanel in layout? on: October 16, 2014, 12:13:51 AM
anyone help?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!