column.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <html>
  2. <head>
  3. <title>Column Layout</title>
  4. <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
  5. <!-- GC -->
  6. <style type="text/css">
  7. html, body {
  8. font:normal 12px verdana;
  9. margin:0;
  10. padding:0;
  11. border:0 none;
  12. overflow:hidden;
  13. height:100%;
  14. }
  15. .x-panel-body p {
  16. margin:5px;
  17. }
  18. .x-column-layout-ct .x-panel {
  19. margin-bottom:5px;
  20. }
  21. .x-column-layout-ct .x-panel-dd-spacer {
  22. margin-bottom:5px;
  23. }
  24. .settings {
  25. background-image:url(../shared/icons/fam/folder_wrench.png) !important;
  26. }
  27. .nav {
  28. background-image:url(../shared/icons/fam/folder_go.png) !important;
  29. }
  30. </style>
  31. <script type="text/javascript" src="../../ext-all.js"></script>
  32. <script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
  33. <script type="text/javascript">
  34. Ext.require(['*']);
  35. Ext.onReady(function(){
  36. // NOTE: This is an example showing simple state management. During development,
  37. // it is generally best to disable state management as dynamically-generated ids
  38. // can change across page loads, leading to unpredictable results. The developer
  39. // should ensure that stable state ids are set for stateful components in real apps.
  40. Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));
  41. var viewport = Ext.create('Ext.Viewport', {
  42. layout:'border',
  43. items:[{
  44. region:'west',
  45. id:'west-panel',
  46. title:'West',
  47. split:true,
  48. width: 200,
  49. minSize: 175,
  50. maxSize: 400,
  51. collapsible: true,
  52. margins:'35 0 5 5',
  53. cmargins:'35 5 5 5',
  54. layout:'accordion',
  55. layoutConfig:{
  56. animate:true
  57. },
  58. items: [{
  59. html: Ext.example.shortBogusMarkup,
  60. title:'Navigation',
  61. autoScroll:true,
  62. border:false,
  63. iconCls:'nav'
  64. },{
  65. title:'Settings',
  66. html: Ext.example.shortBogusMarkup,
  67. border:false,
  68. autoScroll:true,
  69. iconCls:'settings'
  70. }]
  71. },{
  72. region:'center',
  73. margins:'35 5 5 0',
  74. layout:'column',
  75. autoScroll:true,
  76. defaults: {
  77. layout: 'anchor',
  78. defaults: {
  79. anchor: '100%'
  80. }
  81. },
  82. items: [{
  83. columnWidth: 1/3,
  84. baseCls:'x-plain',
  85. bodyStyle:'padding:5px 0 5px 5px',
  86. items:[{
  87. title: 'A Panel',
  88. html: Ext.example.shortBogusMarkup
  89. }]
  90. },{
  91. columnWidth: 1/3,
  92. baseCls:'x-plain',
  93. bodyStyle:'padding:5px 0 5px 5px',
  94. items:[{
  95. title: 'A Panel',
  96. html: Ext.example.shortBogusMarkup
  97. }]
  98. },{
  99. columnWidth: 1/3,
  100. baseCls:'x-plain',
  101. bodyStyle:'padding:5px',
  102. items:[{
  103. title: 'A Panel',
  104. html: Ext.example.shortBogusMarkup
  105. },{
  106. title: 'Another Panel',
  107. html: Ext.example.shortBogusMarkup
  108. }]
  109. }]
  110. }]
  111. });
  112. });
  113. </script>
  114. </head>
  115. <body>
  116. </body>
  117. </html>