Mercurial > repos > saskia-hiltemann > ireport
comparison DataTables-1.9.4/extras/FixedColumns/x_y_scrolling.html @ 0:ac5f9272033b draft
first upload
author | saskia-hiltemann |
---|---|
date | Tue, 01 Jul 2014 11:42:23 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ac5f9272033b |
---|---|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
2 <html> | |
3 <head> | |
4 <meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
5 <link rel="shortcut icon" type="image/ico" href="http://www.sprymedia.co.uk/media/images/favicon.ico"> | |
6 | |
7 <title>FixedColumns example</title> | |
8 <style type="text/css" title="currentStyle"> | |
9 @import "../../media/css/demo_page.css"; | |
10 @import "../../media/css/demo_table.css"; | |
11 td.index { background-color: white; border-right: 1px solid black; } | |
12 table.display th.sorting_disabled { border-bottom: 1px solid white; } | |
13 </style> | |
14 <script type="text/javascript" charset="utf-8" src="../../media/js/jquery.js"></script> | |
15 <script type="text/javascript" charset="utf-8" src="../../media/js/jquery.dataTables.js"></script> | |
16 <script type="text/javascript" charset="utf-8" src="media/js/FixedColumns.js"></script> | |
17 <script type="text/javascript" charset="utf-8"> | |
18 $(document).ready( function () { | |
19 var oTable = $('#example').dataTable( { | |
20 "sScrollY": "300px", | |
21 "sScrollX": "100%", | |
22 "sScrollXInner": "150%", | |
23 "bScrollCollapse": true, | |
24 "bPaginate": false, | |
25 "fnPreDrawCallback": function ( oSettings ) { | |
26 /* Need to redo the counters if filtered or sorted */ | |
27 if ( oSettings.bSorted || oSettings.bFiltered ) { | |
28 for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ ) { | |
29 var nTr = oSettings.aoData[ oSettings.aiDisplay[i] ].nTr; | |
30 | |
31 // Update the index column and do so without redrawing the table | |
32 this.fnUpdate( i+1, nTr, 0, false, false ); | |
33 } | |
34 } | |
35 }, | |
36 "aoColumnDefs": [ | |
37 { "bSortable": false, "sClass": "index", "aTargets": [ 0 ] } | |
38 ], | |
39 "aaSorting": [[ 1, 'asc' ]] | |
40 } ); | |
41 new FixedColumns( oTable ); | |
42 } ); | |
43 </script> | |
44 </head> | |
45 <body id="dt_example"> | |
46 <div id="container"> | |
47 <div class="full_width big"> | |
48 FixedColumns example - X and Y scrolling | |
49 </div> | |
50 | |
51 <h1>Preamble</h1> | |
52 <p>This example is basically the same as the <a href="index_column.html">index column example</a> but in this case shows pagination disabled and Y scrolling in use.</p> | |
53 | |
54 <h1>Live example</h1> | |
55 <div id="demo"> | |
56 <table cellpadding="0" cellspacing="0" border="0" class="display" id="example"> | |
57 <thead> | |
58 <tr> | |
59 <th width="3%"> </th> | |
60 <th>Rendering engine</th> | |
61 <th>Browser</th> | |
62 <th>Platform(s)</th> | |
63 <th>Engine version</th> | |
64 <th>CSS grade</th> | |
65 </tr> | |
66 </thead> | |
67 <tbody> | |
68 <tr class="gradeX"> | |
69 <td class="center">1</td> | |
70 <td>Trident</td> | |
71 <td>Internet | |
72 Explorer 4.0</td> | |
73 <td>Win 95+</td> | |
74 <td class="center">4</td> | |
75 <td class="center">X</td> | |
76 </tr> | |
77 <tr class="gradeC"> | |
78 <td class="center">2</td> | |
79 <td>Trident</td> | |
80 <td>Internet | |
81 Explorer 5.0</td> | |
82 <td>Win 95+</td> | |
83 <td class="center">5</td> | |
84 <td class="center">C</td> | |
85 </tr> | |
86 <tr class="gradeA"> | |
87 <td class="center">3</td> | |
88 <td>Trident</td> | |
89 <td>Internet | |
90 Explorer 5.5</td> | |
91 <td>Win 95+</td> | |
92 <td class="center">5.5</td> | |
93 <td class="center">A</td> | |
94 </tr> | |
95 <tr class="gradeA"> | |
96 <td class="center">4</td> | |
97 <td>Trident</td> | |
98 <td>Internet | |
99 Explorer 6</td> | |
100 <td>Win 98+</td> | |
101 <td class="center">6</td> | |
102 <td class="center">A</td> | |
103 </tr> | |
104 <tr class="gradeA"> | |
105 <td class="center">5</td> | |
106 <td>Trident</td> | |
107 <td>Internet Explorer 7</td> | |
108 <td>Win XP SP2+</td> | |
109 <td class="center">7</td> | |
110 <td class="center">A</td> | |
111 </tr> | |
112 <tr class="gradeA"> | |
113 <td class="center">6</td> | |
114 <td>Trident</td> | |
115 <td>AOL browser (AOL desktop)</td> | |
116 <td>Win XP</td> | |
117 <td class="center">6</td> | |
118 <td class="center">A</td> | |
119 </tr> | |
120 <tr class="gradeA"> | |
121 <td class="center">7</td> | |
122 <td>Gecko</td> | |
123 <td>Firefox 1.0</td> | |
124 <td>Win 98+ / OSX.2+</td> | |
125 <td class="center">1.7</td> | |
126 <td class="center">A</td> | |
127 </tr> | |
128 <tr class="gradeA"> | |
129 <td class="center">8</td> | |
130 <td>Gecko</td> | |
131 <td>Firefox 1.5</td> | |
132 <td>Win 98+ / OSX.2+</td> | |
133 <td class="center">1.8</td> | |
134 <td class="center">A</td> | |
135 </tr> | |
136 <tr class="gradeA"> | |
137 <td class="center">9</td> | |
138 <td>Gecko</td> | |
139 <td>Firefox 2.0</td> | |
140 <td>Win 98+ / OSX.2+</td> | |
141 <td class="center">1.8</td> | |
142 <td class="center">A</td> | |
143 </tr> | |
144 <tr class="gradeA"> | |
145 <td class="center">10</td> | |
146 <td>Gecko</td> | |
147 <td>Firefox 3.0</td> | |
148 <td>Win 2k+ / OSX.3+</td> | |
149 <td class="center">1.9</td> | |
150 <td class="center">A</td> | |
151 </tr> | |
152 <tr class="gradeA"> | |
153 <td class="center">11</td> | |
154 <td>Gecko</td> | |
155 <td>Camino 1.0</td> | |
156 <td>OSX.2+</td> | |
157 <td class="center">1.8</td> | |
158 <td class="center">A</td> | |
159 </tr> | |
160 <tr class="gradeA"> | |
161 <td class="center">12</td> | |
162 <td>Gecko</td> | |
163 <td>Camino 1.5</td> | |
164 <td>OSX.3+</td> | |
165 <td class="center">1.8</td> | |
166 <td class="center">A</td> | |
167 </tr> | |
168 <tr class="gradeA"> | |
169 <td class="center">13</td> | |
170 <td>Gecko</td> | |
171 <td>Netscape 7.2</td> | |
172 <td>Win 95+ / Mac OS 8.6-9.2</td> | |
173 <td class="center">1.7</td> | |
174 <td class="center">A</td> | |
175 </tr> | |
176 <tr class="gradeA"> | |
177 <td class="center">14</td> | |
178 <td>Gecko</td> | |
179 <td>Netscape Browser 8</td> | |
180 <td>Win 98SE+</td> | |
181 <td class="center">1.7</td> | |
182 <td class="center">A</td> | |
183 </tr> | |
184 <tr class="gradeA"> | |
185 <td class="center">15</td> | |
186 <td>Gecko</td> | |
187 <td>Netscape Navigator 9</td> | |
188 <td>Win 98+ / OSX.2+</td> | |
189 <td class="center">1.8</td> | |
190 <td class="center">A</td> | |
191 </tr> | |
192 <tr class="gradeA"> | |
193 <td class="center">16</td> | |
194 <td>Gecko</td> | |
195 <td>Mozilla 1.0</td> | |
196 <td>Win 95+ / OSX.1+</td> | |
197 <td class="center">1</td> | |
198 <td class="center">A</td> | |
199 </tr> | |
200 <tr class="gradeA"> | |
201 <td class="center">17</td> | |
202 <td>Gecko</td> | |
203 <td>Mozilla 1.1</td> | |
204 <td>Win 95+ / OSX.1+</td> | |
205 <td class="center">1.1</td> | |
206 <td class="center">A</td> | |
207 </tr> | |
208 <tr class="gradeA"> | |
209 <td class="center">18</td> | |
210 <td>Gecko</td> | |
211 <td>Mozilla 1.2</td> | |
212 <td>Win 95+ / OSX.1+</td> | |
213 <td class="center">1.2</td> | |
214 <td class="center">A</td> | |
215 </tr> | |
216 <tr class="gradeA"> | |
217 <td class="center">19</td> | |
218 <td>Gecko</td> | |
219 <td>Mozilla 1.3</td> | |
220 <td>Win 95+ / OSX.1+</td> | |
221 <td class="center">1.3</td> | |
222 <td class="center">A</td> | |
223 </tr> | |
224 <tr class="gradeA"> | |
225 <td class="center">20</td> | |
226 <td>Gecko</td> | |
227 <td>Mozilla 1.4</td> | |
228 <td>Win 95+ / OSX.1+</td> | |
229 <td class="center">1.4</td> | |
230 <td class="center">A</td> | |
231 </tr> | |
232 <tr class="gradeA"> | |
233 <td class="center">21</td> | |
234 <td>Gecko</td> | |
235 <td>Mozilla 1.5</td> | |
236 <td>Win 95+ / OSX.1+</td> | |
237 <td class="center">1.5</td> | |
238 <td class="center">A</td> | |
239 </tr> | |
240 <tr class="gradeA"> | |
241 <td class="center">22</td> | |
242 <td>Gecko</td> | |
243 <td>Mozilla 1.6</td> | |
244 <td>Win 95+ / OSX.1+</td> | |
245 <td class="center">1.6</td> | |
246 <td class="center">A</td> | |
247 </tr> | |
248 <tr class="gradeA"> | |
249 <td class="center">23</td> | |
250 <td>Gecko</td> | |
251 <td>Mozilla 1.7</td> | |
252 <td>Win 98+ / OSX.1+</td> | |
253 <td class="center">1.7</td> | |
254 <td class="center">A</td> | |
255 </tr> | |
256 <tr class="gradeA"> | |
257 <td class="center">24</td> | |
258 <td>Gecko</td> | |
259 <td>Mozilla 1.8</td> | |
260 <td>Win 98+ / OSX.1+</td> | |
261 <td class="center">1.8</td> | |
262 <td class="center">A</td> | |
263 </tr> | |
264 <tr class="gradeA"> | |
265 <td class="center">25</td> | |
266 <td>Gecko</td> | |
267 <td>Seamonkey 1.1</td> | |
268 <td>Win 98+ / OSX.2+</td> | |
269 <td class="center">1.8</td> | |
270 <td class="center">A</td> | |
271 </tr> | |
272 <tr class="gradeA"> | |
273 <td class="center">26</td> | |
274 <td>Gecko</td> | |
275 <td>Epiphany 2.20</td> | |
276 <td>Gnome</td> | |
277 <td class="center">1.8</td> | |
278 <td class="center">A</td> | |
279 </tr> | |
280 <tr class="gradeA"> | |
281 <td class="center">27</td> | |
282 <td>Webkit</td> | |
283 <td>Safari 1.2</td> | |
284 <td>OSX.3</td> | |
285 <td class="center">125.5</td> | |
286 <td class="center">A</td> | |
287 </tr> | |
288 <tr class="gradeA"> | |
289 <td class="center">28</td> | |
290 <td>Webkit</td> | |
291 <td>Safari 1.3</td> | |
292 <td>OSX.3</td> | |
293 <td class="center">312.8</td> | |
294 <td class="center">A</td> | |
295 </tr> | |
296 <tr class="gradeA"> | |
297 <td class="center">29</td> | |
298 <td>Webkit</td> | |
299 <td>Safari 2.0</td> | |
300 <td>OSX.4+</td> | |
301 <td class="center">419.3</td> | |
302 <td class="center">A</td> | |
303 </tr> | |
304 <tr class="gradeA"> | |
305 <td class="center">30</td> | |
306 <td>Webkit</td> | |
307 <td>Safari 3.0</td> | |
308 <td>OSX.4+</td> | |
309 <td class="center">522.1</td> | |
310 <td class="center">A</td> | |
311 </tr> | |
312 <tr class="gradeA"> | |
313 <td class="center">31</td> | |
314 <td>Webkit</td> | |
315 <td>OmniWeb 5.5</td> | |
316 <td>OSX.4+</td> | |
317 <td class="center">420</td> | |
318 <td class="center">A</td> | |
319 </tr> | |
320 <tr class="gradeA"> | |
321 <td class="center">32</td> | |
322 <td>Webkit</td> | |
323 <td>iPod Touch / iPhone</td> | |
324 <td>iPod</td> | |
325 <td class="center">420.1</td> | |
326 <td class="center">A</td> | |
327 </tr> | |
328 <tr class="gradeA"> | |
329 <td class="center">33</td> | |
330 <td>Webkit</td> | |
331 <td>S60</td> | |
332 <td>S60</td> | |
333 <td class="center">413</td> | |
334 <td class="center">A</td> | |
335 </tr> | |
336 <tr class="gradeA"> | |
337 <td class="center">34</td> | |
338 <td>Presto</td> | |
339 <td>Opera 7.0</td> | |
340 <td>Win 95+ / OSX.1+</td> | |
341 <td class="center">-</td> | |
342 <td class="center">A</td> | |
343 </tr> | |
344 <tr class="gradeA"> | |
345 <td class="center">35</td> | |
346 <td>Presto</td> | |
347 <td>Opera 7.5</td> | |
348 <td>Win 95+ / OSX.2+</td> | |
349 <td class="center">-</td> | |
350 <td class="center">A</td> | |
351 </tr> | |
352 <tr class="gradeA"> | |
353 <td class="center">36</td> | |
354 <td>Presto</td> | |
355 <td>Opera 8.0</td> | |
356 <td>Win 95+ / OSX.2+</td> | |
357 <td class="center">-</td> | |
358 <td class="center">A</td> | |
359 </tr> | |
360 <tr class="gradeA"> | |
361 <td class="center">37</td> | |
362 <td>Presto</td> | |
363 <td>Opera 8.5</td> | |
364 <td>Win 95+ / OSX.2+</td> | |
365 <td class="center">-</td> | |
366 <td class="center">A</td> | |
367 </tr> | |
368 <tr class="gradeA"> | |
369 <td class="center">38</td> | |
370 <td>Presto</td> | |
371 <td>Opera 9.0</td> | |
372 <td>Win 95+ / OSX.3+</td> | |
373 <td class="center">-</td> | |
374 <td class="center">A</td> | |
375 </tr> | |
376 <tr class="gradeA"> | |
377 <td class="center">39</td> | |
378 <td>Presto</td> | |
379 <td>Opera 9.2</td> | |
380 <td>Win 88+ / OSX.3+</td> | |
381 <td class="center">-</td> | |
382 <td class="center">A</td> | |
383 </tr> | |
384 <tr class="gradeA"> | |
385 <td class="center">40</td> | |
386 <td>Presto</td> | |
387 <td>Opera 9.5</td> | |
388 <td>Win 88+ / OSX.3+</td> | |
389 <td class="center">-</td> | |
390 <td class="center">A</td> | |
391 </tr> | |
392 <tr class="gradeA"> | |
393 <td class="center">41</td> | |
394 <td>Presto</td> | |
395 <td>Opera for Wii</td> | |
396 <td>Wii</td> | |
397 <td class="center">-</td> | |
398 <td class="center">A</td> | |
399 </tr> | |
400 <tr class="gradeA"> | |
401 <td class="center">42</td> | |
402 <td>Presto</td> | |
403 <td>Nokia N800</td> | |
404 <td>N800</td> | |
405 <td class="center">-</td> | |
406 <td class="center">A</td> | |
407 </tr> | |
408 <tr class="gradeA"> | |
409 <td class="center">43</td> | |
410 <td>Presto</td> | |
411 <td>Nintendo DS browser</td> | |
412 <td>Nintendo DS</td> | |
413 <td class="center">8.5</td> | |
414 <td class="center">C/A</td> | |
415 </tr> | |
416 <tr class="gradeC"> | |
417 <td class="center">44</td> | |
418 <td>KHTML</td> | |
419 <td>Konqureror 3.1</td> | |
420 <td>KDE 3.1</td> | |
421 <td class="center">3.1</td> | |
422 <td class="center">C</td> | |
423 </tr> | |
424 <tr class="gradeA"> | |
425 <td class="center">45</td> | |
426 <td>KHTML</td> | |
427 <td>Konqureror 3.3</td> | |
428 <td>KDE 3.3</td> | |
429 <td class="center">3.3</td> | |
430 <td class="center">A</td> | |
431 </tr> | |
432 <tr class="gradeA"> | |
433 <td class="center">46</td> | |
434 <td>KHTML</td> | |
435 <td>Konqureror 3.5</td> | |
436 <td>KDE 3.5</td> | |
437 <td class="center">3.5</td> | |
438 <td class="center">A</td> | |
439 </tr> | |
440 <tr class="gradeX"> | |
441 <td class="center">47</td> | |
442 <td>Tasman</td> | |
443 <td>Internet Explorer 4.5</td> | |
444 <td>Mac OS 8-9</td> | |
445 <td class="center">-</td> | |
446 <td class="center">X</td> | |
447 </tr> | |
448 <tr class="gradeC"> | |
449 <td class="center">48</td> | |
450 <td>Tasman</td> | |
451 <td>Internet Explorer 5.1</td> | |
452 <td>Mac OS 7.6-9</td> | |
453 <td class="center">1</td> | |
454 <td class="center">C</td> | |
455 </tr> | |
456 <tr class="gradeC"> | |
457 <td class="center">49</td> | |
458 <td>Tasman</td> | |
459 <td>Internet Explorer 5.2</td> | |
460 <td>Mac OS 8-X</td> | |
461 <td class="center">1</td> | |
462 <td class="center">C</td> | |
463 </tr> | |
464 <tr class="gradeA"> | |
465 <td class="center">50</td> | |
466 <td>Misc</td> | |
467 <td>NetFront 3.1</td> | |
468 <td>Embedded devices</td> | |
469 <td class="center">-</td> | |
470 <td class="center">C</td> | |
471 </tr> | |
472 <tr class="gradeA"> | |
473 <td class="center">51</td> | |
474 <td>Misc</td> | |
475 <td>NetFront 3.4</td> | |
476 <td>Embedded devices</td> | |
477 <td class="center">-</td> | |
478 <td class="center">A</td> | |
479 </tr> | |
480 <tr class="gradeX"> | |
481 <td class="center">52</td> | |
482 <td>Misc</td> | |
483 <td>Dillo 0.8</td> | |
484 <td>Embedded devices</td> | |
485 <td class="center">-</td> | |
486 <td class="center">X</td> | |
487 </tr> | |
488 <tr class="gradeX"> | |
489 <td class="center">53</td> | |
490 <td>Misc</td> | |
491 <td>Links</td> | |
492 <td>Text only</td> | |
493 <td class="center">-</td> | |
494 <td class="center">X</td> | |
495 </tr> | |
496 <tr class="gradeX"> | |
497 <td class="center">54</td> | |
498 <td>Misc</td> | |
499 <td>Lynx</td> | |
500 <td>Text only</td> | |
501 <td class="center">-</td> | |
502 <td class="center">X</td> | |
503 </tr> | |
504 <tr class="gradeC"> | |
505 <td class="center">55</td> | |
506 <td>Misc</td> | |
507 <td>IE Mobile</td> | |
508 <td>Windows Mobile 6</td> | |
509 <td class="center">-</td> | |
510 <td class="center">C</td> | |
511 </tr> | |
512 <tr class="gradeC"> | |
513 <td class="center">56</td> | |
514 <td>Misc</td> | |
515 <td>PSP browser</td> | |
516 <td>PSP</td> | |
517 <td class="center">-</td> | |
518 <td class="center">C</td> | |
519 </tr> | |
520 <tr class="gradeU"> | |
521 <td class="center">57</td> | |
522 <td>Other browsers</td> | |
523 <td>All others</td> | |
524 <td>-</td> | |
525 <td class="center">-</td> | |
526 <td class="center">U</td> | |
527 </tr> | |
528 </tbody> | |
529 </table> | |
530 </div> | |
531 <div class="spacer"></div> | |
532 | |
533 | |
534 <h1>Initialisation code</h1> | |
535 <pre>$(document).ready( function () { | |
536 var oTable = $('#example').dataTable( { | |
537 "sScrollY": "300px", | |
538 "sScrollX": "100%", | |
539 "sScrollXInner": "150%", | |
540 "bScrollCollapse": true, | |
541 "bPaginate": false, | |
542 "fnDrawCallback": function ( oSettings ) { | |
543 /* Need to redo the counters if filtered or sorted */ | |
544 if ( oSettings.bSorted || oSettings.bFiltered ) { | |
545 for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ ) { | |
546 var nTr = oSettings.aoData[ oSettings.aiDisplay[i] ].nTr; | |
547 | |
548 // Update the index column and do so without redrawing the table | |
549 this.fnUpdate( i+1, nTr, 0, false, false ); | |
550 } | |
551 } | |
552 }, | |
553 "aoColumnDefs": [ | |
554 { "bSortable": false, "sClass": "index", "aTargets": [ 0 ] } | |
555 ], | |
556 "aaSorting": [[ 1, 'asc' ]] | |
557 } ); | |
558 new FixedColumns( oTable ); | |
559 } );</pre> | |
560 | |
561 | |
562 <h1>Documentation</h1> | |
563 <ul> | |
564 <li><a href="http://datatables.net/extras/fixedcolumns">Usage</a></li> | |
565 <li><a href="http://datatables.net/docs/FixedColumns">API / parameters</a></li> | |
566 </ul> | |
567 | |
568 <h1>Basic examples</h1> | |
569 <ul> | |
570 <li><a href="index.html">Basic demo of FixedColumns with zero initialisation</a></li> | |
571 <li><a href="left_right_columns.html">Fix the left and right columns in place</a></li> | |
572 <li><a href="index_column.html">Index column attached to side of the table</a></li> | |
573 <li><a href="x_y_scrolling.html">Index column, but with Y scrolling and no pagination</a></li> | |
574 <li><a href="two_columns.html">Two columns fixed in place</a></li> | |
575 <li><a href="right_column.html">Fix the right column in place</a></li> | |
576 <li><a href="css_size.html">Speeding up row height matching with CSS</a></li> | |
577 <li><a href="themed.html">jQuery UI themed table with FixedColumns</a></li> | |
578 </ul> | |
579 | |
580 <h1>Advanced examples</h1> | |
581 <ul> | |
582 <li><a href="rowspan.html">Using ROWSPAN with FixedColumns</a></li> | |
583 <li><a href="server-side-processing.html">Server-side processing with FixedColumns</a></li> | |
584 <li><a href="col_filter.html">Individual column filtering</a></li> | |
585 <li><a href="scale_fixed.html">Setting the fixed column width and resizing the table</a></li> | |
586 <li><a href="scale_relative.html">Setting the fixed column width with relative sizing</a></li> | |
587 <li><a href="row_grouping_height.html">Row grouping by grouping like rows in the fixed column</a></li> | |
588 <li><a href="row_grouping.html">Row grouping by inserting a grouping row</a></li> | |
589 <ul> | |
590 | |
591 | |
592 <div id="footer" style="text-align:center;"> | |
593 <span style="font-size:10px;"> | |
594 FixedColumns and DataTables © Allan Jardine 2011.<br> | |
595 </span> | |
596 </div> | |
597 </div> | |
598 </body> | |
599 </html> |