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