forked from oria/gridx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_grid_resize.html
124 lines (123 loc) · 3.44 KB
/
test_grid_resize.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html>
<head>
<title>Grid Resize Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<link rel='stylesheet' href="support/common.css" />
<style type="text/css">
#hslider {
width: 1000px;
}
.mainPane, #vslider {
height: 400px;
}
.mainPane {
width: 550px;
}
#grid1 {
width: 520px;
height: 400px;
}
.container {
width: 520px;
height: 400px;
}
#grid2 {
width: 100%;
height: 100%;
}
.resizePane {
margin: 0 0 0 40px;
}
.mainPane {
vertical-align: top;
}
#hslider {
margin-top: 10px;
}
#vslider {
margin-right: 10px;
}
</style>
<script type="text/javascript" src="../../dojo/dojo.js" data-dojo-config="async: true"></script>
<script type="text/javascript" src='support/common.js'></script>
<script type="text/javascript" src='test_grid_resize.js'></script>
</head>
<body class='claro'>
<h1>Grid Resize</h1>
<table class='resizePane' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td></td>
<td colspan='2'>
<div id="hslider" data-dojo-type="dijit.form.HorizontalSlider" data-dojo-props='
value:500,
minimum:0,
maximum:500,
pageIncrement:50,
showButtons:true,
intermediateChanges:true,
slideDuration:500,
onChange: onHSliderChange
'>
<div data-dojo-type="dijit.form.HorizontalRule" data-dojo-props='
container:"topDecoration", count:11, style:{height:"5px"}'></div>
<div data-dojo-type="dijit.form.HorizontalRuleLabels" data-dojo-props='
container:"bottomDecoration", count:11, maximum:500, constraints:{pattern:"#px"}'></div>
</div>
</td>
</tr><tr>
<td >
<div id="vslider" data-dojo-type="dijit.form.VerticalSlider" data-dojo-props='
value:0,
minimum:0,
maximum:400,
pageIncrement:50,
showButtons:true,
intermediateChanges:true,
slideDuration:500,
onChange: onVSliderChange
'>
<div data-dojo-type="dijit.form.VerticalRuleLabels" data-dojo-props='
container:"leftDecoration", count:11, minimum: 400, maximum:0, style:{width:"30px"}, constraints:{pattern:"#px"}'></div>
<div data-dojo-type="dijit.form.VerticalRule" data-dojo-props='
container:"rightDecoration", count:11, style:{width:"5px"}'></div>
</div>
</td><td class='mainPane'>
<h2>Grid has fixed width/height (resize grid itself)</h2>
<div class='container'>
<div id='grid1' jsid='grid1' data-dojo-type='gridx.Grid' data-dojo-props='
cacheClass: "gridx/core/model/cache/Sync",
store: store,
structure: layout,
paginationInitialPageSize: 25,
columnWidthAutoResize: true,
paginationBarSizes: [10, 25, 50],
modules: [
"gridx/modules/Pagination",
"gridx/modules/pagination/PaginationBar",
"gridx/modules/VirtualVScroller"
]
'></div>
</div>
</td><td class='mainPane'>
<h2>Grid has 100% width/height (resize container)</h2>
<div id='container2' class='container'>
<div id='grid2' jsid='grid2' data-dojo-type='gridx.Grid' data-dojo-props='
cacheClass: "gridx/core/model/cache/Sync",
store: store,
structure: layout,
paginationInitialPageSize: 25,
columnWidthAutoResize: true,
paginationBarSizes: [10, 25, 50],
modules: [
"gridx/modules/Pagination",
"gridx/modules/pagination/PaginationBar",
"gridx/modules/VirtualVScroller"
]
'></div>
</div>
</td>
</tr>
</table>
</body>
</html>