94c7f11f9ed3dd30cf5d57be43b6533c8f5a4232.svn-base 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3. <html>
  4. <head>
  5. <title>dojox.Grid in Layout Demo</title>
  6. <style type="text/css">
  7. @import "../_grid/Grid.css";
  8. @import "../_grid/tundraGrid.css";
  9. @import "../../../dojo/resources/dojo.css";
  10. @import "../../../dijit/themes/tundra/tundra.css";
  11. @import "../../../dijit/tests/css/dijitTests.css";
  12. html, body{
  13. width: 100%; /* make the body expand to fill the visible window */
  14. height: 100%;
  15. padding: 0 0 0 0;
  16. margin: 0 0 0 0;
  17. overflow: hidden;
  18. }
  19. .dijitSplitPane{
  20. margin: 5px;
  21. }
  22. /* make grid containers overflow hidden */
  23. body .dijitContentPane {
  24. overflow: hidden;
  25. }
  26. #rightPane {
  27. margin: 0;
  28. }
  29. </style>
  30. <script type="text/javascript" src="../../../dojo/dojo.js"
  31. djConfig="parseOnLoad: true, isDebug: false"></script>
  32. <script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>
  33. <script type="text/javascript">
  34. dojo.require("dijit.layout.LayoutContainer");
  35. dojo.require("dijit.layout.ContentPane");
  36. dojo.require("dijit.layout.LinkPane");
  37. dojo.require("dijit.layout.SplitContainer");
  38. dojo.require("dijit.layout.TabContainer");
  39. dojo.require("dojox.grid.Grid");
  40. dojo.require("dojox.grid._data.model");
  41. dojo.require("dojo.parser"); // scan page for widgets and instantiate them
  42. </script>
  43. <script type="text/javascript" src="support/test_data.js"></script>
  44. <script type="text/javascript">
  45. // a grid view is a group of columns
  46. var view1 = {
  47. cells: [[
  48. {name: 'Column 0'}, {name: 'Column 1'}, {name: 'Column 2'}, {name: 'Column 3', width: "150px"}, {name: 'Column 4'}
  49. ],[
  50. {name: 'Column 5'}, {name: 'Column 6'}, {name: 'Column 7'}, {name: 'Column 8', field: 3, colSpan: 2}
  51. ]]
  52. };
  53. // a grid layout is an array of views.
  54. var layout = [ view1 ];
  55. var layout2 = [ {
  56. cells: [[
  57. {name: 'Alpha'}, {name: 'Beta'}, {name: 'Gamma'}, {name: 'Delta', width: "150px"}, {name: 'Epsilon'}, {name: 'Nexilon'}, {name: 'Zeta'}, {name: 'Eta', field: 0}, {name: 'Omega' }
  58. ]]
  59. }
  60. ];
  61. //
  62. dojo.addOnLoad(function(){
  63. dijit.byId("grid3").update();
  64. });
  65. </script>
  66. </head>
  67. <body class="tundra">
  68. <div id="outer" dojoType="dijit.layout.LayoutContainer"
  69. style="width: 100%; height: 100%;">
  70. <div id="topBar" dojoType="dijit.layout.ContentPane" layoutAlign="top"
  71. style="background-color: #274383; color: white;">
  72. top bar
  73. </div>
  74. <div id="bottomBar" dojoType="dijit.layout.ContentPane" layoutAlign="bottom"
  75. style="background-color: #274383; color: white;">
  76. bottom bar
  77. </div>
  78. <div id="horizontalSplit" dojoType="dijit.layout.SplitContainer"
  79. orientation="horizontal"
  80. sizerWidth="5"
  81. activeSizing="0"
  82. layoutAlign="client"
  83. >
  84. <div id="leftPane" dojoType="dijit.layout.ContentPane"
  85. sizeMin="20" sizeShare="20">
  86. Left side
  87. </div>
  88. <div id="rightPane"
  89. dojoType="dijit.layout.SplitContainer"
  90. orientation="vertical"
  91. sizerWidth="5"
  92. activeSizing="0"
  93. sizeMin="50" sizeShare="80"
  94. >
  95. <div id="mainTabContainer" dojoType="dijit.layout.TabContainer" sizeMin="20" sizeShare="70">
  96. <div id="grid1" dojoType="dojox.Grid" model="model" title="Tab 1"></div>
  97. <div id="grid2" dojoType="dojox.Grid" model="model" structure="layout2" title="Tab 2"></div>
  98. </div>
  99. <div id="bottomRight" dojoType="dijit.layout.ContentPane" sizeMin="20" sizeShare="30">
  100. <div id="grid3" dojoType="dojox.Grid" model="model" structure="layout2"></div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </body>
  106. </html>