Skip to content

Commit 4760581

Browse files
committed
Update examples for rewritten FixedHeader
1 parent cd5b342 commit 4760581

21 files changed

+209
-443
lines changed

examples/bootstrap.xml

-61
This file was deleted.

examples/colreorder.xml

-61
This file was deleted.

examples/foundation.xml

-61
This file was deleted.

examples/header_footer.xml

-32
This file was deleted.

examples/index.xml

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<dt-example table-type="html" order="0">
33

4-
<title lib="FixedHeader">FixedHeader examples</title>
4+
<title lib="FixedHeader">Examples index</title>
55

66
<js lib="jquery" />
77
<info><![CDATA[
88
9-
At times it can be useful to ensure that column titles will remain always visible on a table, even when a user scrolls down a table. The FixedHeader plug-in for DataTables will float the `dt-tag thead` element above the table at all times to help address this issue. The column titles also remain click-able to perform sorting. Key features include:
10-
11-
* Fix the header to the top of the window
12-
* Ability to fix the footer and left / right columns as well
13-
* z-Index ordering options
9+
The following examples show how FixedHeader can be used via its configuration and styling options.
1410
1511
]]></info>
1612

examples/integration/colreorder.xml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<dt-example table-type="html" order="2">
3+
4+
<css lib="datatables fixedheader colreorder" />
5+
<js lib="jquery datatables fixedheader colreorder">
6+
<![CDATA[
7+
$(document).ready(function() {
8+
var table = $('#example').DataTable( {
9+
fixedHeader: true
10+
} );
11+
12+
new $.fn.dataTable.ColReorder( table );
13+
} );
14+
]]>
15+
</js>
16+
17+
<title lib="FixedHeader">ColReorder integration</title>
18+
19+
<info><![CDATA[
20+
21+
[ColReorder](https://datatables.net/extensions/colreorder) is an extension for DataTables that provides the ability to click and drag column header cells, reordering the columns as it does so.
22+
23+
FixedHeader requires no special initialisation when operating with ColReorder - simply initialise both on the table.
24+
25+
]]></info>
26+
27+
</dt-example>

examples/integration/index.xml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<dt-example table-type="html" order="0">
3+
4+
<title lib="FixedHeader">Integration with other DataTables extensions</title>
5+
6+
<js lib="jquery" />
7+
<info><![CDATA[
8+
9+
FixedHeader will work "out of the box" with most other DataTables extensions. The following examples show it being used with various other extensions.
10+
11+
]]></info>
12+
13+
</dt-example>

examples/responsive.xml examples/integration/responsive.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<dt-example table-type="html" table-class="display nowrap" order="6">
2+
<dt-example table-type="html" table-class="display nowrap" order="1">
33

44
<css lib="datatables fixedheader responsive" />
55
<js lib="jquery datatables fixedheader responsive">

examples/jqueryui.xml

-61
This file was deleted.

examples/options/header_footer.xml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<dt-example table-type="html" order="2">
3+
4+
<css lib="datatables fixedheader" />
5+
<js lib="jquery datatables fixedheader">
6+
<![CDATA[
7+
$(document).ready(function() {
8+
var table = $('#example').DataTable( {
9+
fixedHeader: {
10+
header: true,
11+
footer: true
12+
}
13+
} );
14+
} );
15+
]]>
16+
</js>
17+
18+
<title lib="FixedHeader">Header and footer fixed</title>
19+
20+
<info><![CDATA[
21+
22+
FixedHeader provides the ability to fix in place the header and footer of the table. These are controlled by the options `fh-init fixedHeader.header` and `fh-init fixedHeader.footer`. Either can be optionally enabled, or as is the case in this example, both enabled.
23+
24+
]]></info>
25+
26+
</dt-example>

examples/options/index.xml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<dt-example table-type="html" order="0">
3+
4+
<title lib="FixedHeader">Initialisation and options</title>
5+
6+
<js lib="jquery" />
7+
<info><![CDATA[
8+
9+
The following examples show how FixedHeader can be enabled on a DataTable and its various options used.
10+
11+
]]></info>
12+
13+
</dt-example>

0 commit comments

Comments
 (0)