-
Notifications
You must be signed in to change notification settings - Fork 54
/
jquery-ui.html
326 lines (283 loc) · 10.1 KB
/
jquery-ui.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<!DOCTYPE html>
<html>
<head>
<title>jLayout jQuery UI integration</title>
<meta charset="utf-8">
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/ui-lightness/jquery-ui.css" rel="stylesheet" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<script type="text/javascript" src="../lib/jquery.sizes.js"></script>
<script type="text/javascript" src="../lib/jlayout.border.js"></script>
<script type="text/javascript" src="../lib/jlayout.grid.js"></script>
<script type="text/javascript" src="../lib/jlayout.flexgrid.js"></script>
<script type="text/javascript" src="../lib/jlayout.flow.js"></script>
<script type="text/javascript" src="../lib/jquery.jlayout.js"></script>
<script type="text/javascript">
jQuery(function($) {
var container = $('body'),
west = $('body > .west'),
east = $('body > .east'),
center = $('body > .center');
function layout() {
container.layout();
$('#accordion').accordion('resize');
// This ensures that the center is never smaller than 400 pixels.
east.resizable('option', 'maxWidth', (center.width() + east.width()) - 400);
west.resizable('option', 'maxWidth', (center.width() + west.width()) - 400);
}
// Make the west and east panels resizable
west.resizable({
handles: 'e',
stop: layout,
helper: 'ui-resizable-helper-west',
minWidth: 200
});
east.resizable({
handles: 'w',
stop: layout,
helper: 'ui-resizable-helper-east',
minWidth: 200
});
// Lay out the west panel first
west.layout();
// Then do the main layout.
layout();
// Hook up the re-layout to the window resize event.
$(window).resize(layout);
/**
* Below here is all demo code, which has no relation to the layout.
*/
$('#accordion').accordion({header: 'h3', fillSpace: true});
// Set up the tabs in the center panel and remove the unwanted corners class
center.tabs();
center.children('ul').removeClass('ui-corner-all');
$.extend($.ui.slider.defaults, {
range: "min",
animate: true,
orientation: "vertical"
});
$("#eq > span").each(function() {
var value = parseInt($(this).text());
$(this).empty();
$(this).slider({
value: value
});
});
$("#progressbar").progressbar({
value: 59
});
$('#datepicker').datepicker();
});
</script>
<style>
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
overflow: hidden;
font-size: 0.9em;
font-family: Verdana, Arial, sans-serif;
}
.north, .south, .west, .east, .center {
display: inline-block;
background-color: #F8F8F8;
}
.north {
height: 3em;
background-color: #3F3F3F;
border-bottom: 1px solid black;
}
.south {
height: 2em;
background-color: #3F3F3F;
border-top: 1px solid black;
font-size: 0.65em;
color: rgb(200, 200, 200);
padding: 0.5em 2em;
}
.east {
width: 25em;
height: 100%;
font-size: 0.78em;
}
.west {
width: 20em;
font-size: 0.78em;
}
.ui-resizable-handle {
background-color: #BBBBBB;
border-left: 1px solid #9A9A9A;
border-right: 1px solid #9A9A9A;
}
.ui-resizable-handle:hover {
background-color: #bbbbcd;
border-left: 1px solid #afafc0;
border-right: 1px solid #afafc0;
}
.ui-resizable-e {
right: -6px;
width: 4px;
}
.ui-resizable-helper-west {
border-right: 6px solid #bbbbcd;
}
.ui-resizable-helper-east {
border-left: 6px solid #bbbbcd;
}
.ui-resizable-w {
left: -6px;
width: 4px;
}
.ui-resizable-e {
right: -6px;
width: 4px;
}
.ui-resizable-helper-east {
border-right: 6px solid #bbbbcd;
}
.center {
font-size: 0.9em;
overflow: auto;
background-color: white;
}
.ui-tabs {
padding: 0em;
border: none;
}
.ui-tabs-nav {
border-left: none;
border-right: none;
}
.west .panel {
width: 15em;
display: inline-block;
overflow: auto;
}
.panel p {
margin: 1em;
}
a {
color: lightblue;
}
.highlight {
color: lightblue;
font-size: 1em;
}
.north h1 {
font-size: 1em;
color: white;
padding-left: 1em;
}
#eq span {
font-size: 0.6em;
height: 120px;
float: left;
margin: 15px;
}
#progressbar {
font-size: 0.6em;
margin: 1em;
}
#datepicker {
margin: 0.5em;
font-size: 0.78em;
}
</style>
</head>
<body data-layout='{"type": "border", "resize": false, "hgap": 6}'>
<div class="north">
<h1><span class="highlight">jLayout</span> & jQuery UI Integration Demo</h1>
</div>
<div class="center">
<ul>
<li><a href="#tabs-1">Nunc tincidunt</a></li>
<li><a href="#tabs-2">Proin dolor</a></li>
<li><a href="#tabs-3">Aenean lacinia</a></li>
</ul>
<div id="tabs-1">
<h2>jLayout & jQuery UI Integration Demo</h2>
<p>Please visit the <a href="">jLayout website</a>, or the <a href="">jLayout jQuery plugin website</a> for more information.</p>
<p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
</div>
<div id="tabs-2">
<p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
</div>
<div id="tabs-3">
<p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.</p>
<p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.</p>
</div>
</div>
<div data-layout='{"type": "grid", "columns": 1, "resize": false}' class="west">
<div class="panel">
<div class="ui-state-default" style="padding:4px;">Panel 1</div>
<div id="datepicker"></div>
</div>
<div class="panel">
<div class="ui-state-default" style="padding:4px;">Panel 2</div>
<div id="eq">
<span>88</span>
<span>77</span>
<span>55</span>
<span>33</span>
<span>40</span>
</div>
</div>
<div class="panel">
<div class="ui-state-default" style="padding:4px;">Panel 3</div>
<div id="progressbar"></div>
</div>
</div>
<div class="east">
<div id="accordion">
<h3><a href="#">Section 1</a></h3>
<div>
<p>
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
</p>
</div>
<h3><a href="#">Section 2</a></h3>
<div>
<p>
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
suscipit faucibus urna.
</p>
</div>
<h3><a href="#">Section 3</a></h3>
<div>
<p>
Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
</p>
<ul>
<li>List item one</li>
<li>List item two</li>
<li>List item three</li>
</ul>
</div>
<h3><a href="#">Section 4</a></h3>
<div>
<p>
Cras dictum. Pellentesque habitant morbi tristique senectus et netus
et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
mauris vel est.
</p>
<p>
Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
inceptos himenaeos.
</p>
</div>
</div>
</div>
<div class="south">Copyright 2009 - <a href="http://www.bramstein.com/">Bram Stein</a></div>
</body>
</html>