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