mirror of
https://github.com/pi-hole/web.git
synced 2026-04-27 12:15:00 +01:00
Updated DataTables to 1.10.7
This commit is contained in:
@@ -823,6 +823,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -832,6 +832,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -788,6 +788,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -819,6 +819,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -822,6 +822,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -782,6 +782,7 @@ $(document).ready(function() {
|
||||
<li><a href="./classes.html">Class control</a></li>
|
||||
<li><a href="./init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="./fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="./complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -216,6 +216,7 @@ $(document).ready(function() {
|
||||
<li class="active"><a href="./classes.html">Class control</a></li>
|
||||
<li><a href="./init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="./fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="./complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,708 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
|
||||
<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
|
||||
|
||||
<title>Responsive example - Complex headers (rowspan / colspan)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../../media/css/jquery.dataTables.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../css/dataTables.responsive.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../examples/resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../examples/resources/demo.css">
|
||||
<style type="text/css" class="init">
|
||||
|
||||
th {
|
||||
position: relative;
|
||||
min-height: 41px;
|
||||
}
|
||||
span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../../../media/js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../js/dataTables.responsive.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../../../examples/resources/syntax/shCore.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../../../examples/resources/demo.js"></script>
|
||||
<script type="text/javascript" language="javascript" class="init">
|
||||
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
// jQuery update a column title from the demo table to contain a long description
|
||||
// You would not need to do this in your own code.
|
||||
$('#example thead tr:eq(0) th:eq(2)').html("This is a really long column title!");
|
||||
|
||||
// Wrap the colspan'ing header cells with a span so they can be positioned
|
||||
// absolutely - filling the available space, and no more.
|
||||
$('#example thead th[colspan]').wrapInner( '<span/>' ).append( ' ' );
|
||||
|
||||
// Standard initialisation
|
||||
$('#example').DataTable( {
|
||||
responsive: true,
|
||||
paging: false
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>Responsive example <span>Complex headers (rowspan / colspan)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<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).
|
||||
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.
|
||||
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
|
||||
that can be achieved thought a little bit of jQuery and CSS.</p>
|
||||
|
||||
<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>
|
||||
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
|
||||
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>
|
||||
|
||||
<p>This functionality is not currently built into Responsive. It likely will be for v1.1.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display nowrap" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">Name</th>
|
||||
<th colspan="2">HR Information</th>
|
||||
<th colspan="3">Contact</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Position</th>
|
||||
<th>Salary</th>
|
||||
<th>Office</th>
|
||||
<th>Extn.</th>
|
||||
<th>E-mail</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Position</th>
|
||||
<th>Salary</th>
|
||||
<th>Office</th>
|
||||
<th>Extn.</th>
|
||||
<th>E-mail</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Tiger Nixon</td>
|
||||
<td>System Architect</td>
|
||||
<td>$320,800</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>5421</td>
|
||||
<td>t.nixon@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Garrett Winters</td>
|
||||
<td>Accountant</td>
|
||||
<td>$170,750</td>
|
||||
<td>Tokyo</td>
|
||||
<td>8422</td>
|
||||
<td>g.winters@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ashton Cox</td>
|
||||
<td>Junior Technical Author</td>
|
||||
<td>$86,000</td>
|
||||
<td>San Francisco</td>
|
||||
<td>1562</td>
|
||||
<td>a.cox@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cedric Kelly</td>
|
||||
<td>Senior Javascript Developer</td>
|
||||
<td>$433,060</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>6224</td>
|
||||
<td>c.kelly@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Airi Satou</td>
|
||||
<td>Accountant</td>
|
||||
<td>$162,700</td>
|
||||
<td>Tokyo</td>
|
||||
<td>5407</td>
|
||||
<td>a.satou@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Brielle Williamson</td>
|
||||
<td>Integration Specialist</td>
|
||||
<td>$372,000</td>
|
||||
<td>New York</td>
|
||||
<td>4804</td>
|
||||
<td>b.williamson@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Herrod Chandler</td>
|
||||
<td>Sales Assistant</td>
|
||||
<td>$137,500</td>
|
||||
<td>San Francisco</td>
|
||||
<td>9608</td>
|
||||
<td>h.chandler@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rhona Davidson</td>
|
||||
<td>Integration Specialist</td>
|
||||
<td>$327,900</td>
|
||||
<td>Tokyo</td>
|
||||
<td>6200</td>
|
||||
<td>r.davidson@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Colleen Hurst</td>
|
||||
<td>Javascript Developer</td>
|
||||
<td>$205,500</td>
|
||||
<td>San Francisco</td>
|
||||
<td>2360</td>
|
||||
<td>c.hurst@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sonya Frost</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>$103,600</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>1667</td>
|
||||
<td>s.frost@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jena Gaines</td>
|
||||
<td>Office Manager</td>
|
||||
<td>$90,560</td>
|
||||
<td>London</td>
|
||||
<td>3814</td>
|
||||
<td>j.gaines@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Quinn Flynn</td>
|
||||
<td>Support Lead</td>
|
||||
<td>$342,000</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>9497</td>
|
||||
<td>q.flynn@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Charde Marshall</td>
|
||||
<td>Regional Director</td>
|
||||
<td>$470,600</td>
|
||||
<td>San Francisco</td>
|
||||
<td>6741</td>
|
||||
<td>c.marshall@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Haley Kennedy</td>
|
||||
<td>Senior Marketing Designer</td>
|
||||
<td>$313,500</td>
|
||||
<td>London</td>
|
||||
<td>3597</td>
|
||||
<td>h.kennedy@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tatyana Fitzpatrick</td>
|
||||
<td>Regional Director</td>
|
||||
<td>$385,750</td>
|
||||
<td>London</td>
|
||||
<td>1965</td>
|
||||
<td>t.fitzpatrick@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michael Silva</td>
|
||||
<td>Marketing Designer</td>
|
||||
<td>$198,500</td>
|
||||
<td>London</td>
|
||||
<td>1581</td>
|
||||
<td>m.silva@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Paul Byrd</td>
|
||||
<td>Chief Financial Officer (CFO)</td>
|
||||
<td>$725,000</td>
|
||||
<td>New York</td>
|
||||
<td>3059</td>
|
||||
<td>p.byrd@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gloria Little</td>
|
||||
<td>Systems Administrator</td>
|
||||
<td>$237,500</td>
|
||||
<td>New York</td>
|
||||
<td>1721</td>
|
||||
<td>g.little@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bradley Greer</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>$132,000</td>
|
||||
<td>London</td>
|
||||
<td>2558</td>
|
||||
<td>b.greer@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dai Rios</td>
|
||||
<td>Personnel Lead</td>
|
||||
<td>$217,500</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>2290</td>
|
||||
<td>d.rios@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jenette Caldwell</td>
|
||||
<td>Development Lead</td>
|
||||
<td>$345,000</td>
|
||||
<td>New York</td>
|
||||
<td>1937</td>
|
||||
<td>j.caldwell@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Yuri Berry</td>
|
||||
<td>Chief Marketing Officer (CMO)</td>
|
||||
<td>$675,000</td>
|
||||
<td>New York</td>
|
||||
<td>6154</td>
|
||||
<td>y.berry@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Caesar Vance</td>
|
||||
<td>Pre-Sales Support</td>
|
||||
<td>$106,450</td>
|
||||
<td>New York</td>
|
||||
<td>8330</td>
|
||||
<td>c.vance@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doris Wilder</td>
|
||||
<td>Sales Assistant</td>
|
||||
<td>$85,600</td>
|
||||
<td>Sidney</td>
|
||||
<td>3023</td>
|
||||
<td>d.wilder@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Angelica Ramos</td>
|
||||
<td>Chief Executive Officer (CEO)</td>
|
||||
<td>$1,200,000</td>
|
||||
<td>London</td>
|
||||
<td>5797</td>
|
||||
<td>a.ramos@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gavin Joyce</td>
|
||||
<td>Developer</td>
|
||||
<td>$92,575</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>8822</td>
|
||||
<td>g.joyce@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jennifer Chang</td>
|
||||
<td>Regional Director</td>
|
||||
<td>$357,650</td>
|
||||
<td>Singapore</td>
|
||||
<td>9239</td>
|
||||
<td>j.chang@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Brenden Wagner</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>$206,850</td>
|
||||
<td>San Francisco</td>
|
||||
<td>1314</td>
|
||||
<td>b.wagner@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fiona Green</td>
|
||||
<td>Chief Operating Officer (COO)</td>
|
||||
<td>$850,000</td>
|
||||
<td>San Francisco</td>
|
||||
<td>2947</td>
|
||||
<td>f.green@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shou Itou</td>
|
||||
<td>Regional Marketing</td>
|
||||
<td>$163,000</td>
|
||||
<td>Tokyo</td>
|
||||
<td>8899</td>
|
||||
<td>s.itou@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michelle House</td>
|
||||
<td>Integration Specialist</td>
|
||||
<td>$95,400</td>
|
||||
<td>Sidney</td>
|
||||
<td>2769</td>
|
||||
<td>m.house@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Suki Burks</td>
|
||||
<td>Developer</td>
|
||||
<td>$114,500</td>
|
||||
<td>London</td>
|
||||
<td>6832</td>
|
||||
<td>s.burks@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prescott Bartlett</td>
|
||||
<td>Technical Author</td>
|
||||
<td>$145,000</td>
|
||||
<td>London</td>
|
||||
<td>3606</td>
|
||||
<td>p.bartlett@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gavin Cortez</td>
|
||||
<td>Team Leader</td>
|
||||
<td>$235,500</td>
|
||||
<td>San Francisco</td>
|
||||
<td>2860</td>
|
||||
<td>g.cortez@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Martena Mccray</td>
|
||||
<td>Post-Sales support</td>
|
||||
<td>$324,050</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>8240</td>
|
||||
<td>m.mccray@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Unity Butler</td>
|
||||
<td>Marketing Designer</td>
|
||||
<td>$85,675</td>
|
||||
<td>San Francisco</td>
|
||||
<td>5384</td>
|
||||
<td>u.butler@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Howard Hatfield</td>
|
||||
<td>Office Manager</td>
|
||||
<td>$164,500</td>
|
||||
<td>San Francisco</td>
|
||||
<td>7031</td>
|
||||
<td>h.hatfield@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hope Fuentes</td>
|
||||
<td>Secretary</td>
|
||||
<td>$109,850</td>
|
||||
<td>San Francisco</td>
|
||||
<td>6318</td>
|
||||
<td>h.fuentes@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Vivian Harrell</td>
|
||||
<td>Financial Controller</td>
|
||||
<td>$452,500</td>
|
||||
<td>San Francisco</td>
|
||||
<td>9422</td>
|
||||
<td>v.harrell@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Timothy Mooney</td>
|
||||
<td>Office Manager</td>
|
||||
<td>$136,200</td>
|
||||
<td>London</td>
|
||||
<td>7580</td>
|
||||
<td>t.mooney@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jackson Bradshaw</td>
|
||||
<td>Director</td>
|
||||
<td>$645,750</td>
|
||||
<td>New York</td>
|
||||
<td>1042</td>
|
||||
<td>j.bradshaw@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Olivia Liang</td>
|
||||
<td>Support Engineer</td>
|
||||
<td>$234,500</td>
|
||||
<td>Singapore</td>
|
||||
<td>2120</td>
|
||||
<td>o.liang@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bruno Nash</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>$163,500</td>
|
||||
<td>London</td>
|
||||
<td>6222</td>
|
||||
<td>b.nash@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sakura Yamamoto</td>
|
||||
<td>Support Engineer</td>
|
||||
<td>$139,575</td>
|
||||
<td>Tokyo</td>
|
||||
<td>9383</td>
|
||||
<td>s.yamamoto@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Thor Walton</td>
|
||||
<td>Developer</td>
|
||||
<td>$98,540</td>
|
||||
<td>New York</td>
|
||||
<td>8327</td>
|
||||
<td>t.walton@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Finn Camacho</td>
|
||||
<td>Support Engineer</td>
|
||||
<td>$87,500</td>
|
||||
<td>San Francisco</td>
|
||||
<td>2927</td>
|
||||
<td>f.camacho@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Serge Baldwin</td>
|
||||
<td>Data Coordinator</td>
|
||||
<td>$138,575</td>
|
||||
<td>Singapore</td>
|
||||
<td>8352</td>
|
||||
<td>s.baldwin@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zenaida Frank</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>$125,250</td>
|
||||
<td>New York</td>
|
||||
<td>7439</td>
|
||||
<td>z.frank@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zorita Serrano</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>$115,000</td>
|
||||
<td>San Francisco</td>
|
||||
<td>4389</td>
|
||||
<td>z.serrano@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jennifer Acosta</td>
|
||||
<td>Junior Javascript Developer</td>
|
||||
<td>$75,650</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>3431</td>
|
||||
<td>j.acosta@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cara Stevens</td>
|
||||
<td>Sales Assistant</td>
|
||||
<td>$145,600</td>
|
||||
<td>New York</td>
|
||||
<td>3990</td>
|
||||
<td>c.stevens@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hermione Butler</td>
|
||||
<td>Regional Director</td>
|
||||
<td>$356,250</td>
|
||||
<td>London</td>
|
||||
<td>1016</td>
|
||||
<td>h.butler@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lael Greer</td>
|
||||
<td>Systems Administrator</td>
|
||||
<td>$103,500</td>
|
||||
<td>London</td>
|
||||
<td>6733</td>
|
||||
<td>l.greer@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jonas Alexander</td>
|
||||
<td>Developer</td>
|
||||
<td>$86,500</td>
|
||||
<td>San Francisco</td>
|
||||
<td>8196</td>
|
||||
<td>j.alexander@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shad Decker</td>
|
||||
<td>Regional Director</td>
|
||||
<td>$183,000</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>6373</td>
|
||||
<td>s.decker@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michael Bruce</td>
|
||||
<td>Javascript Developer</td>
|
||||
<td>$183,000</td>
|
||||
<td>Singapore</td>
|
||||
<td>5384</td>
|
||||
<td>m.bruce@datatables.net</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Donna Snider</td>
|
||||
<td>Customer Support</td>
|
||||
<td>$112,000</td>
|
||||
<td>New York</td>
|
||||
<td>4226</td>
|
||||
<td>d.snider@datatables.net</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul class="tabs">
|
||||
<li class="active">Javascript</li>
|
||||
<li>HTML</li>
|
||||
<li>CSS</li>
|
||||
<li>Ajax</li>
|
||||
<li>Server-side script</li>
|
||||
</ul>
|
||||
|
||||
<div class="tabs">
|
||||
<div class="js">
|
||||
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
|
||||
// jQuery update a column title from the demo table to contain a long description
|
||||
// You would not need to do this in your own code.
|
||||
$('#example thead tr:eq(0) th:eq(2)').html("This is a really long column title!");
|
||||
|
||||
// Wrap the colspan'ing header cells with a span so they can be positioned
|
||||
// absolutely - filling the available space, and no more.
|
||||
$('#example thead th[colspan]').wrapInner( '<span/>' ).append( '&nbsp;' );
|
||||
|
||||
// Standard initialisation
|
||||
$('#example').DataTable( {
|
||||
responsive: true,
|
||||
paging: false
|
||||
} );
|
||||
} );</code>
|
||||
|
||||
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../../media/js/jquery.js">../../../../media/js/jquery.js</a></li>
|
||||
<li><a href="../../../../media/js/jquery.dataTables.js">../../../../media/js/jquery.dataTables.js</a></li>
|
||||
<li><a href="../../js/dataTables.responsive.js">../../js/dataTables.responsive.js</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="table">
|
||||
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
|
||||
</div>
|
||||
|
||||
<div class="css">
|
||||
<div>
|
||||
<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
|
||||
additional CSS used is shown below:</p><code class="multiline language-css">th {
|
||||
position: relative;
|
||||
min-height: 41px;
|
||||
}
|
||||
span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}</code>
|
||||
</div>
|
||||
|
||||
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../../media/css/jquery.dataTables.css">../../../../media/css/jquery.dataTables.css</a></li>
|
||||
<li><a href="../../css/dataTables.responsive.css">../../css/dataTables.responsive.css</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="ajax">
|
||||
<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
|
||||
loaded.</p>
|
||||
</div>
|
||||
|
||||
<div class="php">
|
||||
<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
|
||||
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
|
||||
documentation</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
<div class="footer">
|
||||
<div class="gradient"></div>
|
||||
|
||||
<div class="liner">
|
||||
<h2>Other examples</h2>
|
||||
|
||||
<div class="toc">
|
||||
<div class="toc-group">
|
||||
<h3><a href="../initialisation/index.html">Basic initialisation</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../initialisation/className.html">Class name</a></li>
|
||||
<li><a href="../initialisation/option.html">Configuration option</a></li>
|
||||
<li><a href="../initialisation/new.html">`new` constructor</a></li>
|
||||
<li><a href="../initialisation/ajax.html">Ajax data</a></li>
|
||||
<li><a href="../initialisation/default.html">Default initialisation</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="toc-group">
|
||||
<h3><a href="../styling/index.html">Styling</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap styling</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation styling</a></li>
|
||||
<li><a href="../styling/scrolling.html">Vertical scrolling</a></li>
|
||||
<li><a href="../styling/compact.html">Compact styling</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="toc-group">
|
||||
<h3><a href="./index.html">Display control</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./auto.html">Automatic column hiding</a></li>
|
||||
<li><a href="./classes.html">Class control</a></li>
|
||||
<li><a href="./init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="./fixedHeader.html">With FixedHeader</a></li>
|
||||
<li class="active"><a href="./complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="toc-group">
|
||||
<h3><a href="../child-rows/index.html">Child rows</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../child-rows/disable-child-rows.html">Disable child rows</a></li>
|
||||
<li><a href="../child-rows/column-control.html">Column controlled child rows</a></li>
|
||||
<li><a href="../child-rows/right-column.html">Column control - right</a></li>
|
||||
<li><a href="../child-rows/whole-row-control.html">Whole row child row control</a></li>
|
||||
<li><a href="../child-rows/custom-renderer.html">Custom child row renderer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="epilogue">
|
||||
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
|
||||
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>
|
||||
which extend the capabilities of DataTables.</p>
|
||||
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
@@ -794,6 +794,7 @@ $(document).ready(function() {
|
||||
<li><a href="./classes.html">Class control</a></li>
|
||||
<li><a href="./init-classes.html">Assigned class control</a></li>
|
||||
<li class="active"><a href="./fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="./complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
<li><a href="./classes.html">Class control</a></li>
|
||||
<li><a href="./init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="./fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="./complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -184,6 +184,7 @@ $(document).ready(function() {
|
||||
<li><a href="./classes.html">Class control</a></li>
|
||||
<li class="active"><a href="./init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="./fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="./complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<li><a href="./display-control/classes.html">Class control</a></li>
|
||||
<li><a href="./display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="./display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="./display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -179,6 +179,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -781,6 +781,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -791,6 +791,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -790,6 +790,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -789,6 +789,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -800,6 +800,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -785,6 +785,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -791,6 +791,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -795,6 +795,7 @@ $(document).ready(function() {
|
||||
<li><a href="../display-control/classes.html">Class control</a></li>
|
||||
<li><a href="../display-control/init-classes.html">Assigned class control</a></li>
|
||||
<li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
|
||||
<li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*! Responsive 1.0.5
|
||||
/*! Responsive 1.0.6
|
||||
* 2014-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @summary Responsive
|
||||
* @description Responsive tables plug-in for DataTables
|
||||
* @version 1.0.5
|
||||
* @version 1.0.6
|
||||
* @file dataTables.responsive.js
|
||||
* @author SpryMedia Ltd (www.sprymedia.co.uk)
|
||||
* @contact www.sprymedia.co.uk/contact
|
||||
@@ -646,14 +646,25 @@ Responsive.prototype = {
|
||||
.append( cells )
|
||||
.appendTo( clonedHeader );
|
||||
|
||||
// In the inline case extra padding is applied to the first column to
|
||||
// give space for the show / hide icon. We need to use this in the
|
||||
// calculation
|
||||
if ( this.c.details.type === 'inline' ) {
|
||||
$(clonedTable).addClass( 'dtr-inline collapsed' );
|
||||
}
|
||||
|
||||
var inserted = $('<div/>')
|
||||
.css( {
|
||||
width: 1,
|
||||
height: 1,
|
||||
overflow: 'hidden'
|
||||
} )
|
||||
.append( clonedTable )
|
||||
.insertBefore( dt.table().node() );
|
||||
.append( clonedTable );
|
||||
|
||||
// Remove columns which are not to be included
|
||||
inserted.find('th.never, td.never').remove();
|
||||
|
||||
inserted.insertBefore( dt.table().node() );
|
||||
|
||||
// The cloned header now contains the smallest that each column can be
|
||||
dt.columns().eq(0).each( function ( idx ) {
|
||||
@@ -815,7 +826,7 @@ Api.register( 'responsive.recalc()', function () {
|
||||
* @name Responsive.version
|
||||
* @static
|
||||
*/
|
||||
Responsive.version = '1.0.5';
|
||||
Responsive.version = '1.0.6';
|
||||
|
||||
|
||||
$.fn.dataTable.Responsive = Responsive;
|
||||
@@ -833,8 +844,6 @@ $(document).on( 'init.dt.dtr', function (e, settings, json) {
|
||||
settings.oInit.responsive ||
|
||||
DataTable.defaults.responsive
|
||||
) {
|
||||
console.log( e.namespace );
|
||||
|
||||
var init = settings.oInit.responsive;
|
||||
|
||||
if ( init !== false ) {
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
/*!
|
||||
Responsive 1.0.5
|
||||
Responsive 1.0.6
|
||||
2014-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(n,p){var o=function(e,k){var h=function(d,a){if(!k.versionCheck||!k.versionCheck("1.10.1"))throw"DataTables Responsive requires DataTables 1.10.1 or newer";this.s={dt:new k.Api(d),columns:[]};this.s.dt.settings()[0].responsive||(a&&"string"===typeof a.details&&(a.details={type:a.details}),this.c=e.extend(!0,{},h.defaults,k.defaults.responsive,a),d.responsive=this,this._constructor())};h.prototype={_constructor:function(){var d=this,a=this.s.dt;a.settings()[0]._responsive=this;e(n).on("resize.dtr orientationchange.dtr",
|
||||
a.settings()[0].oApi._fnThrottle(function(){d._resize()}));a.on("destroy.dtr",function(){e(n).off("resize.dtr orientationchange.dtr draw.dtr")});this.c.breakpoints.sort(function(a,d){return a.width<d.width?1:a.width>d.width?-1:0});this._classLogic();this._resizeAuto();var c=this.c.details;c.type&&(d._detailsInit(),this._detailsVis(),a.on("column-visibility.dtr",function(){d._detailsVis()}),a.on("draw.dtr",function(){a.rows({page:"current"}).iterator("row",function(b,c){var f=a.row(c);if(f.child.isShown()){var i=
|
||||
a.settings()[0].oApi._fnThrottle(function(){d._resize()}));a.on("destroy.dtr",function(){e(n).off("resize.dtr orientationchange.dtr draw.dtr")});this.c.breakpoints.sort(function(a,c){return a.width<c.width?1:a.width>c.width?-1:0});this._classLogic();this._resizeAuto();var c=this.c.details;c.type&&(d._detailsInit(),this._detailsVis(),a.on("column-visibility.dtr",function(){d._detailsVis()}),a.on("draw.dtr",function(){a.rows({page:"current"}).iterator("row",function(b,c){var f=a.row(c);if(f.child.isShown()){var i=
|
||||
d.c.details.renderer(a,c);f.child(i,"child").show()}})}),e(a.table().node()).addClass("dtr-"+c.type));this._resize()},_columnsVisiblity:function(d){var a=this.s.dt,c=this.s.columns,b,g,f=e.map(c,function(a){return a.auto&&null===a.minWidth?!1:!0===a.auto?"-":-1!==e.inArray(d,a.includeIn)}),i=0;b=0;for(g=f.length;b<g;b++)!0===f[b]&&(i+=c[b].minWidth);b=a.settings()[0].oScroll;b=b.sY||b.sX?b.iBarWidth:0;a=a.table().container().offsetWidth-b-i;b=0;for(g=f.length;b<g;b++)c[b].control&&(a-=c[b].minWidth);
|
||||
i=!1;b=0;for(g=f.length;b<g;b++)"-"===f[b]&&!c[b].control&&(i||0>a-c[b].minWidth?(i=!0,f[b]=!1):f[b]=!0,a-=c[b].minWidth);a=!1;b=0;for(g=c.length;b<g;b++)if(!c[b].control&&!c[b].never&&!f[b]){a=!0;break}b=0;for(g=c.length;b<g;b++)c[b].control&&(f[b]=a);-1===e.inArray(!0,f)&&(f[0]=!0);return f},_classLogic:function(){var d=this,a=this.c.breakpoints,c=this.s.dt.columns().eq(0).map(function(a){a=this.column(a).header().className;return{className:a,includeIn:[],auto:!1,control:!1,never:a.match(/\bnever\b/)?
|
||||
!0:!1}}),b=function(a,b){var d=c[a].includeIn;-1===e.inArray(b,d)&&d.push(b)},g=function(f,g,e,j){if(e)if("max-"===e){j=d._find(g).width;g=0;for(e=a.length;g<e;g++)a[g].width<=j&&b(f,a[g].name)}else if("min-"===e){j=d._find(g).width;g=0;for(e=a.length;g<e;g++)a[g].width>=j&&b(f,a[g].name)}else{if("not-"===e){g=0;for(e=a.length;g<e;g++)-1===a[g].name.indexOf(j)&&b(f,a[g].name)}}else c[f].includeIn.push(g)};c.each(function(b,d){for(var c=b.className.split(" "),j=!1,h=0,k=c.length;h<k;h++){var l=e.trim(c[h]);
|
||||
if("all"===l){j=!0;b.includeIn=e.map(a,function(a){return a.name});return}if("none"===l||"never"===l){j=!0;return}if("control"===l){j=!0;b.control=!0;return}e.each(a,function(a,b){var c=b.name.split("-"),e=l.match(RegExp("(min\\-|max\\-|not\\-)?("+c[0]+")(\\-[_a-zA-Z0-9])?"));e&&(j=!0,e[2]===c[0]&&e[3]==="-"+c[1]?g(d,b.name,e[1],e[2]+e[3]):e[2]===c[0]&&!e[3]&&g(d,b.name,e[1],e[2]))})}j||(b.auto=!0)});this.s.columns=c},_detailsInit:function(){var d=this,a=this.s.dt,c=this.c.details;"inline"===c.type&&
|
||||
!0:!1}}),b=function(a,b){var d=c[a].includeIn;-1===e.inArray(b,d)&&d.push(b)},g=function(f,g,e,j){if(e)if("max-"===e){j=d._find(g).width;g=0;for(e=a.length;g<e;g++)a[g].width<=j&&b(f,a[g].name)}else if("min-"===e){j=d._find(g).width;g=0;for(e=a.length;g<e;g++)a[g].width>=j&&b(f,a[g].name)}else{if("not-"===e){g=0;for(e=a.length;g<e;g++)-1===a[g].name.indexOf(j)&&b(f,a[g].name)}}else c[f].includeIn.push(g)};c.each(function(b,c){for(var d=b.className.split(" "),j=!1,h=0,k=d.length;h<k;h++){var l=e.trim(d[h]);
|
||||
if("all"===l){j=!0;b.includeIn=e.map(a,function(a){return a.name});return}if("none"===l||"never"===l){j=!0;return}if("control"===l){j=!0;b.control=!0;return}e.each(a,function(a,b){var d=b.name.split("-"),e=l.match(RegExp("(min\\-|max\\-|not\\-)?("+d[0]+")(\\-[_a-zA-Z0-9])?"));e&&(j=!0,e[2]===d[0]&&e[3]==="-"+d[1]?g(c,b.name,e[1],e[2]+e[3]):e[2]===d[0]&&!e[3]&&g(c,b.name,e[1],e[2]))})}j||(b.auto=!0)});this.s.columns=c},_detailsInit:function(){var d=this,a=this.s.dt,c=this.c.details;"inline"===c.type&&
|
||||
(c.target="td:first-child");var b=c.target;e(a.table().body()).on("click","string"===typeof b?b:"td",function(){if(e(a.table().node()).hasClass("collapsed")&&a.row(e(this).closest("tr")).length){if(typeof b==="number"){var c=b<0?a.columns().eq(0).length+b:b;if(a.cell(this).index().column!==c)return}c=a.row(e(this).closest("tr"));if(c.child.isShown()){c.child(false);e(c.node()).removeClass("parent")}else{var f=d.c.details.renderer(a,c[0]);c.child(f,"child").show();e(c.node()).addClass("parent")}}})},
|
||||
_detailsVis:function(){var d=this,a=this.s.dt,c=a.columns().indexes().filter(function(b){var c=a.column(b);return c.visible()?null:e(c.header()).hasClass("never")?null:b}),b=!0;if(0===c.length||1===c.length&&this.s.columns[c[0]].control)b=!1;b?a.rows({page:"current"}).eq(0).each(function(b){b=a.row(b);if(b.child()){var c=d.c.details.renderer(a,b[0]);!1===c?b.child.hide():b.child(c,"child").show()}}):a.rows({page:"current"}).eq(0).each(function(b){a.row(b).child.hide()})},_find:function(d){for(var a=
|
||||
this.c.breakpoints,c=0,b=a.length;c<b;c++)if(a[c].name===d)return a[c]},_resize:function(){var d=this.s.dt,a=e(n).width(),c=this.c.breakpoints,b=c[0].name,g=this.s.columns,f;for(f=c.length-1;0<=f;f--)if(a<=c[f].width){b=c[f].name;break}var i=this._columnsVisiblity(b),c=!1;f=0;for(a=g.length;f<a;f++)if(!1===i[f]&&!g[f].never){c=!0;break}e(d.table().node()).toggleClass("collapsed",c);d.columns().eq(0).each(function(a,b){d.column(a).visible(i[b])})},_resizeAuto:function(){var d=this.s.dt,a=this.s.columns;
|
||||
if(this.c.auto&&-1!==e.inArray(!0,e.map(a,function(a){return a.auto}))){d.table().node();var c=d.table().node().cloneNode(!1),b=e(d.table().header().cloneNode(!1)).appendTo(c),g=e(d.table().body().cloneNode(!1)).appendTo(c);e(d.table().footer()).clone(!1).appendTo(c);d.rows({page:"current"}).indexes().flatten().each(function(a){var b=d.row(a).node().cloneNode(!0);d.columns(":hidden").flatten().length&&e(b).append(d.cells(a,":hidden").nodes().to$().clone());e(b).appendTo(g)});var f=d.columns().header().to$().clone(!1);
|
||||
e("<tr/>").append(f).appendTo(b);c=e("<div/>").css({width:1,height:1,overflow:"hidden"}).append(c).insertBefore(d.table().node());d.columns().eq(0).each(function(b){a[b].minWidth=f[b].offsetWidth||0});c.remove()}}};h.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];h.defaults={breakpoints:h.breakpoints,auto:!0,details:{renderer:function(d,a){var c=d.cells(a,":hidden").eq(0).map(function(a){var c=
|
||||
e(d.column(a.column).header()),a=d.cell(a).index();if(c.hasClass("control")||c.hasClass("never"))return"";var f=d.settings()[0],f=f.oApi._fnGetCellData(f,a.row,a.column,"display");(c=c.text())&&(c+=":");return'<li data-dtr-index="'+a.column+'"><span class="dtr-title">'+c+'</span> <span class="dtr-data">'+f+"</span></li>"}).toArray().join("");return c?e('<ul data-dtr-index="'+a+'"/>').append(c):!1},target:0,type:"inline"}};var m=e.fn.dataTable.Api;m.register("responsive()",function(){return this});
|
||||
m.register("responsive.index()",function(d){d=e(d);return{column:d.data("dtr-index"),row:d.parent().data("dtr-index")}});m.register("responsive.rebuild()",function(){return this.iterator("table",function(d){d._responsive&&d._responsive._classLogic()})});m.register("responsive.recalc()",function(){return this.iterator("table",function(d){d._responsive&&(d._responsive._resizeAuto(),d._responsive._resize())})});h.version="1.0.5";e.fn.dataTable.Responsive=h;e.fn.DataTable.Responsive=h;e(p).on("init.dt.dtr",
|
||||
function(d,a){if("dt"===d.namespace&&(e(a.nTable).hasClass("responsive")||e(a.nTable).hasClass("dt-responsive")||a.oInit.responsive||k.defaults.responsive)){console.log(d.namespace);var c=a.oInit.responsive;!1!==c&&new h(a,e.isPlainObject(c)?c:{})}});return h};"function"===typeof define&&define.amd?define(["jquery","datatables"],o):"object"===typeof exports?o(require("jquery"),require("datatables")):jQuery&&!jQuery.fn.dataTable.Responsive&&o(jQuery,jQuery.fn.dataTable)})(window,document);
|
||||
e("<tr/>").append(f).appendTo(b);"inline"===this.c.details.type&&e(c).addClass("dtr-inline collapsed");c=e("<div/>").css({width:1,height:1,overflow:"hidden"}).append(c);c.find("th.never, td.never").remove();c.insertBefore(d.table().node());d.columns().eq(0).each(function(b){a[b].minWidth=f[b].offsetWidth||0});c.remove()}}};h.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];h.defaults={breakpoints:h.breakpoints,
|
||||
auto:!0,details:{renderer:function(d,a){var c=d.cells(a,":hidden").eq(0).map(function(a){var c=e(d.column(a.column).header()),a=d.cell(a).index();if(c.hasClass("control")||c.hasClass("never"))return"";var f=d.settings()[0],f=f.oApi._fnGetCellData(f,a.row,a.column,"display");(c=c.text())&&(c+=":");return'<li data-dtr-index="'+a.column+'"><span class="dtr-title">'+c+'</span> <span class="dtr-data">'+f+"</span></li>"}).toArray().join("");return c?e('<ul data-dtr-index="'+a+'"/>').append(c):!1},target:0,
|
||||
type:"inline"}};var m=e.fn.dataTable.Api;m.register("responsive()",function(){return this});m.register("responsive.index()",function(d){d=e(d);return{column:d.data("dtr-index"),row:d.parent().data("dtr-index")}});m.register("responsive.rebuild()",function(){return this.iterator("table",function(d){d._responsive&&d._responsive._classLogic()})});m.register("responsive.recalc()",function(){return this.iterator("table",function(d){d._responsive&&(d._responsive._resizeAuto(),d._responsive._resize())})});
|
||||
h.version="1.0.6";e.fn.dataTable.Responsive=h;e.fn.DataTable.Responsive=h;e(p).on("init.dt.dtr",function(d,a){if("dt"===d.namespace&&(e(a.nTable).hasClass("responsive")||e(a.nTable).hasClass("dt-responsive")||a.oInit.responsive||k.defaults.responsive)){var c=a.oInit.responsive;!1!==c&&new h(a,e.isPlainObject(c)?c:{})}});return h};"function"===typeof define&&define.amd?define(["jquery","datatables"],o):"object"===typeof exports?o(require("jquery"),require("datatables")):jQuery&&!jQuery.fn.dataTable.Responsive&&
|
||||
o(jQuery,jQuery.fn.dataTable)})(window,document);
|
||||
|
||||
Reference in New Issue
Block a user