customcollapsetitle.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Custom Collapse Title in Layout - jQuery EasyUI Demo</title>
  6. <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
  8. <link rel="stylesheet" type="text/css" href="../demo.css">
  9. <script type="text/javascript" src="../../jquery.min.js"></script>
  10. <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
  11. </head>
  12. <body>
  13. <h2>Custom Collapse Title in Layout</h2>
  14. <p>Any components can display on the title bar of a collapsed panel.</p>
  15. <div style="margin:20px 0;"></div>
  16. <div id="cc" class="easyui-layout" style="width:700px;height:350px;">
  17. <div data-options="region:'east',split:true,hideCollapsedContent:false" title="East" style="width:100px;"></div>
  18. <div data-options="region:'west',split:true,collapsed:true,
  19. hideExpandTool: true,
  20. expandMode: null,
  21. hideCollapsedContent: false,
  22. collapsedSize: 68,
  23. collapsedContent: function(){
  24. return $('#titlebar');
  25. }
  26. " title="West" style="width:100px;"></div>
  27. <div data-options="region:'center',title:'Main Title'">
  28. <table class="easyui-datagrid"
  29. data-options="url:'datagrid_data1.json',method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
  30. <thead>
  31. <tr>
  32. <th data-options="field:'itemid'" width="80">Item ID</th>
  33. <th data-options="field:'productid'" width="100">Product ID</th>
  34. <th data-options="field:'listprice',align:'right'" width="80">List Price</th>
  35. <th data-options="field:'unitcost',align:'right'" width="80">Unit Cost</th>
  36. <th data-options="field:'attr1'" width="150">Attribute</th>
  37. <th data-options="field:'status',align:'center'" width="60">Status</th>
  38. </tr>
  39. </thead>
  40. </table>
  41. </div>
  42. </div>
  43. <div id="titlebar" style="padding:2px">
  44. <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100%" data-options="iconCls:'layout-button-right'" onclick="$('#cc').layout('expand','west')"></a>
  45. <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100%" data-options="iconCls:'icon-large-picture',size:'large',iconAlign:'top'">Picture</a>
  46. <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100%" data-options="iconCls:'icon-large-shapes',size:'large',iconAlign:'top'">Shapes</a>
  47. <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100%" data-options="iconCls:'icon-large-smartart',size:'large',iconAlign:'top'">SmartArt</a>
  48. <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100%" data-options="iconCls:'icon-large-chart',size:'large',iconAlign:'top'">Chart</a>
  49. </div>
  50. </body>
  51. </html>