]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/static/AdminLTE-2.3.7/plugins/datatables/extensions/Responsive/examples/display-control/complexHeader.html
update sources to v12.1.0
[ceph.git] / ceph / src / pybind / mgr / dashboard / static / AdminLTE-2.3.7 / plugins / datatables / extensions / Responsive / examples / display-control / complexHeader.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
6 <meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
7
8 <title>Responsive example - Complex headers (rowspan / colspan)</title>
9 <link rel="stylesheet" type="text/css" href="../../../../media/css/jquery.dataTables.css">
10 <link rel="stylesheet" type="text/css" href="../../css/dataTables.responsive.css">
11 <link rel="stylesheet" type="text/css" href="../../../../examples/resources/syntax/shCore.css">
12 <link rel="stylesheet" type="text/css" href="../../../../examples/resources/demo.css">
13 <style type="text/css" class="init">
14
15 th {
16 position: relative;
17 min-height: 41px;
18 }
19 span {
20 display: block;
21 position: absolute;
22 left: 0;
23 right: 0;
24 white-space: nowrap;
25 text-overflow: ellipsis;
26 overflow: hidden;
27 }
28
29 </style>
30 <script type="text/javascript" language="javascript" src="../../../../media/js/jquery.js"></script>
31 <script type="text/javascript" language="javascript" src="../../../../media/js/jquery.dataTables.js"></script>
32 <script type="text/javascript" language="javascript" src="../../js/dataTables.responsive.js"></script>
33 <script type="text/javascript" language="javascript" src="../../../../examples/resources/syntax/shCore.js"></script>
34 <script type="text/javascript" language="javascript" src="../../../../examples/resources/demo.js"></script>
35 <script type="text/javascript" language="javascript" class="init">
36
37
38
39 $(document).ready(function() {
40 // jQuery update a column title from the demo table to contain a long description
41 // You would not need to do this in your own code.
42 $('#example thead tr:eq(0) th:eq(2)').html("This is a really long column title!");
43
44 // Wrap the colspan'ing header cells with a span so they can be positioned
45 // absolutely - filling the available space, and no more.
46 $('#example thead th[colspan]').wrapInner( '<span/>' ).append( '&nbsp;' );
47
48 // Standard initialisation
49 $('#example').DataTable( {
50 responsive: true,
51 paging: false
52 } );
53 } );
54
55
56
57 </script>
58 </head>
59
60 <body class="dt-example">
61 <div class="container">
62 <section>
63 <h1>Responsive example <span>Complex headers (rowspan / colspan)</span></h1>
64
65 <div class="info">
66 <p>This example shows how Responsive can be used with <em>complex headers</em> (i.e. headers that contain <code>colspan</code> attributes for one or more cells).
67 As Responsive will removed columns one at a time the cell with the <code>colspan</code> attribute can end up forcing the width of a column, disrupting the flow.
68 Rather than removing all columns under the <code>colspan</code> cell, we want to reduce the amount of text that is visible in that cell. This example shows how
69 that can be achieved thought a little bit of jQuery and CSS.</p>
70
71 <p>We use jQuery to find the header cells which have a <code>colspan</code> attribute and wrap their contents in a <code class="tag" title="HTML tag">span</code>
72 tag. That <code class="tag" title="HTML tag">span</code> is then set to <code>position: absolute;</code> using <code>text-overflow: ellipsis</code>. The result is
73 that the text of the <code>colspan</code> cell will reduce automatically to fit the available area based on the contents of the column cells below it.</p>
74
75 <p>This functionality is not currently built into Responsive. It likely will be for v1.1.</p>
76 </div>
77
78 <table id="example" class="display nowrap" cellspacing="0" width="100%">
79 <thead>
80 <tr>
81 <th rowspan="2">Name</th>
82 <th colspan="2">HR Information</th>
83 <th colspan="3">Contact</th>
84 </tr>
85 <tr>
86 <th>Position</th>
87 <th>Salary</th>
88 <th>Office</th>
89 <th>Extn.</th>
90 <th>E-mail</th>
91 </tr>
92 </thead>
93
94 <tfoot>
95 <tr>
96 <th>Name</th>
97 <th>Position</th>
98 <th>Salary</th>
99 <th>Office</th>
100 <th>Extn.</th>
101 <th>E-mail</th>
102 </tr>
103 </tfoot>
104
105 <tbody>
106 <tr>
107 <td>Tiger Nixon</td>
108 <td>System Architect</td>
109 <td>$320,800</td>
110 <td>Edinburgh</td>
111 <td>5421</td>
112 <td>t.nixon@datatables.net</td>
113 </tr>
114 <tr>
115 <td>Garrett Winters</td>
116 <td>Accountant</td>
117 <td>$170,750</td>
118 <td>Tokyo</td>
119 <td>8422</td>
120 <td>g.winters@datatables.net</td>
121 </tr>
122 <tr>
123 <td>Ashton Cox</td>
124 <td>Junior Technical Author</td>
125 <td>$86,000</td>
126 <td>San Francisco</td>
127 <td>1562</td>
128 <td>a.cox@datatables.net</td>
129 </tr>
130 <tr>
131 <td>Cedric Kelly</td>
132 <td>Senior Javascript Developer</td>
133 <td>$433,060</td>
134 <td>Edinburgh</td>
135 <td>6224</td>
136 <td>c.kelly@datatables.net</td>
137 </tr>
138 <tr>
139 <td>Airi Satou</td>
140 <td>Accountant</td>
141 <td>$162,700</td>
142 <td>Tokyo</td>
143 <td>5407</td>
144 <td>a.satou@datatables.net</td>
145 </tr>
146 <tr>
147 <td>Brielle Williamson</td>
148 <td>Integration Specialist</td>
149 <td>$372,000</td>
150 <td>New York</td>
151 <td>4804</td>
152 <td>b.williamson@datatables.net</td>
153 </tr>
154 <tr>
155 <td>Herrod Chandler</td>
156 <td>Sales Assistant</td>
157 <td>$137,500</td>
158 <td>San Francisco</td>
159 <td>9608</td>
160 <td>h.chandler@datatables.net</td>
161 </tr>
162 <tr>
163 <td>Rhona Davidson</td>
164 <td>Integration Specialist</td>
165 <td>$327,900</td>
166 <td>Tokyo</td>
167 <td>6200</td>
168 <td>r.davidson@datatables.net</td>
169 </tr>
170 <tr>
171 <td>Colleen Hurst</td>
172 <td>Javascript Developer</td>
173 <td>$205,500</td>
174 <td>San Francisco</td>
175 <td>2360</td>
176 <td>c.hurst@datatables.net</td>
177 </tr>
178 <tr>
179 <td>Sonya Frost</td>
180 <td>Software Engineer</td>
181 <td>$103,600</td>
182 <td>Edinburgh</td>
183 <td>1667</td>
184 <td>s.frost@datatables.net</td>
185 </tr>
186 <tr>
187 <td>Jena Gaines</td>
188 <td>Office Manager</td>
189 <td>$90,560</td>
190 <td>London</td>
191 <td>3814</td>
192 <td>j.gaines@datatables.net</td>
193 </tr>
194 <tr>
195 <td>Quinn Flynn</td>
196 <td>Support Lead</td>
197 <td>$342,000</td>
198 <td>Edinburgh</td>
199 <td>9497</td>
200 <td>q.flynn@datatables.net</td>
201 </tr>
202 <tr>
203 <td>Charde Marshall</td>
204 <td>Regional Director</td>
205 <td>$470,600</td>
206 <td>San Francisco</td>
207 <td>6741</td>
208 <td>c.marshall@datatables.net</td>
209 </tr>
210 <tr>
211 <td>Haley Kennedy</td>
212 <td>Senior Marketing Designer</td>
213 <td>$313,500</td>
214 <td>London</td>
215 <td>3597</td>
216 <td>h.kennedy@datatables.net</td>
217 </tr>
218 <tr>
219 <td>Tatyana Fitzpatrick</td>
220 <td>Regional Director</td>
221 <td>$385,750</td>
222 <td>London</td>
223 <td>1965</td>
224 <td>t.fitzpatrick@datatables.net</td>
225 </tr>
226 <tr>
227 <td>Michael Silva</td>
228 <td>Marketing Designer</td>
229 <td>$198,500</td>
230 <td>London</td>
231 <td>1581</td>
232 <td>m.silva@datatables.net</td>
233 </tr>
234 <tr>
235 <td>Paul Byrd</td>
236 <td>Chief Financial Officer (CFO)</td>
237 <td>$725,000</td>
238 <td>New York</td>
239 <td>3059</td>
240 <td>p.byrd@datatables.net</td>
241 </tr>
242 <tr>
243 <td>Gloria Little</td>
244 <td>Systems Administrator</td>
245 <td>$237,500</td>
246 <td>New York</td>
247 <td>1721</td>
248 <td>g.little@datatables.net</td>
249 </tr>
250 <tr>
251 <td>Bradley Greer</td>
252 <td>Software Engineer</td>
253 <td>$132,000</td>
254 <td>London</td>
255 <td>2558</td>
256 <td>b.greer@datatables.net</td>
257 </tr>
258 <tr>
259 <td>Dai Rios</td>
260 <td>Personnel Lead</td>
261 <td>$217,500</td>
262 <td>Edinburgh</td>
263 <td>2290</td>
264 <td>d.rios@datatables.net</td>
265 </tr>
266 <tr>
267 <td>Jenette Caldwell</td>
268 <td>Development Lead</td>
269 <td>$345,000</td>
270 <td>New York</td>
271 <td>1937</td>
272 <td>j.caldwell@datatables.net</td>
273 </tr>
274 <tr>
275 <td>Yuri Berry</td>
276 <td>Chief Marketing Officer (CMO)</td>
277 <td>$675,000</td>
278 <td>New York</td>
279 <td>6154</td>
280 <td>y.berry@datatables.net</td>
281 </tr>
282 <tr>
283 <td>Caesar Vance</td>
284 <td>Pre-Sales Support</td>
285 <td>$106,450</td>
286 <td>New York</td>
287 <td>8330</td>
288 <td>c.vance@datatables.net</td>
289 </tr>
290 <tr>
291 <td>Doris Wilder</td>
292 <td>Sales Assistant</td>
293 <td>$85,600</td>
294 <td>Sidney</td>
295 <td>3023</td>
296 <td>d.wilder@datatables.net</td>
297 </tr>
298 <tr>
299 <td>Angelica Ramos</td>
300 <td>Chief Executive Officer (CEO)</td>
301 <td>$1,200,000</td>
302 <td>London</td>
303 <td>5797</td>
304 <td>a.ramos@datatables.net</td>
305 </tr>
306 <tr>
307 <td>Gavin Joyce</td>
308 <td>Developer</td>
309 <td>$92,575</td>
310 <td>Edinburgh</td>
311 <td>8822</td>
312 <td>g.joyce@datatables.net</td>
313 </tr>
314 <tr>
315 <td>Jennifer Chang</td>
316 <td>Regional Director</td>
317 <td>$357,650</td>
318 <td>Singapore</td>
319 <td>9239</td>
320 <td>j.chang@datatables.net</td>
321 </tr>
322 <tr>
323 <td>Brenden Wagner</td>
324 <td>Software Engineer</td>
325 <td>$206,850</td>
326 <td>San Francisco</td>
327 <td>1314</td>
328 <td>b.wagner@datatables.net</td>
329 </tr>
330 <tr>
331 <td>Fiona Green</td>
332 <td>Chief Operating Officer (COO)</td>
333 <td>$850,000</td>
334 <td>San Francisco</td>
335 <td>2947</td>
336 <td>f.green@datatables.net</td>
337 </tr>
338 <tr>
339 <td>Shou Itou</td>
340 <td>Regional Marketing</td>
341 <td>$163,000</td>
342 <td>Tokyo</td>
343 <td>8899</td>
344 <td>s.itou@datatables.net</td>
345 </tr>
346 <tr>
347 <td>Michelle House</td>
348 <td>Integration Specialist</td>
349 <td>$95,400</td>
350 <td>Sidney</td>
351 <td>2769</td>
352 <td>m.house@datatables.net</td>
353 </tr>
354 <tr>
355 <td>Suki Burks</td>
356 <td>Developer</td>
357 <td>$114,500</td>
358 <td>London</td>
359 <td>6832</td>
360 <td>s.burks@datatables.net</td>
361 </tr>
362 <tr>
363 <td>Prescott Bartlett</td>
364 <td>Technical Author</td>
365 <td>$145,000</td>
366 <td>London</td>
367 <td>3606</td>
368 <td>p.bartlett@datatables.net</td>
369 </tr>
370 <tr>
371 <td>Gavin Cortez</td>
372 <td>Team Leader</td>
373 <td>$235,500</td>
374 <td>San Francisco</td>
375 <td>2860</td>
376 <td>g.cortez@datatables.net</td>
377 </tr>
378 <tr>
379 <td>Martena Mccray</td>
380 <td>Post-Sales support</td>
381 <td>$324,050</td>
382 <td>Edinburgh</td>
383 <td>8240</td>
384 <td>m.mccray@datatables.net</td>
385 </tr>
386 <tr>
387 <td>Unity Butler</td>
388 <td>Marketing Designer</td>
389 <td>$85,675</td>
390 <td>San Francisco</td>
391 <td>5384</td>
392 <td>u.butler@datatables.net</td>
393 </tr>
394 <tr>
395 <td>Howard Hatfield</td>
396 <td>Office Manager</td>
397 <td>$164,500</td>
398 <td>San Francisco</td>
399 <td>7031</td>
400 <td>h.hatfield@datatables.net</td>
401 </tr>
402 <tr>
403 <td>Hope Fuentes</td>
404 <td>Secretary</td>
405 <td>$109,850</td>
406 <td>San Francisco</td>
407 <td>6318</td>
408 <td>h.fuentes@datatables.net</td>
409 </tr>
410 <tr>
411 <td>Vivian Harrell</td>
412 <td>Financial Controller</td>
413 <td>$452,500</td>
414 <td>San Francisco</td>
415 <td>9422</td>
416 <td>v.harrell@datatables.net</td>
417 </tr>
418 <tr>
419 <td>Timothy Mooney</td>
420 <td>Office Manager</td>
421 <td>$136,200</td>
422 <td>London</td>
423 <td>7580</td>
424 <td>t.mooney@datatables.net</td>
425 </tr>
426 <tr>
427 <td>Jackson Bradshaw</td>
428 <td>Director</td>
429 <td>$645,750</td>
430 <td>New York</td>
431 <td>1042</td>
432 <td>j.bradshaw@datatables.net</td>
433 </tr>
434 <tr>
435 <td>Olivia Liang</td>
436 <td>Support Engineer</td>
437 <td>$234,500</td>
438 <td>Singapore</td>
439 <td>2120</td>
440 <td>o.liang@datatables.net</td>
441 </tr>
442 <tr>
443 <td>Bruno Nash</td>
444 <td>Software Engineer</td>
445 <td>$163,500</td>
446 <td>London</td>
447 <td>6222</td>
448 <td>b.nash@datatables.net</td>
449 </tr>
450 <tr>
451 <td>Sakura Yamamoto</td>
452 <td>Support Engineer</td>
453 <td>$139,575</td>
454 <td>Tokyo</td>
455 <td>9383</td>
456 <td>s.yamamoto@datatables.net</td>
457 </tr>
458 <tr>
459 <td>Thor Walton</td>
460 <td>Developer</td>
461 <td>$98,540</td>
462 <td>New York</td>
463 <td>8327</td>
464 <td>t.walton@datatables.net</td>
465 </tr>
466 <tr>
467 <td>Finn Camacho</td>
468 <td>Support Engineer</td>
469 <td>$87,500</td>
470 <td>San Francisco</td>
471 <td>2927</td>
472 <td>f.camacho@datatables.net</td>
473 </tr>
474 <tr>
475 <td>Serge Baldwin</td>
476 <td>Data Coordinator</td>
477 <td>$138,575</td>
478 <td>Singapore</td>
479 <td>8352</td>
480 <td>s.baldwin@datatables.net</td>
481 </tr>
482 <tr>
483 <td>Zenaida Frank</td>
484 <td>Software Engineer</td>
485 <td>$125,250</td>
486 <td>New York</td>
487 <td>7439</td>
488 <td>z.frank@datatables.net</td>
489 </tr>
490 <tr>
491 <td>Zorita Serrano</td>
492 <td>Software Engineer</td>
493 <td>$115,000</td>
494 <td>San Francisco</td>
495 <td>4389</td>
496 <td>z.serrano@datatables.net</td>
497 </tr>
498 <tr>
499 <td>Jennifer Acosta</td>
500 <td>Junior Javascript Developer</td>
501 <td>$75,650</td>
502 <td>Edinburgh</td>
503 <td>3431</td>
504 <td>j.acosta@datatables.net</td>
505 </tr>
506 <tr>
507 <td>Cara Stevens</td>
508 <td>Sales Assistant</td>
509 <td>$145,600</td>
510 <td>New York</td>
511 <td>3990</td>
512 <td>c.stevens@datatables.net</td>
513 </tr>
514 <tr>
515 <td>Hermione Butler</td>
516 <td>Regional Director</td>
517 <td>$356,250</td>
518 <td>London</td>
519 <td>1016</td>
520 <td>h.butler@datatables.net</td>
521 </tr>
522 <tr>
523 <td>Lael Greer</td>
524 <td>Systems Administrator</td>
525 <td>$103,500</td>
526 <td>London</td>
527 <td>6733</td>
528 <td>l.greer@datatables.net</td>
529 </tr>
530 <tr>
531 <td>Jonas Alexander</td>
532 <td>Developer</td>
533 <td>$86,500</td>
534 <td>San Francisco</td>
535 <td>8196</td>
536 <td>j.alexander@datatables.net</td>
537 </tr>
538 <tr>
539 <td>Shad Decker</td>
540 <td>Regional Director</td>
541 <td>$183,000</td>
542 <td>Edinburgh</td>
543 <td>6373</td>
544 <td>s.decker@datatables.net</td>
545 </tr>
546 <tr>
547 <td>Michael Bruce</td>
548 <td>Javascript Developer</td>
549 <td>$183,000</td>
550 <td>Singapore</td>
551 <td>5384</td>
552 <td>m.bruce@datatables.net</td>
553 </tr>
554 <tr>
555 <td>Donna Snider</td>
556 <td>Customer Support</td>
557 <td>$112,000</td>
558 <td>New York</td>
559 <td>4226</td>
560 <td>d.snider@datatables.net</td>
561 </tr>
562 </tbody>
563 </table>
564
565 <ul class="tabs">
566 <li class="active">Javascript</li>
567 <li>HTML</li>
568 <li>CSS</li>
569 <li>Ajax</li>
570 <li>Server-side script</li>
571 </ul>
572
573 <div class="tabs">
574 <div class="js">
575 <p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
576 // jQuery update a column title from the demo table to contain a long description
577 // You would not need to do this in your own code.
578 $('#example thead tr:eq(0) th:eq(2)').html(&quot;This is a really long column title!&quot;);
579
580 // Wrap the colspan'ing header cells with a span so they can be positioned
581 // absolutely - filling the available space, and no more.
582 $('#example thead th[colspan]').wrapInner( '&lt;span/&gt;' ).append( '&amp;nbsp;' );
583
584 // Standard initialisation
585 $('#example').DataTable( {
586 responsive: true,
587 paging: false
588 } );
589 } );</code>
590
591 <p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
592
593 <ul>
594 <li><a href="../../../../media/js/jquery.js">../../../../media/js/jquery.js</a></li>
595 <li><a href="../../../../media/js/jquery.dataTables.js">../../../../media/js/jquery.dataTables.js</a></li>
596 <li><a href="../../js/dataTables.responsive.js">../../js/dataTables.responsive.js</a></li>
597 </ul>
598 </div>
599
600 <div class="table">
601 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
602 </div>
603
604 <div class="css">
605 <div>
606 <p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
607 additional CSS used is shown below:</p><code class="multiline language-css">th {
608 position: relative;
609 min-height: 41px;
610 }
611 span {
612 display: block;
613 position: absolute;
614 left: 0;
615 right: 0;
616 white-space: nowrap;
617 text-overflow: ellipsis;
618 overflow: hidden;
619 }</code>
620 </div>
621
622 <p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
623
624 <ul>
625 <li><a href="../../../../media/css/jquery.dataTables.css">../../../../media/css/jquery.dataTables.css</a></li>
626 <li><a href="../../css/dataTables.responsive.css">../../css/dataTables.responsive.css</a></li>
627 </ul>
628 </div>
629
630 <div class="ajax">
631 <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
632 loaded.</p>
633 </div>
634
635 <div class="php">
636 <p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
637 processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
638 documentation</a>.</p>
639 </div>
640 </div>
641 </section>
642 </div>
643
644 <section>
645 <div class="footer">
646 <div class="gradient"></div>
647
648 <div class="liner">
649 <h2>Other examples</h2>
650
651 <div class="toc">
652 <div class="toc-group">
653 <h3><a href="../initialisation/index.html">Basic initialisation</a></h3>
654 <ul class="toc">
655 <li><a href="../initialisation/className.html">Class name</a></li>
656 <li><a href="../initialisation/option.html">Configuration option</a></li>
657 <li><a href="../initialisation/new.html">`new` constructor</a></li>
658 <li><a href="../initialisation/ajax.html">Ajax data</a></li>
659 <li><a href="../initialisation/default.html">Default initialisation</a></li>
660 </ul>
661 </div>
662
663 <div class="toc-group">
664 <h3><a href="../styling/index.html">Styling</a></h3>
665 <ul class="toc">
666 <li><a href="../styling/bootstrap.html">Bootstrap styling</a></li>
667 <li><a href="../styling/foundation.html">Foundation styling</a></li>
668 <li><a href="../styling/scrolling.html">Vertical scrolling</a></li>
669 <li><a href="../styling/compact.html">Compact styling</a></li>
670 </ul>
671 </div>
672
673 <div class="toc-group">
674 <h3><a href="./index.html">Display control</a></h3>
675 <ul class="toc active">
676 <li><a href="./auto.html">Automatic column hiding</a></li>
677 <li><a href="./classes.html">Class control</a></li>
678 <li><a href="./init-classes.html">Assigned class control</a></li>
679 <li><a href="./fixedHeader.html">With FixedHeader</a></li>
680 <li class="active"><a href="./complexHeader.html">Complex headers (rowspan / colspan)</a></li>
681 </ul>
682 </div>
683
684 <div class="toc-group">
685 <h3><a href="../child-rows/index.html">Child rows</a></h3>
686 <ul class="toc">
687 <li><a href="../child-rows/disable-child-rows.html">Disable child rows</a></li>
688 <li><a href="../child-rows/column-control.html">Column controlled child rows</a></li>
689 <li><a href="../child-rows/right-column.html">Column control - right</a></li>
690 <li><a href="../child-rows/whole-row-control.html">Whole row child row control</a></li>
691 <li><a href="../child-rows/custom-renderer.html">Custom child row renderer</a></li>
692 </ul>
693 </div>
694 </div>
695
696 <div class="epilogue">
697 <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
698 Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
699 which extend the capabilities of DataTables.</p>
700
701 <p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
702 DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
703 </div>
704 </div>
705 </div>
706 </section>
707 </body>
708 </html>