source: Dev/trunk/src/client/dojox/grid/tests/test_grid_layout.html

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 3.6 KB
Line 
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.Grid in Layout Demo</title>
6       
7        <style type="text/css">
8                @import "../../../dojo/resources/dojo.css";
9                @import "../../../dijit/themes/tundra/tundra.css";
10                @import "../resources/Grid.css";
11                @import "../resources/tundraGrid.css";
12                @import "../../../dijit/tests/css/dijitTests.css";
13
14                html, body{     
15                        width: 100%;    /* make the body expand to fill the visible window */
16                        height: 100%;
17                        padding: 0 0 0 0;
18                        margin: 0 0 0 0;
19                        overflow: hidden;
20                }
21                .dijitSplitPane{
22                        margin: 5px;
23                }
24               
25                /* make grid containers overflow hidden */
26                body .dijitContentPane {
27                        overflow: hidden;
28                }
29                #rightPane {
30                        margin: 0;
31                }
32        </style>
33
34        <script type="text/javascript" src="../../../dojo/dojo.js"
35                data-dojo-config="parseOnLoad: true, isDebug: false"></script>
36
37        <script type="text/javascript">
38                dojo.require("dijit.dijit");
39                dojo.require("dijit.layout.LayoutContainer");
40                dojo.require("dijit.layout.ContentPane");
41                dojo.require("dijit.layout.LinkPane");
42                dojo.require("dijit.layout.SplitContainer");
43                dojo.require("dijit.layout.TabContainer");
44               
45                dojo.require("dojox.grid.DataGrid");
46                dojo.require("dojo.data.ItemFileWriteStore");
47               
48                dojo.require("dojo.parser");    // scan page for widgets and instantiate them
49        </script>
50        <script type="text/javascript" src="support/test_data.js"></script>
51        <script type="text/javascript">
52                var layout = [[
53                        {name: 'Column 1', field: 'col1'},
54                        {name: 'Column 2', field: 'col2'},
55                        {name: 'Column 3', field: 'col3'},
56                        {name: 'Column 4', field: 'col4', width: "150px"},
57                        {name: 'Column 5', field: 'col5'}
58                ],[
59                        {name: 'Column 6', field: 'col6'},
60                        {name: 'Column 7', field: 'col7'},
61                        {name: 'Column 8'},
62                        {name: 'Column 9', field: 'col3', colSpan: 2}
63                ]];
64                var layout2 = [
65                        {name: 'Alpha', field: 'col1'},
66                        {name: 'Beta', field: 'col2'},
67                        {name: 'Gamma', field: 'col3'},
68                        {name: 'Delta', field: 'col4', width: "150px"},
69                        {name: 'Epsilon', field: 'col5'},
70                        {name: 'Nexilon', field: 'col6'},
71                        {name: 'Zeta', field: 'col7'},
72                        {name: 'Eta', field: 'col1'},
73                        {name: 'Omega', field: 'col8'}
74                ];
75                //
76                dojo.addOnLoad(function(){
77                        dijit.byId("grid3").update();
78                });
79        </script>
80</head>
81<body class="tundra">
82        <div id="outer" dojoType="dijit.layout.LayoutContainer"
83                style="width: 100%; height: 100%;">
84                <div id="topBar" dojoType="dijit.layout.ContentPane" layoutAlign="top"
85                        style="background-color: #274383; color: white;">
86                        top bar
87                </div>
88                <div id="bottomBar" dojoType="dijit.layout.ContentPane" layoutAlign="bottom"
89                        style="background-color: #274383; color: white;">
90                        bottom bar
91                </div>
92                <div id="horizontalSplit" dojoType="dijit.layout.SplitContainer"
93                        orientation="horizontal"
94                        sizerWidth="5"
95                        activeSizing="false"
96                        layoutAlign="client"
97                >
98                        <div id="leftPane" dojoType="dijit.layout.ContentPane"
99                                 sizeMin="20" sizeShare="20">
100                                Left side
101                        </div>
102
103                        <div id="rightPane"
104                                dojoType="dijit.layout.SplitContainer"
105                                orientation="vertical"
106                                sizerWidth="5"
107                                activeSizing="false"
108                                sizeMin="50" sizeShare="80"
109                        >
110                                <div id="mainTabContainer" dojoType="dijit.layout.TabContainer" sizeMin="20" sizeShare="70">
111                                        <div id="grid1" dojoType="dojox.grid.DataGrid" store="test_store" structure="layout" title="Tab 1"></div>
112                                        <div id="grid2" dojoType="dojox.grid.DataGrid" store="test_store" structure="layout2" title="Tab 2"></div>
113                                </div>
114                                <div id="bottomRight" dojoType="dijit.layout.ContentPane" sizeMin="20" sizeShare="30">
115                                        <div id="grid3" dojoType="dojox.grid.DataGrid" store="test_store" structure="layout2"></div>
116                                </div>
117                        </div>
118                </div>
119        </div>
120</body>
121</html>
Note: See TracBrowser for help on using the repository browser.