Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2150 mathias 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
	"http://www.w3.org/TR/html4/loose.dtd">
3
<html>
4
	<head>
5
		<title>Test dojox.Grid Programmatic Instantiation</title>
6
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
7
		<style type="text/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
			.heading {
13
				font-weight: bold;
14
				padding-bottom: 0.25em;
15
			}
16
 
17
			#grid {
18
				width: 100%;
19
				height: 100%;
20
			}
21
		</style>
22
		<script type="text/javascript" src="../../../dojo/dojo.js"
23
			djConfig="isDebug:false, debugAtAllCosts: false, parseOnLoad: true"></script>
24
		<script type="text/javascript">
25
			dojo.require("dijit.layout.TabContainer");
26
			dojo.require("dijit.layout.ContentPane");
27
			dojo.require("dojox.grid.Grid");
28
			dojo.require("dojox.grid._data.model");
29
			dojo.require("dojo.parser");
30
		</script>
31
		<script type="text/javascript" src="support/test_data.js"></script>
32
		<script type="text/javascript">
33
			dojo.addOnLoad(function(){
34
				// a grid view is a group of columns
35
				var view1 = {
36
					cells: [
37
						[
38
							{name: 'Column 0'},
39
							{name: 'Column 1'},
40
							{name: 'Column 2'},
41
							{name: 'Column 3', width: "150px"},
42
							{name: 'Column 4'}
43
						],
44
						[
45
							{name: 'Column 5'},
46
							{name: 'Column 6'},
47
							{name: 'Column 7'},
48
							{name: 'Column 8', field: 3, colSpan: 2}
49
						]
50
					]
51
				};
52
				// a grid layout is an array of views.
53
				var layout = [ view1 ];
54
 
55
				var grid = new dojox.Grid({
56
					title: "tab 1",
57
					id: "grid",
58
					model: model,
59
					structure: layout
60
				});
61
				dijit.byId("mainTabContainer").addChild(grid, 0);
62
				grid.render();
63
			});
64
		</script>
65
	</head>
66
	<body class="tundra">
67
		<div class="heading">dojox.Grid Programmatic Instantiation Test</div>
68
		<div id="mainTabContainer" dojoType="dijit.layout.TabContainer"
69
			style="height: 300px; width: 100%;">
70
			<div dojoType="dijit.layout.ContentPane" title="Tab 2">
71
				... stuff ...
72
			</div>
73
		</div>
74
	</body>
75
</html>