You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.5 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <html>
  2. <head>
  3. <title>Accordion Layout</title>
  4. <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
  5. <!-- GC -->
  6. <!-- LIBS -->
  7. <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
  8. <!-- ENDLIBS -->
  9. <script type="text/javascript" src="../../ext-all.js"></script>
  10. <style type="text/css">
  11. html, body {
  12. font: normal 12px verdana;
  13. margin: 0;
  14. padding: 0;
  15. border: 0 none;
  16. overflow: hidden;
  17. height: 100%;
  18. }
  19. .empty .x-panel-body {
  20. padding-top:20px;
  21. text-align:center;
  22. font-style:italic;
  23. color: gray;
  24. font-size:11px;
  25. }
  26. </style>
  27. <script type="text/javascript">
  28. Ext.onReady(function() {
  29. var item1 = new Ext.Panel({
  30. title: 'Accordion Item 1',
  31. html: '&lt;empty panel&gt;',
  32. cls:'empty'
  33. });
  34. var item2 = new Ext.Panel({
  35. title: 'Accordion Item 2',
  36. html: '&lt;empty panel&gt;',
  37. cls:'empty'
  38. });
  39. var item3 = new Ext.Panel({
  40. title: 'Accordion Item 3',
  41. html: '&lt;empty panel&gt;',
  42. cls:'empty'
  43. });
  44. var item4 = new Ext.Panel({
  45. title: 'Accordion Item 4',
  46. html: '&lt;empty panel&gt;',
  47. cls:'empty'
  48. });
  49. var item5 = new Ext.Panel({
  50. title: 'Accordion Item 5',
  51. html: '&lt;empty panel&gt;',
  52. cls:'empty'
  53. });
  54. var accordion = new Ext.Panel({
  55. region:'west',
  56. margins:'5 0 5 5',
  57. split:true,
  58. width: 210,
  59. layout:'accordion',
  60. items: [item1, item2, item3, item4, item5]
  61. });
  62. var viewport = new Ext.Viewport({
  63. layout:'border',
  64. items:[
  65. accordion, {
  66. region:'center',
  67. margins:'5 5 5 0',
  68. cls:'empty',
  69. bodyStyle:'background:#f1f1f1',
  70. html:'<br/><br/>&lt;empty center panel&gt;'
  71. }]
  72. });
  73. });
  74. </script>
  75. </head>
  76. <body>
  77. <script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
  78. </body>
  79. </html>