comparison DataTables-1.9.4/extras/TableTools/tabs.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>TableTools example</title>
8 <style type="text/css" title="currentStyle">
9 @import "../../media/css/demo_page.css";
10 @import "../../media/css/demo_table_jui.css";
11 @import "../../examples/examples_support/themes/smoothness/jquery-ui-1.8.4.custom.css";
12 @import "media/css/TableTools_JUI.css";
13 .ui-tabs .ui-tabs-panel { padding: 10px }
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="../../examples/examples_support/jquery-ui-tabs.js"></script>
18 <script type="text/javascript" charset="utf-8" src="media/js/ZeroClipboard.js"></script>
19 <script type="text/javascript" charset="utf-8" src="media/js/TableTools.js"></script>
20 <script type="text/javascript" charset="utf-8">
21 $(document).ready(function() {
22 $("#tabs").tabs( {
23 "show": function(event, ui) {
24 var jqTable = $('table.display', ui.panel);
25 if ( jqTable.length > 0 ) {
26 var oTableTools = TableTools.fnGetInstance( jqTable[0] );
27 if ( oTableTools != null && oTableTools.fnResizeRequired() )
28 {
29 /* A resize of TableTools' buttons and DataTables' columns is only required on the
30 * first visible draw of the table
31 */
32 jqTable.dataTable().fnAdjustColumnSizing();
33 oTableTools.fnResizeButtons();
34 }
35 }
36 }
37 } );
38
39 $('#example1').dataTable( {
40 "bJQueryUI": true,
41 "sPaginationType": "full_numbers",
42 "sDom": '<"H"Tfr>t<"F"ip>'
43 } );
44
45 $('#example2').dataTable( {
46 "bJQueryUI": true,
47 "sPaginationType": "full_numbers",
48 "sDom": '<"H"Tfr>t<"F"ip>'
49 } );
50 } );
51 </script>
52 </head>
53 <body id="dt_example">
54 <div id="container">
55 <div class="full_width big">
56 TableTools example
57 </div>
58
59 <h1>Preamble</h1>
60 <p>This example shows the basic initialisation of TableTools by simply including the 'T' marker in DataTables' sDom parameter. This tell DataTables to insert the TableTools toolbar in that location. Remember to include the Javascript and CSS source files as well!</p>
61 <p>It is worth noting that you might need to <a href="swf_path.html">set the <i>sSwfPath</i> parameter</a> to tell TableTools where to find the SWF file for copy and file save.</p>
62
63 <h1>Live example</h1>
64 <div id="demo">
65 <div id="tabs">
66 <ul>
67 <li><a href="#tabs-1">Trident browsers</a></li>
68 <li><a href="#tabs-2">Gecko browsers</a></li>
69 </ul>
70
71 <div id="tabs-1">
72 <table cellpadding="0" cellspacing="0" border="0" class="display" id="example1">
73 <thead>
74 <tr>
75 <th>Rendering engine</th>
76 <th>Browser</th>
77 <th>Platform(s)</th>
78 <th>Engine version</th>
79 <th>Grade</th>
80 </tr>
81 </thead>
82 <tfoot>
83 <tr>
84 <th>Rendering engine</th>
85 <th>Browser</th>
86 <th>Platform(s)</th>
87 <th>Engine version</th>
88 <th>Grade</th>
89 </tr>
90 </tfoot>
91 <tbody>
92 <tr class="odd gradeX">
93 <td>Trident</td>
94 <td>Internet
95 Explorer 4.0</td>
96 <td>Win 95+</td>
97 <td class="center">4</td>
98 <td class="center">X</td>
99 </tr>
100 <tr class="odd gradeC">
101 <td>Trident</td>
102 <td>Internet
103 Explorer 5.0</td>
104 <td>Win 95+</td>
105 <td class="center">5</td>
106 <td class="center">C</td>
107 </tr>
108 <tr class="odd gradeA">
109 <td>Trident</td>
110 <td>Internet
111 Explorer 5.5</td>
112 <td>Win 95+</td>
113 <td class="center">5.5</td>
114 <td class="center">A</td>
115 </tr>
116 <tr class="odd gradeA">
117 <td>Trident</td>
118 <td>Internet
119 Explorer 6</td>
120 <td>Win 98+</td>
121 <td class="center">6</td>
122 <td class="center">A</td>
123 </tr>
124 <tr class="odd gradeA">
125 <td>Trident</td>
126 <td>Internet Explorer 7</td>
127 <td>Win XP SP2+</td>
128 <td class="center">7</td>
129 <td class="center">A</td>
130 </tr>
131 <tr class="odd gradeA">
132 <td>Trident</td>
133 <td>AOL browser (AOL desktop)</td>
134 <td>Win XP</td>
135 <td class="center">6</td>
136 <td class="center">A</td>
137 </tr>
138 <tbody>
139 </table>
140 </div>
141
142
143 <div id="tabs-2">
144 <table cellpadding="0" cellspacing="0" border="0" class="display" id="example2">
145 <thead>
146 <tr>
147 <th>Rendering engine</th>
148 <th>Browser</th>
149 <th>Platform(s)</th>
150 <th>Engine version</th>
151 <th>Grade</th>
152 </tr>
153 </thead>
154 <tfoot>
155 <tr>
156 <th>Rendering engine</th>
157 <th>Browser</th>
158 <th>Platform(s)</th>
159 <th>Engine version</th>
160 <th>Grade</th>
161 </tr>
162 </tfoot>
163 <tbody>
164 <tr class="gradeA">
165 <td>Gecko</td>
166 <td>Firefox 1.0</td>
167 <td>Win 98+ / OSX.2+</td>
168 <td class="center">1.7</td>
169 <td class="center">A</td>
170 </tr>
171 <tr class="gradeA">
172 <td>Gecko</td>
173 <td>Firefox 1.5</td>
174 <td>Win 98+ / OSX.2+</td>
175 <td class="center">1.8</td>
176 <td class="center">A</td>
177 </tr>
178 <tr class="gradeA">
179 <td>Gecko</td>
180 <td>Firefox 2.0</td>
181 <td>Win 98+ / OSX.2+</td>
182 <td class="center">1.8</td>
183 <td class="center">A</td>
184 </tr>
185 <tr class="gradeA">
186 <td>Gecko</td>
187 <td>Firefox 3.0</td>
188 <td>Win 2k+ / OSX.3+</td>
189 <td class="center">1.9</td>
190 <td class="center">A</td>
191 </tr>
192 <tr class="gradeA">
193 <td>Gecko</td>
194 <td>Camino 1.0</td>
195 <td>OSX.2+</td>
196 <td class="center">1.8</td>
197 <td class="center">A</td>
198 </tr>
199 <tr class="gradeA">
200 <td>Gecko</td>
201 <td>Camino 1.5</td>
202 <td>OSX.3+</td>
203 <td class="center">1.8</td>
204 <td class="center">A</td>
205 </tr>
206 <tr class="gradeA">
207 <td>Gecko</td>
208 <td>Netscape 7.2</td>
209 <td>Win 95+ / Mac OS 8.6-9.2</td>
210 <td class="center">1.7</td>
211 <td class="center">A</td>
212 </tr>
213 <tr class="gradeA">
214 <td>Gecko</td>
215 <td>Netscape Browser 8</td>
216 <td>Win 98SE+</td>
217 <td class="center">1.7</td>
218 <td class="center">A</td>
219 </tr>
220 <tr class="gradeA">
221 <td>Gecko</td>
222 <td>Netscape Navigator 9</td>
223 <td>Win 98+ / OSX.2+</td>
224 <td class="center">1.8</td>
225 <td class="center">A</td>
226 </tr>
227 <tr class="gradeA">
228 <td>Gecko</td>
229 <td>Mozilla 1.0</td>
230 <td>Win 95+ / OSX.1+</td>
231 <td class="center">1</td>
232 <td class="center">A</td>
233 </tr>
234 <tr class="gradeA">
235 <td>Gecko</td>
236 <td>Mozilla 1.1</td>
237 <td>Win 95+ / OSX.1+</td>
238 <td class="center">1.1</td>
239 <td class="center">A</td>
240 </tr>
241 <tr class="gradeA">
242 <td>Gecko</td>
243 <td>Mozilla 1.2</td>
244 <td>Win 95+ / OSX.1+</td>
245 <td class="center">1.2</td>
246 <td class="center">A</td>
247 </tr>
248 <tr class="gradeA">
249 <td>Gecko</td>
250 <td>Mozilla 1.3</td>
251 <td>Win 95+ / OSX.1+</td>
252 <td class="center">1.3</td>
253 <td class="center">A</td>
254 </tr>
255 <tr class="gradeA">
256 <td>Gecko</td>
257 <td>Mozilla 1.4</td>
258 <td>Win 95+ / OSX.1+</td>
259 <td class="center">1.4</td>
260 <td class="center">A</td>
261 </tr>
262 <tr class="gradeA">
263 <td>Gecko</td>
264 <td>Mozilla 1.5</td>
265 <td>Win 95+ / OSX.1+</td>
266 <td class="center">1.5</td>
267 <td class="center">A</td>
268 </tr>
269 <tr class="gradeA">
270 <td>Gecko</td>
271 <td>Mozilla 1.6</td>
272 <td>Win 95+ / OSX.1+</td>
273 <td class="center">1.6</td>
274 <td class="center">A</td>
275 </tr>
276 <tr class="gradeA">
277 <td>Gecko</td>
278 <td>Mozilla 1.7</td>
279 <td>Win 98+ / OSX.1+</td>
280 <td class="center">1.7</td>
281 <td class="center">A</td>
282 </tr>
283 <tr class="gradeA">
284 <td>Gecko</td>
285 <td>Mozilla 1.8</td>
286 <td>Win 98+ / OSX.1+</td>
287 <td class="center">1.8</td>
288 <td class="center">A</td>
289 </tr>
290 <tr class="gradeA">
291 <td>Gecko</td>
292 <td>Seamonkey 1.1</td>
293 <td>Win 98+ / OSX.2+</td>
294 <td class="center">1.8</td>
295 <td class="center">A</td>
296 </tr>
297 <tr class="gradeA">
298 <td>Gecko</td>
299 <td>Epiphany 2.20</td>
300 <td>Gnome</td>
301 <td class="center">1.8</td>
302 <td class="center">A</td>
303 </tr>
304 </tbody>
305 </table>
306 </div>
307 </div>
308 </div>
309 <div class="spacer"></div>
310
311 <h1>Initialisation code</h1>
312 <pre>$(document).ready( function () {
313 $('#example').dataTable( {
314 "sDom": 'T&lt;"clear"&gt;lfrtip'
315 } );
316 } );</pre>
317
318
319 <h1>Other examples</h1>
320 <ul>
321 <li><a href="index.html">Basic initialisation</a></li>
322 <li><a href="swf_path.html">Setting the SWF path</a></li>
323 <li><a href="alter_buttons.html">Custom button arrangement</a></li>
324 <li><a href="button_text.html">Button text alteration</a></li>
325 <li><a href="collection.html">Using button collections</a></li>
326 <li><a href="theme.html">Using jQuery UI themes</a></li>
327 <li><a href="bootstrap.html">Styling with Twitter Bootstrap</a></li>
328 <li><a href="multi_instance.html">Multiple TableTools toolbars for a single table</a></li>
329 <li><a href="multiple_tables.html">Multiple DataTables with a single initialisation</a></li>
330 <li><a href="select_multi.html">User selectable rows (multiple rows)</a></li>
331 <li><a href="select_single.html">User selectable rows (single row)</a></li>
332 <li><a href="alt_init.html">Alternative initialisation using 'new TableTools()'</a></li>
333 <li><a href="defaults.html">Altering the TableTools defaults</a></li>
334 <li><a href="plug-in.html">TableTools plug-in buttons</a></li>
335 <li><a href="pdf_message.html">Customising the PDF output (adding text and orientation)</a></li>
336 </ul>
337
338
339 <div id="footer" style="text-align:center;">
340 <span style="font-size:10px;">
341 TableTools and DataTables &copy; Allan Jardine 2009-2011.<br>
342 Flash 10 save / copy operations are performed by a modified version of <a href="http://code.google.com/p/zeroclipboard/">Zero Clipboard</a>.<br>
343 The icons used in the toolbar are modified from <a href="http://www.addictedtocoffee.de/">Oliver Twardowski's</a> <a href="http://www.smashingmagazine.com/2009/05/20/flavour-extended-the-ultimate-icon-set-for-web-designers/">Flavours Icon set</a>.
344 </span>
345 </div>
346 </div>
347 </body>
348 </html>