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