mirror of
https://github.com/DataTables/DataTables.git
synced 2026-01-13 00:08:15 -05:00
Compare commits
177 Commits
1.10.0-bet
...
1.10.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64f979a72b | ||
|
|
3743d6bc28 | ||
|
|
a8575c5a7a | ||
|
|
a644aa7e21 | ||
|
|
43118eed49 | ||
|
|
fc9d6fac64 | ||
|
|
a19e700582 | ||
|
|
7668646e1e | ||
|
|
9f5eb39a2f | ||
|
|
89c4e24698 | ||
|
|
c4cdba49e4 | ||
|
|
e89c187b16 | ||
|
|
3cd15f1c16 | ||
|
|
641924cbee | ||
|
|
39df74eb2c | ||
|
|
13e33e2177 | ||
|
|
786d79d1a9 | ||
|
|
cd920b0605 | ||
|
|
264e1f0a60 | ||
|
|
78724dd11d | ||
|
|
c50629a4b5 | ||
|
|
ad7963b3dd | ||
|
|
9b8153f1d6 | ||
|
|
02b6a5c39c | ||
|
|
f907627fe4 | ||
|
|
4706058c95 | ||
|
|
278147a7ce | ||
|
|
6f6d113134 | ||
|
|
485b44965e | ||
|
|
777907d7f3 | ||
|
|
f0094e9aa1 | ||
|
|
20c764df90 | ||
|
|
7295b8b9b7 | ||
|
|
eaef26a11f | ||
|
|
c06dd8eaba | ||
|
|
5d4d4f39d7 | ||
|
|
b2509005ab | ||
|
|
84686a5b30 | ||
|
|
5c08c74d24 | ||
|
|
8e71c39929 | ||
|
|
73ed6c4725 | ||
|
|
c38e140a52 | ||
|
|
4447b84c34 | ||
|
|
2a97165e37 | ||
|
|
7bca91d1b5 | ||
|
|
097f45855f | ||
|
|
6b12300c69 | ||
|
|
c5414152ed | ||
|
|
1d159700bd | ||
|
|
2300aa8ff5 | ||
|
|
e8bd8b21bc | ||
|
|
6423ab7d67 | ||
|
|
429feaad86 | ||
|
|
c6619c64f9 | ||
|
|
23b3c847ee | ||
|
|
9243418e5f | ||
|
|
3fd28eba98 | ||
|
|
c1e40d7e10 | ||
|
|
56f59a3a33 | ||
|
|
3ea905201b | ||
|
|
96b7ef9176 | ||
|
|
501ed72cee | ||
|
|
00a99a0037 | ||
|
|
de1d6541ef | ||
|
|
d6b54b4cde | ||
|
|
36e1e86297 | ||
|
|
7100d34d9f | ||
|
|
4d1a25e176 | ||
|
|
d1b7c15426 | ||
|
|
d8860b215e | ||
|
|
391e39266f | ||
|
|
48ae36e24c | ||
|
|
46e2b0a0db | ||
|
|
f7a58ca938 | ||
|
|
a68379f7de | ||
|
|
53090ad85a | ||
|
|
6d10993421 | ||
|
|
d907cc6ceb | ||
|
|
77343b72cb | ||
|
|
3dc23c436d | ||
|
|
4feb8959d5 | ||
|
|
3cb0e3aa3f | ||
|
|
4550cc88bf | ||
|
|
06b1195376 | ||
|
|
0406a47e6a | ||
|
|
7f7861b2e2 | ||
|
|
9669c962cc | ||
|
|
f98586dd30 | ||
|
|
e82334589d | ||
|
|
a23f09ae2d | ||
|
|
f63d04583c | ||
|
|
597b0c0b74 | ||
|
|
014a9c11dd | ||
|
|
f5af4e28e0 | ||
|
|
82264d6325 | ||
|
|
56481941b1 | ||
|
|
78b043d234 | ||
|
|
505a2b37a3 | ||
|
|
54e93323b4 | ||
|
|
eb74bc591a | ||
|
|
80e748cc11 | ||
|
|
7ab49af0b6 | ||
|
|
d6a5b7c729 | ||
|
|
22161b3224 | ||
|
|
950110e1fd | ||
|
|
22023595e8 | ||
|
|
3fb997f0b8 | ||
|
|
b53ac91310 | ||
|
|
311cc96572 | ||
|
|
f6a05f5a46 | ||
|
|
f51f88429d | ||
|
|
efa8ff5b71 | ||
|
|
f7e9a20324 | ||
|
|
3ce42db432 | ||
|
|
261f2c9eb0 | ||
|
|
464ce6a32a | ||
|
|
0ea30f9ba7 | ||
|
|
56e6f38911 | ||
|
|
757dbc5524 | ||
|
|
bff1276ab6 | ||
|
|
63beec6486 | ||
|
|
3516626d9a | ||
|
|
683414daba | ||
|
|
85111b709c | ||
|
|
6cac556b6a | ||
|
|
1a0551fd2c | ||
|
|
1a5e32295a | ||
|
|
09bf9b200c | ||
|
|
6a033ad09b | ||
|
|
af7f2780f4 | ||
|
|
c5058c36e6 | ||
|
|
fedec2b479 | ||
|
|
9fda4f3a3d | ||
|
|
6924ccb237 | ||
|
|
e89310fbcf | ||
|
|
f5103cd6c4 | ||
|
|
b2a3546402 | ||
|
|
75d28cad1c | ||
|
|
67a2b18ca3 | ||
|
|
c625f2f525 | ||
|
|
90870af5ac | ||
|
|
b5228162a7 | ||
|
|
d271fac5b6 | ||
|
|
ecceb7a2ca | ||
|
|
0dab1e20de | ||
|
|
c0c1db422f | ||
|
|
c1841e6eff | ||
|
|
e948a3682a | ||
|
|
3e33795877 | ||
|
|
fd857d4864 | ||
|
|
ce54ab1ea5 | ||
|
|
1d0a155226 | ||
|
|
302f0be0ac | ||
|
|
9dc81c8dd3 | ||
|
|
13c766d1de | ||
|
|
4b83b28ace | ||
|
|
34c18509d8 | ||
|
|
e45f19eb60 | ||
|
|
92e380c778 | ||
|
|
c32f4c032a | ||
|
|
6a568a7542 | ||
|
|
ccc4f99c54 | ||
|
|
9a3bdacce6 | ||
|
|
39828e8bab | ||
|
|
876eb29b9b | ||
|
|
10634dd733 | ||
|
|
8186f9378c | ||
|
|
c5d86ea157 | ||
|
|
3330ed6783 | ||
|
|
55e965de0a | ||
|
|
a9687655ea | ||
|
|
7c8e10d0dd | ||
|
|
dcbea43baf | ||
|
|
4834aa26be | ||
|
|
a14bfa29fb | ||
|
|
23c9580d01 | ||
|
|
7227353a8f |
@@ -1 +1 @@
|
||||
0a10f0a40ff1c6fa3b8d5c8e2e5abab318de88d2
|
||||
e6ea753d4408ad0a45b409ac8105d565075c21d9
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,8 +2,6 @@ extras
|
||||
extensions
|
||||
docs
|
||||
cdn
|
||||
media/js/jquery.dataTables.min.js
|
||||
media/css/jquery.dataTables.min.css
|
||||
media/css/jquery.dataTables_themeroller.min.css
|
||||
.DS_Store
|
||||
Plugins
|
||||
|
||||
@@ -13,14 +13,7 @@ To meet this goal, DataTables is developed with two distinct groups of users in
|
||||
|
||||
## Installation
|
||||
|
||||
In most cases, to use DataTables all you need to do is include jQuery, the DataTables Javascript and DataTables CSS files in your HTML page:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.0-beta.1/css/jquery.dataTables.css">
|
||||
|
||||
<script type="text/javascript" language="javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/1.10-beta.1/js/jquery.dataTables.js"></script>
|
||||
```
|
||||
In most cases, to use DataTables all you need to do is include jQuery, the DataTables Javascript and DataTables CSS files in your HTML page. See the [DataTables manual](http://datatables.net/manual/installation#Including-Javascript-/-CSS) for details on how to do this using the latest version of DataTables.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "datatables",
|
||||
"version": "1.10.0-beta.2",
|
||||
"version": "1.10.2",
|
||||
"main": [
|
||||
"media/js/jquery.dataTables.js",
|
||||
"media/css/jquery.dataTables.css"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "datatables/datatables",
|
||||
"version": "1.10.0-beta.2",
|
||||
"version": "1.10.2",
|
||||
"description": "DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table.",
|
||||
"homepage": "http://www.datatables.net/",
|
||||
"author": "SpryMedia",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DataTables",
|
||||
"version": "1.10.0-beta.2",
|
||||
"version": "1.10.2",
|
||||
"description": "DataTables enhances HTML tables with the ability to sort, filter and page the data in the table very easily. It provides a comprehensive API and set of configuration options, allowing you to consume data from virtually any data source.",
|
||||
"homepage": "http://datatables.net/",
|
||||
"docs": "http://datatables.net/",
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Column rendering</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -42,16 +43,17 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Column rendering</span></h1>
|
||||
<h1>DataTables example <span>Column rendering</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Each column has an optional rendering control called <a href=
|
||||
"//datatables.net/reference/option/columns.render"><code class="option" title=
|
||||
"Initialisation option">columns.render</code></a> which can be used to process the content of each cell
|
||||
before the data is used. <a href="//datatables.net/reference/option/columns.render"><code class=
|
||||
"option" title="Initialisation option">columns.render</code></a> has a wide array of options available
|
||||
to it for rendering different types of data orthogonally (ordering, searching, display etc), but it can
|
||||
be used very simply to manipulate the content of a cell, as shown here.</p>
|
||||
"DataTables initialisation option">columns.render<span>DT</span></code></a> which can be used to
|
||||
process the content of each cell before the data is used. <a href=
|
||||
"//datatables.net/reference/option/columns.render"><code class="option" title=
|
||||
"DataTables initialisation option">columns.render<span>DT</span></code></a> has a wide array of options
|
||||
available to it for rendering different types of data orthogonally (ordering, searching, display etc),
|
||||
but it can be used very simply to manipulate the content of a cell, as shown here.</p>
|
||||
|
||||
<p>This example shows the person's age combined with their name in the first column, hiding the age
|
||||
column. This technique can be useful for adding links, assigning colours based on content rules and any
|
||||
@@ -672,14 +674,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -697,8 +700,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -711,7 +714,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Complex headers (rowspan / colspan)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -34,7 +35,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Complex headers (rowspan / colspan)</span></h1>
|
||||
<h1>DataTables example <span>Complex headers (rowspan / colspan)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Complex headers (using colspan / rowspan) can be used to group columns of similar information in
|
||||
@@ -44,10 +45,10 @@ $(document).ready(function() {
|
||||
working with hidden columns. The colspan and rowspan attributes for each cell are automatically
|
||||
calculated and rendered on the page for you. This allows the <a href=
|
||||
"//datatables.net/reference/option/columns.visible"><code class="option" title=
|
||||
"Initialisation option">columns.visible</code></a> option and <a href=
|
||||
"DataTables initialisation option">columns.visible<span>DT</span></code></a> option and <a href=
|
||||
"//datatables.net/reference/api/column().visible()"><code class="api" title=
|
||||
"API method">column().visible()</code></a> method to take into account rowspan / colspan cells, drawing
|
||||
the header correctly.</p>
|
||||
"DataTables API method">column().visible()<span>DT</span></code></a> method to take into account
|
||||
rowspan / colspan cells, drawing the header correctly.</p>
|
||||
|
||||
<p>Note that each column must have at least one unique cell (i.e. a cell without colspan) so DataTables
|
||||
can use that cell to detect the column and use it to apply ordering.</p>
|
||||
@@ -667,14 +668,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -692,8 +694,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -706,7 +708,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Setting defaults</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -35,16 +36,16 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Setting defaults</span></h1>
|
||||
<h1>DataTables example <span>Setting defaults</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>When working with DataTables over multiple pages it is often useful to set the initialisation
|
||||
defaults to common values (for example you might want to set <a href=
|
||||
"//datatables.net/reference/option/dom"><code class="option" title=
|
||||
"Initialisation option">dom</code></a> to a common value so all tables get the same layout). This can
|
||||
be done using the <code>$.fn.dataTable.defaults</code> object. This object will take all of the same
|
||||
parameters as the DataTables initialisation object, but in this case you are setting the default for
|
||||
all future initialisations of DataTables.</p>
|
||||
"DataTables initialisation option">dom<span>DT</span></code></a> to a common value so all tables get
|
||||
the same layout). This can be done using the <code>$.fn.dataTable.defaults</code> object. This object
|
||||
will take all of the same parameters as the DataTables initialisation object, but in this case you are
|
||||
setting the default for all future initialisations of DataTables.</p>
|
||||
|
||||
<p>This example shows the searching and ordering features of DataTables being disabled by default,
|
||||
which is reflected in the table when it is initialised.</p>
|
||||
@@ -657,14 +658,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -682,8 +684,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -696,7 +698,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Multiple table control elements</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -39,17 +40,18 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Multiple table control elements</span></h1>
|
||||
<h1>DataTables example <span>Multiple table control elements</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>As is described by the basic DOM positioning example you can use the <a href=
|
||||
"//datatables.net/reference/option/dom"><code class="option" title=
|
||||
"Initialisation option">dom</code></a> initialisation parameter to move DataTables features around the
|
||||
table to where you want them. In addition to this, you can also use <a href=
|
||||
"//datatables.net/reference/option/dom"><code class="option" title=
|
||||
"Initialisation option">dom</code></a> to create multiple instances of these table controls. Simply
|
||||
include the feature's identification letter where you want it to appear, as many times as you wish, and
|
||||
the controls will all sync up (note that obviously the table ('t') should be included only once).</p>
|
||||
"DataTables initialisation option">dom<span>DT</span></code></a> initialisation parameter to move
|
||||
DataTables features around the table to where you want them. In addition to this, you can also use
|
||||
<a href="//datatables.net/reference/option/dom"><code class="option" title=
|
||||
"DataTables initialisation option">dom<span>DT</span></code></a> to create multiple instances of these
|
||||
table controls. Simply include the feature's identification letter where you want it to appear, as many
|
||||
times as you wish, and the controls will all sync up (note that obviously the table ('t') should be
|
||||
included only once).</p>
|
||||
|
||||
<p>This is shown in the demo below where for four key build-in features are duplicated above and below
|
||||
the table.</p>
|
||||
@@ -665,14 +667,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -690,8 +693,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -704,7 +707,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Custom toolbar elements</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -39,22 +40,23 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Custom toolbar elements</span></h1>
|
||||
<h1>DataTables example <span>Custom toolbar elements</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables inserts DOM elements around the table to control DataTables features, and you can make
|
||||
use of this mechanism as well to insert your own custom elements. In this example a <code class="tag"
|
||||
title="HTML tag">div</code> with a class of 'toolbar' is created using <a href=
|
||||
"//datatables.net/reference/option/dom"><code class="option" title=
|
||||
"Initialisation option">dom</code></a>, with which HTML is inserted to create the toolbar. You could
|
||||
put whatever HTML you want into the toolbar and add event handlers etc.</p>
|
||||
"DataTables initialisation option">dom<span>DT</span></code></a>, with which HTML is inserted to create
|
||||
the toolbar. You could put whatever HTML you want into the toolbar and add event handlers etc.</p>
|
||||
|
||||
<p>For more complex features, or for creating reusable plug-ins, DataTables also has a feature plug-in
|
||||
API available, which can be used to create plug-ins which are used in a table by a single character
|
||||
reference in the <a href="//datatables.net/reference/option/dom"><code class="option" title=
|
||||
"Initialisation option">dom</code></a> option (like the built in option of <code class="string" title=
|
||||
"String">f</code> refers to 'filtering input', you could have an <code class="string" title=
|
||||
"String">F</code> option which creates your own filtering input control, custom to your app).</p>
|
||||
"DataTables initialisation option">dom<span>DT</span></code></a> option (like the built in option of
|
||||
<code class="string" title="String">f</code> refers to 'filtering input', you could have an
|
||||
<code class="string" title="String">F</code> option which creates your own filtering input control,
|
||||
custom to your app).</p>
|
||||
|
||||
<p><a href="https://datatables.net/extras/tabletools">TableTools</a> is a feature plug-in for
|
||||
DataTables which adds buttons into a toolbar for a table, which controls such as copy to clipboard,
|
||||
@@ -668,14 +670,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -693,8 +696,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -707,7 +710,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - DataTables events</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -39,7 +40,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- DataTables events</span></h1>
|
||||
<h1>DataTables example <span>DataTables events</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables fires a number of custom events which you can bind to in the standard jQuery fashion
|
||||
@@ -48,16 +49,17 @@ $(document).ready(function() {
|
||||
|
||||
<p>All custom events fired by DataTables are fired with the namespace <code>dt</code> in order to
|
||||
prevent conflicts arising with other jQuery plug-ins which also fire events. The DataTables <a href=
|
||||
"//datatables.net/reference/api/on()"><code class="api" title="API method">on()</code></a> method can
|
||||
be used like the jQuery <code>on()</code> method, but will automatically append the <code>dt</code>
|
||||
namespace if required.</p>
|
||||
"//datatables.net/reference/api/on()"><code class="api" title=
|
||||
"DataTables API method">on()<span>DT</span></code></a> method can be used like the jQuery
|
||||
<code>on()</code> method, but will automatically append the <code>dt</code> namespace if required.</p>
|
||||
|
||||
<p>This example shows the use of the <a href="//datatables.net/reference/event/order"><code class=
|
||||
"event" title="Event">order</code></a>, <a href="//datatables.net/reference/event/search"><code class=
|
||||
"event" title="Event">search</code></a> and <a href=
|
||||
"//datatables.net/reference/event/page"><code class="event" title="Event">page</code></a> events by
|
||||
adding a notification that the event fired to an element on the page to show that they have indeed
|
||||
fired.</p>
|
||||
"event" title="DataTables event">order<span>DT</span></code></a>, <a href=
|
||||
"//datatables.net/reference/event/search"><code class="event" title=
|
||||
"DataTables event">search<span>DT</span></code></a> and <a href=
|
||||
"//datatables.net/reference/event/page"><code class="event" title=
|
||||
"DataTables event">page<span>DT</span></code></a> events by adding a notification that the event fired
|
||||
to an element on the page to show that they have indeed fired.</p>
|
||||
</div>
|
||||
|
||||
<div id="demo_info" class="box"></div>
|
||||
@@ -673,14 +675,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -698,8 +701,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -712,7 +715,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - DOM / jQuery events</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -34,7 +35,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- DOM / jQuery events</span></h1>
|
||||
<h1>DataTables example <span>DOM / jQuery events</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Events assigned to the table can be exceptionally useful for user interaction, however you must be
|
||||
@@ -652,14 +653,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -677,8 +679,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -691,7 +693,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Footer callback</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -23,7 +24,8 @@
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"footerCallback": function ( row, data, start, end, display ) {
|
||||
var api = this.api();
|
||||
var api = this.api(), data;
|
||||
|
||||
// Remove the formatting to get integer data for summation
|
||||
var intVal = function ( i ) {
|
||||
return typeof i === 'string' ?
|
||||
@@ -33,20 +35,20 @@ $(document).ready(function() {
|
||||
};
|
||||
|
||||
// Total over all pages
|
||||
var total = api
|
||||
.column( 4 )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
} );
|
||||
data = api.column( 4 ).data();
|
||||
total = data.length ?
|
||||
data.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
} ) :
|
||||
0;
|
||||
|
||||
// Total over this page
|
||||
var pageTotal = api
|
||||
.column( 4, { page: 'current'} )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
} );
|
||||
data = api.column( 4, { page: 'current'} ).data();
|
||||
pageTotal = data.length ?
|
||||
data.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
} ) :
|
||||
0;
|
||||
|
||||
// Update footer
|
||||
$( api.column( 4 ).footer() ).html(
|
||||
@@ -63,22 +65,23 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Footer callback</span></h1>
|
||||
<h1>DataTables example <span>Footer callback</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Through the use of the header and footer callback manipulation functions provided by DataTables
|
||||
(<a href="//datatables.net/reference/option/headerCallback"><code class="option" title=
|
||||
"Initialisation option">headerCallback</code></a> and <a href=
|
||||
"DataTables initialisation option">headerCallback<span>DT</span></code></a> and <a href=
|
||||
"//datatables.net/reference/option/footerCallback"><code class="option" title=
|
||||
"Initialisation option">footerCallback</code></a>), it is possible to perform some powerful and useful
|
||||
data manipulation functions, such as summarising data in the table.</p>
|
||||
"DataTables initialisation option">footerCallback<span>DT</span></code></a>), it is possible to perform
|
||||
some powerful and useful data manipulation functions, such as summarising data in the table.</p>
|
||||
|
||||
<p>The example below shows a footer callback being used to total the data for a column (both the
|
||||
visible and the hidden data) using the <a href=
|
||||
"//datatables.net/reference/api/column().data()"><code class="api" title=
|
||||
"API method">column().data()</code></a> API method and <a href=
|
||||
"DataTables API method">column().data()<span>DT</span></code></a> API method and <a href=
|
||||
"//datatables.net/reference/api/column().footer()"><code class="api" title=
|
||||
"API method">column().footer()</code></a> for writing the value into the footer.</p>
|
||||
"DataTables API method">column().footer()<span>DT</span></code></a> for writing the value into the
|
||||
footer.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -516,7 +519,8 @@ $(document).ready(function() {
|
||||
example:</p><code class="multiline brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"footerCallback": function ( row, data, start, end, display ) {
|
||||
var api = this.api();
|
||||
var api = this.api(), data;
|
||||
|
||||
// Remove the formatting to get integer data for summation
|
||||
var intVal = function ( i ) {
|
||||
return typeof i === 'string' ?
|
||||
@@ -526,20 +530,20 @@ $(document).ready(function() {
|
||||
};
|
||||
|
||||
// Total over all pages
|
||||
var total = api
|
||||
.column( 4 )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
} );
|
||||
data = api.column( 4 ).data();
|
||||
total = data.length ?
|
||||
data.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
} ) :
|
||||
0;
|
||||
|
||||
// Total over this page
|
||||
var pageTotal = api
|
||||
.column( 4, { page: 'current'} )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
} );
|
||||
data = api.column( 4, { page: 'current'} ).data();
|
||||
pageTotal = data.length ?
|
||||
data.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
} ) :
|
||||
0;
|
||||
|
||||
// Update footer
|
||||
$( api.column( 4 ).footer() ).html(
|
||||
@@ -652,14 +656,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -677,8 +682,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -691,7 +696,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - HTML5 data-* attributes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -29,10 +30,10 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- HTML5 data-* attributes</span></h1>
|
||||
<h1>DataTables example <span>HTML5 data-* attributes</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables can use different data for different actions (display, ordering and searcgubg) which can
|
||||
<p>DataTables can use different data for different actions (display, ordering and searching) which can
|
||||
be immensely powerful for transforming data in the display to be intuitive for the end user, while
|
||||
using different, or more complex data, for other actions. For example, if a table contains a formatted
|
||||
telephone number in the format <code>xxx-xxxx</code>, intuitively a user might search for the number
|
||||
@@ -45,7 +46,7 @@ $(document).ready(function() {
|
||||
custom HTML5 data attributes</a>. DataTables will automatically detect four different attributes on the
|
||||
HTML elements:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li><code>data-sort</code> or <code>data-order</code> - for ordering data</li>
|
||||
<li><code>data-filter</code> or <code>data-search</code> - for search data</li>
|
||||
</ul>
|
||||
@@ -53,7 +54,7 @@ $(document).ready(function() {
|
||||
<p>This example shows the use of <code>data-sort</code> and <code>data-filter</code> attributes. In
|
||||
this case the first column has been formatted so the first name has abbreviated, but the full name is
|
||||
still searchable (search for "Bruno" for example). Additionally, although the last column contains
|
||||
non-numeric data in it (<code>/m</code>) the column will correctly order numerically as the
|
||||
non-numeric data in it (<code>/y</code>) the column will correctly order numerically as the
|
||||
<code>data-sort</code> / <code>data-order</code> attribute is set on the column with plain numeric
|
||||
data.</p>
|
||||
</div>
|
||||
@@ -87,456 +88,456 @@ $(document).ready(function() {
|
||||
<td>System Architect</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>61</td>
|
||||
<td data-order="1303682400">Mon 25th Apr 11</td>
|
||||
<td data-order="320800">$320,800/m</td>
|
||||
<td data-order="1303686000">Mon 25th Apr 11</td>
|
||||
<td data-order="320800">$320,800/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Garrett Winters">G. Winters</td>
|
||||
<td>Accountant</td>
|
||||
<td>Tokyo</td>
|
||||
<td>63</td>
|
||||
<td data-order="1311544800">Mon 25th Jul 11</td>
|
||||
<td data-order="170750">$170,750/m</td>
|
||||
<td data-order="1311548400">Mon 25th Jul 11</td>
|
||||
<td data-order="170750">$170,750/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Ashton Cox">A. Cox</td>
|
||||
<td>Junior Technical Author</td>
|
||||
<td>San Francisco</td>
|
||||
<td>66</td>
|
||||
<td data-order="1231714800">Mon 12th Jan 09</td>
|
||||
<td data-order="86000">$86,000/m</td>
|
||||
<td data-order="1231718400">Mon 12th Jan 09</td>
|
||||
<td data-order="86000">$86,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Cedric Kelly">C. Kelly</td>
|
||||
<td>Senior Javascript Developer</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>22</td>
|
||||
<td data-order="1332972000">Thu 29th Mar 12</td>
|
||||
<td data-order="433060">$433,060/m</td>
|
||||
<td data-order="1332975600">Thu 29th Mar 12</td>
|
||||
<td data-order="433060">$433,060/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Airi Satou">A. Satou</td>
|
||||
<td>Accountant</td>
|
||||
<td>Tokyo</td>
|
||||
<td>33</td>
|
||||
<td data-order="1227826800">Fri 28th Nov 08</td>
|
||||
<td data-order="162700">$162,700/m</td>
|
||||
<td data-order="1227830400">Fri 28th Nov 08</td>
|
||||
<td data-order="162700">$162,700/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Brielle Williamson">B. Williamson</td>
|
||||
<td>Integration Specialist</td>
|
||||
<td>New York</td>
|
||||
<td>61</td>
|
||||
<td data-order="1354402800">Sun 2nd Dec 12</td>
|
||||
<td data-order="372000">$372,000/m</td>
|
||||
<td data-order="1354406400">Sun 2nd Dec 12</td>
|
||||
<td data-order="372000">$372,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Herrod Chandler">H. Chandler</td>
|
||||
<td>Sales Assistant</td>
|
||||
<td>San Francisco</td>
|
||||
<td>59</td>
|
||||
<td data-order="1344204000">Mon 6th Aug 12</td>
|
||||
<td data-order="137500">$137,500/m</td>
|
||||
<td data-order="1344207600">Mon 6th Aug 12</td>
|
||||
<td data-order="137500">$137,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Rhona Davidson">R. Davidson</td>
|
||||
<td>Integration Specialist</td>
|
||||
<td>Tokyo</td>
|
||||
<td>55</td>
|
||||
<td data-order="1287007200">Thu 14th Oct 10</td>
|
||||
<td data-order="327900">$327,900/m</td>
|
||||
<td data-order="1287010800">Thu 14th Oct 10</td>
|
||||
<td data-order="327900">$327,900/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Colleen Hurst">C. Hurst</td>
|
||||
<td>Javascript Developer</td>
|
||||
<td>San Francisco</td>
|
||||
<td>39</td>
|
||||
<td data-order="1252965600">Tue 15th Sep 09</td>
|
||||
<td data-order="205500">$205,500/m</td>
|
||||
<td data-order="1252969200">Tue 15th Sep 09</td>
|
||||
<td data-order="205500">$205,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Sonya Frost">S. Frost</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>23</td>
|
||||
<td data-order="1229122800">Sat 13th Dec 08</td>
|
||||
<td data-order="103600">$103,600/m</td>
|
||||
<td data-order="1229126400">Sat 13th Dec 08</td>
|
||||
<td data-order="103600">$103,600/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Jena Gaines">J. Gaines</td>
|
||||
<td>Office Manager</td>
|
||||
<td>London</td>
|
||||
<td>30</td>
|
||||
<td data-order="1229641200">Fri 19th Dec 08</td>
|
||||
<td data-order="90560">$90,560/m</td>
|
||||
<td data-order="1229644800">Fri 19th Dec 08</td>
|
||||
<td data-order="90560">$90,560/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Quinn Flynn">Q. Flynn</td>
|
||||
<td>Support Lead</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>22</td>
|
||||
<td data-order="1362265200">Sun 3rd Mar 13</td>
|
||||
<td data-order="342000">$342,000/m</td>
|
||||
<td data-order="1362268800">Sun 3rd Mar 13</td>
|
||||
<td data-order="342000">$342,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Charde Marshall">C. Marshall</td>
|
||||
<td>Regional Director</td>
|
||||
<td>San Francisco</td>
|
||||
<td>36</td>
|
||||
<td data-order="1224108000">Thu 16th Oct 08</td>
|
||||
<td data-order="470600">$470,600/m</td>
|
||||
<td data-order="1224111600">Thu 16th Oct 08</td>
|
||||
<td data-order="470600">$470,600/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Haley Kennedy">H. Kennedy</td>
|
||||
<td>Senior Marketing Designer</td>
|
||||
<td>London</td>
|
||||
<td>43</td>
|
||||
<td data-order="1355785200">Tue 18th Dec 12</td>
|
||||
<td data-order="313500">$313,500/m</td>
|
||||
<td data-order="1355788800">Tue 18th Dec 12</td>
|
||||
<td data-order="313500">$313,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Tatyana Fitzpatrick">T. Fitzpatrick</td>
|
||||
<td>Regional Director</td>
|
||||
<td>London</td>
|
||||
<td>19</td>
|
||||
<td data-order="1268780400">Wed 17th Mar 10</td>
|
||||
<td data-order="385750">$385,750/m</td>
|
||||
<td data-order="1268784000">Wed 17th Mar 10</td>
|
||||
<td data-order="385750">$385,750/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Michael Silva">M. Silva</td>
|
||||
<td>Marketing Designer</td>
|
||||
<td>London</td>
|
||||
<td>66</td>
|
||||
<td data-order="1353970800">Tue 27th Nov 12</td>
|
||||
<td data-order="198500">$198,500/m</td>
|
||||
<td data-order="1353974400">Tue 27th Nov 12</td>
|
||||
<td data-order="198500">$198,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Paul Byrd">P. Byrd</td>
|
||||
<td>Chief Financial Officer (CFO)</td>
|
||||
<td>New York</td>
|
||||
<td>64</td>
|
||||
<td data-order="1276034400">Wed 9th Jun 10</td>
|
||||
<td data-order="725000">$725,000/m</td>
|
||||
<td data-order="1276038000">Wed 9th Jun 10</td>
|
||||
<td data-order="725000">$725,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Gloria Little">G. Little</td>
|
||||
<td>Systems Administrator</td>
|
||||
<td>New York</td>
|
||||
<td>59</td>
|
||||
<td data-order="1239314400">Fri 10th Apr 09</td>
|
||||
<td data-order="237500">$237,500/m</td>
|
||||
<td data-order="1239318000">Fri 10th Apr 09</td>
|
||||
<td data-order="237500">$237,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Bradley Greer">B. Greer</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>London</td>
|
||||
<td>41</td>
|
||||
<td data-order="1350079200">Sat 13th Oct 12</td>
|
||||
<td data-order="132000">$132,000/m</td>
|
||||
<td data-order="1350082800">Sat 13th Oct 12</td>
|
||||
<td data-order="132000">$132,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Dai Rios">D. Rios</td>
|
||||
<td>Personnel Lead</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>35</td>
|
||||
<td data-order="1348610400">Wed 26th Sep 12</td>
|
||||
<td data-order="217500">$217,500/m</td>
|
||||
<td data-order="1348614000">Wed 26th Sep 12</td>
|
||||
<td data-order="217500">$217,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Jenette Caldwell">J. Caldwell</td>
|
||||
<td>Development Lead</td>
|
||||
<td>New York</td>
|
||||
<td>30</td>
|
||||
<td data-order="1315000800">Sat 3rd Sep 11</td>
|
||||
<td data-order="345000">$345,000/m</td>
|
||||
<td data-order="1315004400">Sat 3rd Sep 11</td>
|
||||
<td data-order="345000">$345,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Yuri Berry">Y. Berry</td>
|
||||
<td>Chief Marketing Officer (CMO)</td>
|
||||
<td>New York</td>
|
||||
<td>40</td>
|
||||
<td data-order="1245880800">Thu 25th Jun 09</td>
|
||||
<td data-order="675000">$675,000/m</td>
|
||||
<td data-order="1245884400">Thu 25th Jun 09</td>
|
||||
<td data-order="675000">$675,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Caesar Vance">C. Vance</td>
|
||||
<td>Pre-Sales Support</td>
|
||||
<td>New York</td>
|
||||
<td>21</td>
|
||||
<td data-order="1323644400">Mon 12th Dec 11</td>
|
||||
<td data-order="106450">$106,450/m</td>
|
||||
<td data-order="1323648000">Mon 12th Dec 11</td>
|
||||
<td data-order="106450">$106,450/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Doris Wilder">D. Wilder</td>
|
||||
<td>Sales Assistant</td>
|
||||
<td>Sidney</td>
|
||||
<td>23</td>
|
||||
<td data-order="1284933600">Mon 20th Sep 10</td>
|
||||
<td data-order="85600">$85,600/m</td>
|
||||
<td data-order="1284937200">Mon 20th Sep 10</td>
|
||||
<td data-order="85600">$85,600/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Angelica Ramos">A. Ramos</td>
|
||||
<td>Chief Executive Officer (CEO)</td>
|
||||
<td>London</td>
|
||||
<td>47</td>
|
||||
<td data-order="1255039200">Fri 9th Oct 09</td>
|
||||
<td data-order="1200000">$1,200,000/m</td>
|
||||
<td data-order="1255042800">Fri 9th Oct 09</td>
|
||||
<td data-order="1200000">$1,200,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Gavin Joyce">G. Joyce</td>
|
||||
<td>Developer</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>42</td>
|
||||
<td data-order="1292972400">Wed 22nd Dec 10</td>
|
||||
<td data-order="92575">$92,575/m</td>
|
||||
<td data-order="1292976000">Wed 22nd Dec 10</td>
|
||||
<td data-order="92575">$92,575/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Jennifer Chang">J. Chang</td>
|
||||
<td>Regional Director</td>
|
||||
<td>Singapore</td>
|
||||
<td>28</td>
|
||||
<td data-order="1289689200">Sun 14th Nov 10</td>
|
||||
<td data-order="357650">$357,650/m</td>
|
||||
<td data-order="1289692800">Sun 14th Nov 10</td>
|
||||
<td data-order="357650">$357,650/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Brenden Wagner">B. Wagner</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>San Francisco</td>
|
||||
<td>28</td>
|
||||
<td data-order="1307397600">Tue 7th Jun 11</td>
|
||||
<td data-order="206850">$206,850/m</td>
|
||||
<td data-order="1307401200">Tue 7th Jun 11</td>
|
||||
<td data-order="206850">$206,850/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Fiona Green">F. Green</td>
|
||||
<td>Chief Operating Officer (COO)</td>
|
||||
<td>San Francisco</td>
|
||||
<td>48</td>
|
||||
<td data-order="1268262000">Thu 11th Mar 10</td>
|
||||
<td data-order="850000">$850,000/m</td>
|
||||
<td data-order="1268265600">Thu 11th Mar 10</td>
|
||||
<td data-order="850000">$850,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Shou Itou">S. Itou</td>
|
||||
<td>Regional Marketing</td>
|
||||
<td>Tokyo</td>
|
||||
<td>20</td>
|
||||
<td data-order="1313272800">Sun 14th Aug 11</td>
|
||||
<td data-order="163000">$163,000/m</td>
|
||||
<td data-order="1313276400">Sun 14th Aug 11</td>
|
||||
<td data-order="163000">$163,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Michelle House">M. House</td>
|
||||
<td>Integration Specialist</td>
|
||||
<td>Sidney</td>
|
||||
<td>37</td>
|
||||
<td data-order="1306965600">Thu 2nd Jun 11</td>
|
||||
<td data-order="95400">$95,400/m</td>
|
||||
<td data-order="1306969200">Thu 2nd Jun 11</td>
|
||||
<td data-order="95400">$95,400/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Suki Burks">S. Burks</td>
|
||||
<td>Developer</td>
|
||||
<td>London</td>
|
||||
<td>53</td>
|
||||
<td data-order="1256162400">Thu 22nd Oct 09</td>
|
||||
<td data-order="114500">$114,500/m</td>
|
||||
<td data-order="1256166000">Thu 22nd Oct 09</td>
|
||||
<td data-order="114500">$114,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Prescott Bartlett">P. Bartlett</td>
|
||||
<td>Technical Author</td>
|
||||
<td>London</td>
|
||||
<td>27</td>
|
||||
<td data-order="1304719200">Sat 7th May 11</td>
|
||||
<td data-order="145000">$145,000/m</td>
|
||||
<td data-order="1304722800">Sat 7th May 11</td>
|
||||
<td data-order="145000">$145,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Gavin Cortez">G. Cortez</td>
|
||||
<td>Team Leader</td>
|
||||
<td>San Francisco</td>
|
||||
<td>22</td>
|
||||
<td data-order="1224972000">Sun 26th Oct 08</td>
|
||||
<td data-order="235500">$235,500/m</td>
|
||||
<td data-order="1224975600">Sun 26th Oct 08</td>
|
||||
<td data-order="235500">$235,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Martena Mccray">M. Mccray</td>
|
||||
<td>Post-Sales support</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>46</td>
|
||||
<td data-order="1299625200">Wed 9th Mar 11</td>
|
||||
<td data-order="324050">$324,050/m</td>
|
||||
<td data-order="1299628800">Wed 9th Mar 11</td>
|
||||
<td data-order="324050">$324,050/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Unity Butler">U. Butler</td>
|
||||
<td>Marketing Designer</td>
|
||||
<td>San Francisco</td>
|
||||
<td>47</td>
|
||||
<td data-order="1260313200">Wed 9th Dec 09</td>
|
||||
<td data-order="85675">$85,675/m</td>
|
||||
<td data-order="1260316800">Wed 9th Dec 09</td>
|
||||
<td data-order="85675">$85,675/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Howard Hatfield">H. Hatfield</td>
|
||||
<td>Office Manager</td>
|
||||
<td>San Francisco</td>
|
||||
<td>51</td>
|
||||
<td data-order="1229382000">Tue 16th Dec 08</td>
|
||||
<td data-order="164500">$164,500/m</td>
|
||||
<td data-order="1229385600">Tue 16th Dec 08</td>
|
||||
<td data-order="164500">$164,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Hope Fuentes">H. Fuentes</td>
|
||||
<td>Secretary</td>
|
||||
<td>San Francisco</td>
|
||||
<td>41</td>
|
||||
<td data-order="1265929200">Fri 12th Feb 10</td>
|
||||
<td data-order="109850">$109,850/m</td>
|
||||
<td data-order="1265932800">Fri 12th Feb 10</td>
|
||||
<td data-order="109850">$109,850/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Vivian Harrell">V. Harrell</td>
|
||||
<td>Financial Controller</td>
|
||||
<td>San Francisco</td>
|
||||
<td>62</td>
|
||||
<td data-order="1234566000">Sat 14th Feb 09</td>
|
||||
<td data-order="452500">$452,500/m</td>
|
||||
<td data-order="1234569600">Sat 14th Feb 09</td>
|
||||
<td data-order="452500">$452,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Timothy Mooney">T. Mooney</td>
|
||||
<td>Office Manager</td>
|
||||
<td>London</td>
|
||||
<td>37</td>
|
||||
<td data-order="1228950000">Thu 11th Dec 08</td>
|
||||
<td data-order="136200">$136,200/m</td>
|
||||
<td data-order="1228953600">Thu 11th Dec 08</td>
|
||||
<td data-order="136200">$136,200/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Jackson Bradshaw">J. Bradshaw</td>
|
||||
<td>Director</td>
|
||||
<td>New York</td>
|
||||
<td>65</td>
|
||||
<td data-order="1222380000">Fri 26th Sep 08</td>
|
||||
<td data-order="645750">$645,750/m</td>
|
||||
<td data-order="1222383600">Fri 26th Sep 08</td>
|
||||
<td data-order="645750">$645,750/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Olivia Liang">O. Liang</td>
|
||||
<td>Support Engineer</td>
|
||||
<td>Singapore</td>
|
||||
<td>64</td>
|
||||
<td data-order="1296687600">Thu 3rd Feb 11</td>
|
||||
<td data-order="234500">$234,500/m</td>
|
||||
<td data-order="1296691200">Thu 3rd Feb 11</td>
|
||||
<td data-order="234500">$234,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Bruno Nash">B. Nash</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>London</td>
|
||||
<td>38</td>
|
||||
<td data-order="1304373600">Tue 3rd May 11</td>
|
||||
<td data-order="163500">$163,500/m</td>
|
||||
<td data-order="1304377200">Tue 3rd May 11</td>
|
||||
<td data-order="163500">$163,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Sakura Yamamoto">S. Yamamoto</td>
|
||||
<td>Support Engineer</td>
|
||||
<td>Tokyo</td>
|
||||
<td>37</td>
|
||||
<td data-order="1250632800">Wed 19th Aug 09</td>
|
||||
<td data-order="139575">$139,575/m</td>
|
||||
<td data-order="1250636400">Wed 19th Aug 09</td>
|
||||
<td data-order="139575">$139,575/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Thor Walton">T. Walton</td>
|
||||
<td>Developer</td>
|
||||
<td>New York</td>
|
||||
<td>61</td>
|
||||
<td data-order="1376172000">Sun 11th Aug 13</td>
|
||||
<td data-order="98540">$98,540/m</td>
|
||||
<td data-order="1376175600">Sun 11th Aug 13</td>
|
||||
<td data-order="98540">$98,540/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Finn Camacho">F. Camacho</td>
|
||||
<td>Support Engineer</td>
|
||||
<td>San Francisco</td>
|
||||
<td>47</td>
|
||||
<td data-order="1246917600">Tue 7th Jul 09</td>
|
||||
<td data-order="87500">$87,500/m</td>
|
||||
<td data-order="1246921200">Tue 7th Jul 09</td>
|
||||
<td data-order="87500">$87,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Serge Baldwin">S. Baldwin</td>
|
||||
<td>Data Coordinator</td>
|
||||
<td>Singapore</td>
|
||||
<td>64</td>
|
||||
<td data-order="1333922400">Mon 9th Apr 12</td>
|
||||
<td data-order="138575">$138,575/m</td>
|
||||
<td data-order="1333926000">Mon 9th Apr 12</td>
|
||||
<td data-order="138575">$138,575/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Zenaida Frank">Z. Frank</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>New York</td>
|
||||
<td>63</td>
|
||||
<td data-order="1262559600">Mon 4th Jan 10</td>
|
||||
<td data-order="125250">$125,250/m</td>
|
||||
<td data-order="1262563200">Mon 4th Jan 10</td>
|
||||
<td data-order="125250">$125,250/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Zorita Serrano">Z. Serrano</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>San Francisco</td>
|
||||
<td>56</td>
|
||||
<td data-order="1338501600">Fri 1st Jun 12</td>
|
||||
<td data-order="115000">$115,000/m</td>
|
||||
<td data-order="1338505200">Fri 1st Jun 12</td>
|
||||
<td data-order="115000">$115,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Jennifer Acosta">J. Acosta</td>
|
||||
<td>Junior Javascript Developer</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>43</td>
|
||||
<td data-order="1359673200">Fri 1st Feb 13</td>
|
||||
<td data-order="75650">$75,650/m</td>
|
||||
<td data-order="1359676800">Fri 1st Feb 13</td>
|
||||
<td data-order="75650">$75,650/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Cara Stevens">C. Stevens</td>
|
||||
<td>Sales Assistant</td>
|
||||
<td>New York</td>
|
||||
<td>46</td>
|
||||
<td data-order="1323126000">Tue 6th Dec 11</td>
|
||||
<td data-order="145600">$145,600/m</td>
|
||||
<td data-order="1323129600">Tue 6th Dec 11</td>
|
||||
<td data-order="145600">$145,600/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Hermione Butler">H. Butler</td>
|
||||
<td>Regional Director</td>
|
||||
<td>London</td>
|
||||
<td>47</td>
|
||||
<td data-order="1300662000">Mon 21st Mar 11</td>
|
||||
<td data-order="356250">$356,250/m</td>
|
||||
<td data-order="1300665600">Mon 21st Mar 11</td>
|
||||
<td data-order="356250">$356,250/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Lael Greer">L. Greer</td>
|
||||
<td>Systems Administrator</td>
|
||||
<td>London</td>
|
||||
<td>21</td>
|
||||
<td data-order="1235689200">Fri 27th Feb 09</td>
|
||||
<td data-order="103500">$103,500/m</td>
|
||||
<td data-order="1235692800">Fri 27th Feb 09</td>
|
||||
<td data-order="103500">$103,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Jonas Alexander">J. Alexander</td>
|
||||
<td>Developer</td>
|
||||
<td>San Francisco</td>
|
||||
<td>30</td>
|
||||
<td data-order="1279058400">Wed 14th Jul 10</td>
|
||||
<td data-order="86500">$86,500/m</td>
|
||||
<td data-order="1279062000">Wed 14th Jul 10</td>
|
||||
<td data-order="86500">$86,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Shad Decker">S. Decker</td>
|
||||
<td>Regional Director</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>51</td>
|
||||
<td data-order="1226530800">Thu 13th Nov 08</td>
|
||||
<td data-order="183000">$183,000/m</td>
|
||||
<td data-order="1226534400">Thu 13th Nov 08</td>
|
||||
<td data-order="183000">$183,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Michael Bruce">M. Bruce</td>
|
||||
<td>Javascript Developer</td>
|
||||
<td>Singapore</td>
|
||||
<td>29</td>
|
||||
<td data-order="1309125600">Mon 27th Jun 11</td>
|
||||
<td data-order="183000">$183,000/m</td>
|
||||
<td data-order="1309129200">Mon 27th Jun 11</td>
|
||||
<td data-order="183000">$183,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Donna Snider">D. Snider</td>
|
||||
<td>Customer Support</td>
|
||||
<td>New York</td>
|
||||
<td>27</td>
|
||||
<td data-order="1295910000">Tue 25th Jan 11</td>
|
||||
<td data-order="112000">$112,000/m</td>
|
||||
<td data-order="1295913600">Tue 25th Jan 11</td>
|
||||
<td data-order="112000">$112,000/y</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -659,14 +660,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -684,8 +686,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -698,7 +700,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
@@ -15,7 +16,7 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Advanced initialisation</span></h1>
|
||||
<h1>DataTables example <span>Advanced initialisation</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>The configuration options offered by DataTables extend much further than the options shown in the
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Language file</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -33,15 +34,15 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Language file</span></h1>
|
||||
<h1>DataTables example <span>Language file</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>As well as being able to pass language information to DataTables through the <a href=
|
||||
"//datatables.net/reference/option/language"><code class="option" title=
|
||||
"Initialisation option">language</code></a> initialisation option, you can also store the language
|
||||
information in a file, which DataTables can load by Ajax using the <a href=
|
||||
"DataTables initialisation option">language<span>DT</span></code></a> initialisation option, you can
|
||||
also store the language information in a file, which DataTables can load by Ajax using the <a href=
|
||||
"//datatables.net/reference/option/language.url"><code class="option" title=
|
||||
"Initialisation option">language.url</code></a> option.</p>
|
||||
"DataTables initialisation option">language.url<span>DT</span></code></a> option.</p>
|
||||
|
||||
<p>The following example shows DataTables reading a German language file.</p>
|
||||
</div>
|
||||
@@ -651,14 +652,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -676,8 +678,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -690,7 +692,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Page length options</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -31,16 +32,17 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Page length options</span></h1>
|
||||
<h1>DataTables example <span>Page length options</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>It is possible to easily customise the options shown in the length menu (by default at the top left
|
||||
of the table) using the <a href="//datatables.net/reference/option/lengthMenu"><code class="option"
|
||||
title="Initialisation option">lengthMenu</code></a> initialisation option.</p>
|
||||
title="DataTables initialisation option">lengthMenu<span>DT</span></code></a> initialisation
|
||||
option.</p>
|
||||
|
||||
<p>This parameter can take one of two forms:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li>A 1D array of options which will be used for both the displayed option and the value, or</li>
|
||||
<li>A 2D array in which the first array is used to define the value options and the second array
|
||||
the displayed options (useful for language strings such as 'All').</li>
|
||||
@@ -652,14 +654,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -677,8 +680,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -691,7 +694,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Row created callback</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -40,20 +41,20 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Row created callback</span></h1>
|
||||
<h1>DataTables example <span>Row created callback</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>The following example shows how a callback function can be used to format a particular row at draw
|
||||
time. For each row that is generated for display, the <a href=
|
||||
"//datatables.net/reference/option/createdRow"><code class="option" title=
|
||||
"Initialisation option">createdRow</code></a> function is called once and once only. It is passed the
|
||||
create row node which can then be modified.</p>
|
||||
"DataTables initialisation option">createdRow<span>DT</span></code></a> function is called once and
|
||||
once only. It is passed the create row node which can then be modified.</p>
|
||||
|
||||
<p>In this case a trivial example of making the 'salary' column blue and bold by adding a CSS class to
|
||||
the container cell if the salary is greater than $4,000. Note that <a href=
|
||||
"//datatables.net/reference/option/columns.createdCell"><code class="option" title=
|
||||
"Initialisation option">columns.createdCell</code></a> could also be used to create exactly the same
|
||||
effect.</p>
|
||||
"DataTables initialisation option">columns.createdCell<span>DT</span></code></a> could also be used to
|
||||
create exactly the same effect.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -666,14 +667,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -691,8 +693,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -705,7 +707,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Row grouping</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -66,7 +67,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Row grouping</span></h1>
|
||||
<h1>DataTables example <span>Row grouping</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Although DataTables doesn't have row grouping built-in (picking one of the many methods available
|
||||
@@ -76,10 +77,10 @@ $(document).ready(function() {
|
||||
<p>In the example below the 'group' is the office location, which is based on the information in the
|
||||
third column (which is set to hidden). The grouping indicator is added by the <a href=
|
||||
"//datatables.net/reference/option/drawCallback"><code class="option" title=
|
||||
"Initialisation option">drawCallback</code></a> function, which will parse through the rows which are
|
||||
displayed, and enter a grouping TR element where a new group is found. A <code>click</code> event
|
||||
handler is added for the grouping rows to allow the grouping order to be restored as well as ordering
|
||||
by any other column.</p>
|
||||
"DataTables initialisation option">drawCallback<span>DT</span></code></a> function, which will parse
|
||||
through the rows which are displayed, and enter a grouping TR element where a new group is found. A
|
||||
<code>click</code> event handler is added for the grouping rows to allow the grouping order to be
|
||||
restored as well as ordering by any other column.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -718,14 +719,15 @@ tr.group:hover {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -743,8 +745,8 @@ tr.group:hover {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -757,7 +759,7 @@ tr.group:hover {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Order direction sequence control</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -38,19 +39,19 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Order direction sequence control</span></h1>
|
||||
<h1>DataTables example <span>Order direction sequence control</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>At times you may wish to change the default ordering direction sequence for columns (some or all of
|
||||
them) to be 'descending' rather than DataTables' default ascending. This can be done through the use of
|
||||
the <a href="//datatables.net/reference/option/columns.orderSequence"><code class="option" title=
|
||||
"Initialisation option">columns.orderSequence</code></a> initialisation parameter. This parameter also
|
||||
allows you to limit the ordering to a single direction, or you could add complex behaviour to the
|
||||
ordering interaction.</p>
|
||||
"DataTables initialisation option">columns.orderSequence<span>DT</span></code></a> initialisation
|
||||
parameter. This parameter also allows you to limit the ordering to a single direction, or you could add
|
||||
complex behaviour to the ordering interaction.</p>
|
||||
|
||||
<p>The example below shows:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li>Column 1 - default ordering</li>
|
||||
<li>Column 2 - default ordering</li>
|
||||
<li>Column 3 - ascending ordering only</li>
|
||||
@@ -675,14 +676,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -700,8 +702,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -714,7 +716,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Flat array data source</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -40,19 +41,20 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Flat array data source</span></h1>
|
||||
<h1>DataTables example <span>Flat array data source</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>When loading data from an Ajax source, by default, DataTables will look for the data to use in the
|
||||
<code>data</code> parameter of a returned object (e.g. <code>{ "data": [...] }</code>). This can easily
|
||||
be change by using the <code>dataSrc</code> option of the <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> initiation option.</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> initiation option.</p>
|
||||
|
||||
<p>The <a href="//datatables.net/reference/option/ajax.dataSrc"><code class="option" title=
|
||||
"Initialisation option">ajax.dataSrc</code></a> has a number of ways in which it can be used:</p>
|
||||
"DataTables initialisation option">ajax.dataSrc<span>DT</span></code></a> has a number of ways in which
|
||||
it can be used:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li>As a string (e.g. <code>dataSrc: 'myData'</code>) - obtain data from a different property in
|
||||
the source object.</li>
|
||||
<li>As an empty string (e.g. <code>dataSrc: ''</code>) - the data source is not an object but an
|
||||
@@ -63,9 +65,9 @@ $(document).ready(function() {
|
||||
</ul>
|
||||
|
||||
<p>The example below shows <a href="//datatables.net/reference/option/ajax.dataSrc"><code class=
|
||||
"option" title="Initialisation option">ajax.dataSrc</code></a> being used as an empty string. This
|
||||
tells DataTables that the JSON loaded is a plain array, not an object with an array inside it as is the
|
||||
default.</p>
|
||||
"option" title="DataTables initialisation option">ajax.dataSrc<span>DT</span></code></a> being used as
|
||||
an empty string. This tells DataTables that the JSON loaded is a plain array, not an object with an
|
||||
array inside it as is the default.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -226,14 +228,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -251,8 +254,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -265,7 +268,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Custom data source property</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -32,19 +33,20 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Custom data source property</span></h1>
|
||||
<h1>DataTables example <span>Custom data source property</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>When loading data from an Ajax source, by default, DataTables will look for the data to use in the
|
||||
<code>data</code> parameter of a returned object (e.g. <code>{ "data": [...] }</code>). This can easily
|
||||
be change by using the <code>dataSrc</code> option of the <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> initiation option.</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> initiation option.</p>
|
||||
|
||||
<p>The <a href="//datatables.net/reference/option/ajax.dataSrc"><code class="option" title=
|
||||
"Initialisation option">ajax.dataSrc</code></a> has a number of ways in which it can be used:</p>
|
||||
"DataTables initialisation option">ajax.dataSrc<span>DT</span></code></a> has a number of ways in which
|
||||
it can be used:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li>As a string (e.g. <code>dataSrc: 'myData'</code>) - obtain data from a different property in
|
||||
the source object.</li>
|
||||
<li>As an empty string (e.g. <code>dataSrc: ''</code>) - the data source is not an object but an
|
||||
@@ -55,9 +57,10 @@ $(document).ready(function() {
|
||||
</ul>
|
||||
|
||||
<p>The example below shows <a href="//datatables.net/reference/option/ajax.dataSrc"><code class=
|
||||
"option" title="Initialisation option">ajax.dataSrc</code></a> being used as a string to get the data
|
||||
from a different source property, in this case <code class="string" title="String">demo</code> but it
|
||||
could be any value, included a nested property by using standard dotted Javascript object notation.</p>
|
||||
"option" title="DataTables initialisation option">ajax.dataSrc<span>DT</span></code></a> being used as
|
||||
a string to get the data from a different source property, in this case <code class="string" title=
|
||||
"String">demo</code> but it could be any value, included a nested property by using standard dotted
|
||||
Javascript object notation.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -210,14 +213,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -235,8 +239,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -249,7 +253,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"salary": "$320,800",
|
||||
"start_date": {
|
||||
"display": "Mon 25th Apr 11",
|
||||
"timestamp": "1303682400"
|
||||
"timestamp": "1303686000"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "5421"
|
||||
@@ -17,7 +17,7 @@
|
||||
"salary": "$170,750",
|
||||
"start_date": {
|
||||
"display": "Mon 25th Jul 11",
|
||||
"timestamp": "1311544800"
|
||||
"timestamp": "1311548400"
|
||||
},
|
||||
"office": "Tokyo",
|
||||
"extn": "8422"
|
||||
@@ -28,7 +28,7 @@
|
||||
"salary": "$86,000",
|
||||
"start_date": {
|
||||
"display": "Mon 12th Jan 09",
|
||||
"timestamp": "1231714800"
|
||||
"timestamp": "1231718400"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "1562"
|
||||
@@ -39,7 +39,7 @@
|
||||
"salary": "$433,060",
|
||||
"start_date": {
|
||||
"display": "Thu 29th Mar 12",
|
||||
"timestamp": "1332972000"
|
||||
"timestamp": "1332975600"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "6224"
|
||||
@@ -50,7 +50,7 @@
|
||||
"salary": "$162,700",
|
||||
"start_date": {
|
||||
"display": "Fri 28th Nov 08",
|
||||
"timestamp": "1227826800"
|
||||
"timestamp": "1227830400"
|
||||
},
|
||||
"office": "Tokyo",
|
||||
"extn": "5407"
|
||||
@@ -61,7 +61,7 @@
|
||||
"salary": "$372,000",
|
||||
"start_date": {
|
||||
"display": "Sun 2nd Dec 12",
|
||||
"timestamp": "1354402800"
|
||||
"timestamp": "1354406400"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "4804"
|
||||
@@ -72,7 +72,7 @@
|
||||
"salary": "$137,500",
|
||||
"start_date": {
|
||||
"display": "Mon 6th Aug 12",
|
||||
"timestamp": "1344204000"
|
||||
"timestamp": "1344207600"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "9608"
|
||||
@@ -83,7 +83,7 @@
|
||||
"salary": "$327,900",
|
||||
"start_date": {
|
||||
"display": "Thu 14th Oct 10",
|
||||
"timestamp": "1287007200"
|
||||
"timestamp": "1287010800"
|
||||
},
|
||||
"office": "Tokyo",
|
||||
"extn": "6200"
|
||||
@@ -94,7 +94,7 @@
|
||||
"salary": "$205,500",
|
||||
"start_date": {
|
||||
"display": "Tue 15th Sep 09",
|
||||
"timestamp": "1252965600"
|
||||
"timestamp": "1252969200"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "2360"
|
||||
@@ -105,7 +105,7 @@
|
||||
"salary": "$103,600",
|
||||
"start_date": {
|
||||
"display": "Sat 13th Dec 08",
|
||||
"timestamp": "1229122800"
|
||||
"timestamp": "1229126400"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "1667"
|
||||
@@ -116,7 +116,7 @@
|
||||
"salary": "$90,560",
|
||||
"start_date": {
|
||||
"display": "Fri 19th Dec 08",
|
||||
"timestamp": "1229641200"
|
||||
"timestamp": "1229644800"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "3814"
|
||||
@@ -127,7 +127,7 @@
|
||||
"salary": "$342,000",
|
||||
"start_date": {
|
||||
"display": "Sun 3rd Mar 13",
|
||||
"timestamp": "1362265200"
|
||||
"timestamp": "1362268800"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "9497"
|
||||
@@ -138,7 +138,7 @@
|
||||
"salary": "$470,600",
|
||||
"start_date": {
|
||||
"display": "Thu 16th Oct 08",
|
||||
"timestamp": "1224108000"
|
||||
"timestamp": "1224111600"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "6741"
|
||||
@@ -149,7 +149,7 @@
|
||||
"salary": "$313,500",
|
||||
"start_date": {
|
||||
"display": "Tue 18th Dec 12",
|
||||
"timestamp": "1355785200"
|
||||
"timestamp": "1355788800"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "3597"
|
||||
@@ -160,7 +160,7 @@
|
||||
"salary": "$385,750",
|
||||
"start_date": {
|
||||
"display": "Wed 17th Mar 10",
|
||||
"timestamp": "1268780400"
|
||||
"timestamp": "1268784000"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "1965"
|
||||
@@ -171,7 +171,7 @@
|
||||
"salary": "$198,500",
|
||||
"start_date": {
|
||||
"display": "Tue 27th Nov 12",
|
||||
"timestamp": "1353970800"
|
||||
"timestamp": "1353974400"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "1581"
|
||||
@@ -182,7 +182,7 @@
|
||||
"salary": "$725,000",
|
||||
"start_date": {
|
||||
"display": "Wed 9th Jun 10",
|
||||
"timestamp": "1276034400"
|
||||
"timestamp": "1276038000"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "3059"
|
||||
@@ -193,7 +193,7 @@
|
||||
"salary": "$237,500",
|
||||
"start_date": {
|
||||
"display": "Fri 10th Apr 09",
|
||||
"timestamp": "1239314400"
|
||||
"timestamp": "1239318000"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "1721"
|
||||
@@ -204,7 +204,7 @@
|
||||
"salary": "$132,000",
|
||||
"start_date": {
|
||||
"display": "Sat 13th Oct 12",
|
||||
"timestamp": "1350079200"
|
||||
"timestamp": "1350082800"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "2558"
|
||||
@@ -215,7 +215,7 @@
|
||||
"salary": "$217,500",
|
||||
"start_date": {
|
||||
"display": "Wed 26th Sep 12",
|
||||
"timestamp": "1348610400"
|
||||
"timestamp": "1348614000"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "2290"
|
||||
@@ -226,7 +226,7 @@
|
||||
"salary": "$345,000",
|
||||
"start_date": {
|
||||
"display": "Sat 3rd Sep 11",
|
||||
"timestamp": "1315000800"
|
||||
"timestamp": "1315004400"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "1937"
|
||||
@@ -237,7 +237,7 @@
|
||||
"salary": "$675,000",
|
||||
"start_date": {
|
||||
"display": "Thu 25th Jun 09",
|
||||
"timestamp": "1245880800"
|
||||
"timestamp": "1245884400"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "6154"
|
||||
@@ -248,7 +248,7 @@
|
||||
"salary": "$106,450",
|
||||
"start_date": {
|
||||
"display": "Mon 12th Dec 11",
|
||||
"timestamp": "1323644400"
|
||||
"timestamp": "1323648000"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "8330"
|
||||
@@ -259,7 +259,7 @@
|
||||
"salary": "$85,600",
|
||||
"start_date": {
|
||||
"display": "Mon 20th Sep 10",
|
||||
"timestamp": "1284933600"
|
||||
"timestamp": "1284937200"
|
||||
},
|
||||
"office": "Sidney",
|
||||
"extn": "3023"
|
||||
@@ -270,7 +270,7 @@
|
||||
"salary": "$1,200,000",
|
||||
"start_date": {
|
||||
"display": "Fri 9th Oct 09",
|
||||
"timestamp": "1255039200"
|
||||
"timestamp": "1255042800"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "5797"
|
||||
@@ -281,7 +281,7 @@
|
||||
"salary": "$92,575",
|
||||
"start_date": {
|
||||
"display": "Wed 22nd Dec 10",
|
||||
"timestamp": "1292972400"
|
||||
"timestamp": "1292976000"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "8822"
|
||||
@@ -292,7 +292,7 @@
|
||||
"salary": "$357,650",
|
||||
"start_date": {
|
||||
"display": "Sun 14th Nov 10",
|
||||
"timestamp": "1289689200"
|
||||
"timestamp": "1289692800"
|
||||
},
|
||||
"office": "Singapore",
|
||||
"extn": "9239"
|
||||
@@ -303,7 +303,7 @@
|
||||
"salary": "$206,850",
|
||||
"start_date": {
|
||||
"display": "Tue 7th Jun 11",
|
||||
"timestamp": "1307397600"
|
||||
"timestamp": "1307401200"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "1314"
|
||||
@@ -314,7 +314,7 @@
|
||||
"salary": "$850,000",
|
||||
"start_date": {
|
||||
"display": "Thu 11th Mar 10",
|
||||
"timestamp": "1268262000"
|
||||
"timestamp": "1268265600"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "2947"
|
||||
@@ -325,7 +325,7 @@
|
||||
"salary": "$163,000",
|
||||
"start_date": {
|
||||
"display": "Sun 14th Aug 11",
|
||||
"timestamp": "1313272800"
|
||||
"timestamp": "1313276400"
|
||||
},
|
||||
"office": "Tokyo",
|
||||
"extn": "8899"
|
||||
@@ -336,7 +336,7 @@
|
||||
"salary": "$95,400",
|
||||
"start_date": {
|
||||
"display": "Thu 2nd Jun 11",
|
||||
"timestamp": "1306965600"
|
||||
"timestamp": "1306969200"
|
||||
},
|
||||
"office": "Sidney",
|
||||
"extn": "2769"
|
||||
@@ -347,7 +347,7 @@
|
||||
"salary": "$114,500",
|
||||
"start_date": {
|
||||
"display": "Thu 22nd Oct 09",
|
||||
"timestamp": "1256162400"
|
||||
"timestamp": "1256166000"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "6832"
|
||||
@@ -358,7 +358,7 @@
|
||||
"salary": "$145,000",
|
||||
"start_date": {
|
||||
"display": "Sat 7th May 11",
|
||||
"timestamp": "1304719200"
|
||||
"timestamp": "1304722800"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "3606"
|
||||
@@ -369,7 +369,7 @@
|
||||
"salary": "$235,500",
|
||||
"start_date": {
|
||||
"display": "Sun 26th Oct 08",
|
||||
"timestamp": "1224972000"
|
||||
"timestamp": "1224975600"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "2860"
|
||||
@@ -380,7 +380,7 @@
|
||||
"salary": "$324,050",
|
||||
"start_date": {
|
||||
"display": "Wed 9th Mar 11",
|
||||
"timestamp": "1299625200"
|
||||
"timestamp": "1299628800"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "8240"
|
||||
@@ -391,7 +391,7 @@
|
||||
"salary": "$85,675",
|
||||
"start_date": {
|
||||
"display": "Wed 9th Dec 09",
|
||||
"timestamp": "1260313200"
|
||||
"timestamp": "1260316800"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "5384"
|
||||
@@ -402,7 +402,7 @@
|
||||
"salary": "$164,500",
|
||||
"start_date": {
|
||||
"display": "Tue 16th Dec 08",
|
||||
"timestamp": "1229382000"
|
||||
"timestamp": "1229385600"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "7031"
|
||||
@@ -413,7 +413,7 @@
|
||||
"salary": "$109,850",
|
||||
"start_date": {
|
||||
"display": "Fri 12th Feb 10",
|
||||
"timestamp": "1265929200"
|
||||
"timestamp": "1265932800"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "6318"
|
||||
@@ -424,7 +424,7 @@
|
||||
"salary": "$452,500",
|
||||
"start_date": {
|
||||
"display": "Sat 14th Feb 09",
|
||||
"timestamp": "1234566000"
|
||||
"timestamp": "1234569600"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "9422"
|
||||
@@ -435,7 +435,7 @@
|
||||
"salary": "$136,200",
|
||||
"start_date": {
|
||||
"display": "Thu 11th Dec 08",
|
||||
"timestamp": "1228950000"
|
||||
"timestamp": "1228953600"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "7580"
|
||||
@@ -446,7 +446,7 @@
|
||||
"salary": "$645,750",
|
||||
"start_date": {
|
||||
"display": "Fri 26th Sep 08",
|
||||
"timestamp": "1222380000"
|
||||
"timestamp": "1222383600"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "1042"
|
||||
@@ -457,7 +457,7 @@
|
||||
"salary": "$234,500",
|
||||
"start_date": {
|
||||
"display": "Thu 3rd Feb 11",
|
||||
"timestamp": "1296687600"
|
||||
"timestamp": "1296691200"
|
||||
},
|
||||
"office": "Singapore",
|
||||
"extn": "2120"
|
||||
@@ -468,7 +468,7 @@
|
||||
"salary": "$163,500",
|
||||
"start_date": {
|
||||
"display": "Tue 3rd May 11",
|
||||
"timestamp": "1304373600"
|
||||
"timestamp": "1304377200"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "6222"
|
||||
@@ -479,7 +479,7 @@
|
||||
"salary": "$139,575",
|
||||
"start_date": {
|
||||
"display": "Wed 19th Aug 09",
|
||||
"timestamp": "1250632800"
|
||||
"timestamp": "1250636400"
|
||||
},
|
||||
"office": "Tokyo",
|
||||
"extn": "9383"
|
||||
@@ -490,7 +490,7 @@
|
||||
"salary": "$98,540",
|
||||
"start_date": {
|
||||
"display": "Sun 11th Aug 13",
|
||||
"timestamp": "1376172000"
|
||||
"timestamp": "1376175600"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "8327"
|
||||
@@ -501,7 +501,7 @@
|
||||
"salary": "$87,500",
|
||||
"start_date": {
|
||||
"display": "Tue 7th Jul 09",
|
||||
"timestamp": "1246917600"
|
||||
"timestamp": "1246921200"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "2927"
|
||||
@@ -512,7 +512,7 @@
|
||||
"salary": "$138,575",
|
||||
"start_date": {
|
||||
"display": "Mon 9th Apr 12",
|
||||
"timestamp": "1333922400"
|
||||
"timestamp": "1333926000"
|
||||
},
|
||||
"office": "Singapore",
|
||||
"extn": "8352"
|
||||
@@ -523,7 +523,7 @@
|
||||
"salary": "$125,250",
|
||||
"start_date": {
|
||||
"display": "Mon 4th Jan 10",
|
||||
"timestamp": "1262559600"
|
||||
"timestamp": "1262563200"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "7439"
|
||||
@@ -534,7 +534,7 @@
|
||||
"salary": "$115,000",
|
||||
"start_date": {
|
||||
"display": "Fri 1st Jun 12",
|
||||
"timestamp": "1338501600"
|
||||
"timestamp": "1338505200"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "4389"
|
||||
@@ -545,7 +545,7 @@
|
||||
"salary": "$75,650",
|
||||
"start_date": {
|
||||
"display": "Fri 1st Feb 13",
|
||||
"timestamp": "1359673200"
|
||||
"timestamp": "1359676800"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "3431"
|
||||
@@ -556,7 +556,7 @@
|
||||
"salary": "$145,600",
|
||||
"start_date": {
|
||||
"display": "Tue 6th Dec 11",
|
||||
"timestamp": "1323126000"
|
||||
"timestamp": "1323129600"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "3990"
|
||||
@@ -567,7 +567,7 @@
|
||||
"salary": "$356,250",
|
||||
"start_date": {
|
||||
"display": "Mon 21st Mar 11",
|
||||
"timestamp": "1300662000"
|
||||
"timestamp": "1300665600"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "1016"
|
||||
@@ -578,7 +578,7 @@
|
||||
"salary": "$103,500",
|
||||
"start_date": {
|
||||
"display": "Fri 27th Feb 09",
|
||||
"timestamp": "1235689200"
|
||||
"timestamp": "1235692800"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "6733"
|
||||
@@ -589,7 +589,7 @@
|
||||
"salary": "$86,500",
|
||||
"start_date": {
|
||||
"display": "Wed 14th Jul 10",
|
||||
"timestamp": "1279058400"
|
||||
"timestamp": "1279062000"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "8196"
|
||||
@@ -600,7 +600,7 @@
|
||||
"salary": "$183,000",
|
||||
"start_date": {
|
||||
"display": "Thu 13th Nov 08",
|
||||
"timestamp": "1226530800"
|
||||
"timestamp": "1226534400"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "6373"
|
||||
@@ -611,7 +611,7 @@
|
||||
"salary": "$183,000",
|
||||
"start_date": {
|
||||
"display": "Mon 27th Jun 11",
|
||||
"timestamp": "1309125600"
|
||||
"timestamp": "1309129200"
|
||||
},
|
||||
"office": "Singapore",
|
||||
"extn": "5384"
|
||||
@@ -622,7 +622,7 @@
|
||||
"salary": "$112,000",
|
||||
"start_date": {
|
||||
"display": "Tue 25th Jan 11",
|
||||
"timestamp": "1295910000"
|
||||
"timestamp": "1295913600"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "4226"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Nested object data (objects)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -38,16 +39,17 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Nested object data (objects)</span></h1>
|
||||
<h1>DataTables example <span>Nested object data (objects)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables has the ability to use data from almost data JSON data source through the use of the
|
||||
<a href="//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> option. In its simplest case, it can be used to read
|
||||
arbitrary object properties, but can also be extended to <em>n</em> levels of nested objects / arrays
|
||||
through the use of standard Javascript dotted object notation. Each dot (<code>.</code>) in the
|
||||
<a href="//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> option represents another object level.</p>
|
||||
"DataTables initialisation option">columns.data<span>DT</span></code></a> option. In its simplest case,
|
||||
it can be used to read arbitrary object properties, but can also be extended to <em>n</em> levels of
|
||||
nested objects / arrays through the use of standard Javascript dotted object notation. Each dot
|
||||
(<code>.</code>) in the <a href="//datatables.net/reference/option/columns.data"><code class="option"
|
||||
title="DataTables initialisation option">columns.data<span>DT</span></code></a> option represents
|
||||
another object level.</p>
|
||||
|
||||
<p>In this example <code>hr.position</code> refers to the <code>position</code> property of the
|
||||
<code>hr</code> object in the row's data source object, while <code>contact.0</code> refers to the
|
||||
@@ -229,14 +231,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -254,8 +257,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -268,7 +271,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Deferred rendering for speed</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -30,13 +31,13 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Deferred rendering for speed</span></h1>
|
||||
<h1>DataTables example <span>Deferred rendering for speed</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>When working with large data sources, you might seek to improve the speed at which DataTables runs.
|
||||
One method to do this is to make use of the built-in deferred rendering option in DataTables with the
|
||||
<a href="//datatables.net/reference/option/deferRender"><code class="option" title=
|
||||
"Initialisation option">deferRender</code></a> option.</p>
|
||||
"DataTables initialisation option">deferRender<span>DT</span></code></a> option.</p>
|
||||
|
||||
<p>When deferred rendering is enabled, rather than having DataTables create all <code class="tag"
|
||||
title="HTML tag">TR</code> and <code class="tag" title="HTML tag">TD</code> nodes required for the
|
||||
@@ -198,14 +199,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -223,8 +225,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -237,7 +239,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
@@ -15,14 +16,14 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Ajax sourced data</span></h1>
|
||||
<h1>DataTables example <span>Ajax sourced data</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables can read data from a server via Ajax, while still performing searching, ordering, paging
|
||||
etc on the client-side. This is done through use of the <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> option, which has a number of options to customise how the data
|
||||
is retrieved from the server.</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> option, which has a number of options
|
||||
to customise how the data is retrieved from the server.</p>
|
||||
|
||||
<p>The examples in this section demonstrate the use of Ajax loading data in DataTables, with
|
||||
client-side processing.</p>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Generated content for a column</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -39,35 +40,35 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Generated content for a column</span></h1>
|
||||
<h1>DataTables example <span>Generated content for a column</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>In some tables you might wish to have some content generated automatically. This can be done in a
|
||||
number of ways:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li><a href="//datatables.net/reference/option/columns.render"><code class="option" title=
|
||||
"Initialisation option">columns.render</code></a> for content that is dynamic (i.e. based upon the
|
||||
row's data)</li>
|
||||
"DataTables initialisation option">columns.render<span>DT</span></code></a> for content that is
|
||||
dynamic (i.e. based upon the row's data)</li>
|
||||
<li><a href="//datatables.net/reference/option/columns.defaultContent"><code class="option" title=
|
||||
"Initialisation option">columns.defaultContent</code></a> for static content (i.e. simple
|
||||
strings)</li>
|
||||
"DataTables initialisation option">columns.defaultContent<span>DT</span></code></a> for static
|
||||
content (i.e. simple strings)</li>
|
||||
</ul>
|
||||
|
||||
<p>This examples shows the use of <a href=
|
||||
"//datatables.net/reference/option/columns.defaultContent"><code class="option" title=
|
||||
"Initialisation option">columns.defaultContent</code></a> to create a <em>button</em> element in the
|
||||
last column of the table. A simple jQuery <code>click</code> event listener is used to watch for clicks
|
||||
on the row, and when activated uses the <a href=
|
||||
"DataTables initialisation option">columns.defaultContent<span>DT</span></code></a> to create a
|
||||
<em>button</em> element in the last column of the table. A simple jQuery <code>click</code> event
|
||||
listener is used to watch for clicks on the row, and when activated uses the <a href=
|
||||
"//datatables.net/reference/api/row().data()"><code class="api" title=
|
||||
"API method">row().data()</code></a> method to get the data for the row and show a bit of information
|
||||
about it in an <code>alert</code> box. This is a simple use case, but it can be built up to be
|
||||
arbitrarily complex.</p>
|
||||
"DataTables API method">row().data()<span>DT</span></code></a> method to get the data for the row and
|
||||
show a bit of information about it in an <code>alert</code> box. This is a simple use case, but it can
|
||||
be built up to be arbitrarily complex.</p>
|
||||
|
||||
<p>Note also that the <a href="//datatables.net/reference/option/columns.data"><code class="option"
|
||||
title="Initialisation option">columns.data</code></a> option for the column has been set to
|
||||
<code>null</code> to indicate that the column has no information that should be obtained data source
|
||||
object.</p>
|
||||
title="DataTables initialisation option">columns.data<span>DT</span></code></a> option for the column
|
||||
has been set to <code>null</code> to indicate that the column has no information that should be
|
||||
obtained data source object.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -227,14 +228,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -252,8 +254,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -266,7 +268,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Ajax data source (objects)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -37,7 +38,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Ajax data source (objects)</span></h1>
|
||||
<h1>DataTables example <span>Ajax data source (objects)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>To try and make life easy, by default, DataTables expects arrays to be used as the data source for
|
||||
@@ -48,8 +49,8 @@ $(document).ready(function() {
|
||||
|
||||
<p>This can be done quite simply by using the <a href=
|
||||
"//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> option which you use to tell DataTables which property
|
||||
to use from the data source object for each column.</p>
|
||||
"DataTables initialisation option">columns.data<span>DT</span></code></a> option which you use to tell
|
||||
DataTables which property to use from the data source object for each column.</p>
|
||||
|
||||
<p>In this example the Ajax source returns an array of objects, which DataTables uses to display the
|
||||
table. The structure of the row's data source in this example is:</p>
|
||||
@@ -221,14 +222,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -246,8 +248,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -260,7 +262,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Nested object data (arrays)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -37,29 +38,29 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Nested object data (arrays)</span></h1>
|
||||
<h1>DataTables example <span>Nested object data (arrays)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>The information read from an Ajax data source can be arbitrarily complex, but still be displayed by
|
||||
DataTables through the <a href="//datatables.net/reference/option/columns.data"><code class="option"
|
||||
title="Initialisation option">columns.data</code></a> option, which is particularly useful for working
|
||||
with JSON feeds in an already defined format.</p>
|
||||
title="DataTables initialisation option">columns.data<span>DT</span></code></a> option, which is
|
||||
particularly useful for working with JSON feeds in an already defined format.</p>
|
||||
|
||||
<p>The <a href="//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> option has the ability to read information not only
|
||||
from objects, but also from arrays using the same dotted object syntax as for objects. In addition to
|
||||
this, when working with an array data source <a href=
|
||||
"DataTables initialisation option">columns.data<span>DT</span></code></a> option has the ability to
|
||||
read information not only from objects, but also from arrays using the same dotted object syntax as for
|
||||
objects. In addition to this, when working with an array data source <a href=
|
||||
"//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> can process the data to combine and display the data in
|
||||
simple forms (more complex forms can be defined by using <a href=
|
||||
"DataTables initialisation option">columns.data<span>DT</span></code></a> can process the data to
|
||||
combine and display the data in simple forms (more complex forms can be defined by using <a href=
|
||||
"//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> as a function).</p>
|
||||
"DataTables initialisation option">columns.data<span>DT</span></code></a> as a function).</p>
|
||||
|
||||
<p>This example shows two different aspects of using <a href=
|
||||
"//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> to read arrays:</p>
|
||||
"DataTables initialisation option">columns.data<span>DT</span></code></a> to read arrays:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li>The <em>Name</em> column is sourced from an array of two elements (first and last name), which
|
||||
are automatically concatenated together. This is done by using array bracket syntax, with the
|
||||
characters between the brackets being used as the glue between elements (e.g. <code>name[,
|
||||
@@ -242,14 +243,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -267,8 +269,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -281,7 +283,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Orthogonal data</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -40,7 +41,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Orthogonal data</span></h1>
|
||||
<h1>DataTables example <span>Orthogonal data</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>To try and make life easy, by default, DataTables expects arrays to be used as the data source for
|
||||
@@ -51,8 +52,8 @@ $(document).ready(function() {
|
||||
|
||||
<p>This can be done quite simply by using the <a href=
|
||||
"//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> option which you use to tell DataTables which property
|
||||
to use from the data source object for each column.</p>
|
||||
"DataTables initialisation option">columns.data<span>DT</span></code></a> option which you use to tell
|
||||
DataTables which property to use from the data source object for each column.</p>
|
||||
|
||||
<p>In this example the Ajax source returns an array of objects, which DataTables uses to display the
|
||||
table. The structure of the row's data source in this example is:</p>
|
||||
@@ -230,14 +231,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -255,8 +257,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -269,7 +271,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Ajax data source (arrays)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -29,26 +30,28 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Ajax data source (arrays)</span></h1>
|
||||
<h1>DataTables example <span>Ajax data source (arrays)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables has the ability to read data from virtually any JSON data source that can be obtained by
|
||||
Ajax. This can be done, in its most simple form, by setting the <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> option to the address of the JSON data source.</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> option to the address of the JSON
|
||||
data source.</p>
|
||||
|
||||
<p>The <a href="//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> option also allows for more advanced configuration such as
|
||||
altering how the Ajax request is made. See the <a href=
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> option also allows for more advanced
|
||||
configuration such as altering how the Ajax request is made. See the <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> documentation or the other Ajax examples for DataTables for
|
||||
further information.</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> documentation or the other Ajax
|
||||
examples for DataTables for further information.</p>
|
||||
|
||||
<p>By default DataTables will assume that an array data source is to be used and will read the
|
||||
information to be displayed in each column from the row's array using the column index, making working
|
||||
with arrays very simple (note that this can be changed, or objects used may using the <a href=
|
||||
"//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> option, shown in other examples).</p>
|
||||
"DataTables initialisation option">columns.data<span>DT</span></code></a> option, shown in other
|
||||
examples).</p>
|
||||
|
||||
<p>The example below shows DataTables loading data for a table from arrays as the data source, where
|
||||
the structure of the row's data source in this example is:</p>
|
||||
@@ -212,14 +215,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -237,8 +241,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -251,7 +255,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Add rows</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -45,19 +46,20 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Add rows</span></h1>
|
||||
<h1>DataTables example <span>Add rows</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>New rows can be added to a DataTable very easily using the <a href=
|
||||
"//datatables.net/reference/api/row.add()"><code class="api" title="API method">row.add()</code></a>
|
||||
API method. Simply call the API function with the data that is to be used for the new row (be it an
|
||||
array or object). Multiple rows can be added using the <a href=
|
||||
"//datatables.net/reference/api/rows.add()"><code class="api" title="API method">rows.add()</code></a>
|
||||
method (note the plural).</p>
|
||||
"//datatables.net/reference/api/row.add()"><code class="api" title=
|
||||
"DataTables API method">row.add()<span>DT</span></code></a> API method. Simply call the API function
|
||||
with the data that is to be used for the new row (be it an array or object). Multiple rows can be added
|
||||
using the <a href="//datatables.net/reference/api/rows.add()"><code class="api" title=
|
||||
"DataTables API method">rows.add()<span>DT</span></code></a> method (note the plural).</p>
|
||||
|
||||
<p>Note that in order to see the new row in the table you must call the <a href=
|
||||
"//datatables.net/reference/api/draw()"><code class="api" title="API method">draw()</code></a> method,
|
||||
which is easily done through the chaining that the DataTables API makes use of.</p>
|
||||
"//datatables.net/reference/api/draw()"><code class="api" title=
|
||||
"DataTables API method">draw()<span>DT</span></code></a> method, which is easily done through the
|
||||
chaining that the DataTables API makes use of.</p>
|
||||
|
||||
<p>This example shows a single row being added each time the button below is clicked upon.</p>
|
||||
</div><button id="addRow">Add new row</button>
|
||||
@@ -221,14 +223,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -246,8 +249,8 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li class="active"><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -258,7 +261,7 @@ $(document).ready(function() {
|
||||
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Using API in callbacks</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -36,24 +37,25 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Using API in callbacks</span></h1>
|
||||
<h1>DataTables example <span>Using API in callbacks</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>There are times when you may wish to call API functions inside the DataTables callback functions
|
||||
(for example <a href="//datatables.net/reference/option/initComplete"><code class="option" title=
|
||||
"Initialisation option">initComplete</code></a>, <a href=
|
||||
"DataTables initialisation option">initComplete<span>DT</span></code></a>, <a href=
|
||||
"//datatables.net/reference/option/rowCallback"><code class="option" title=
|
||||
"Initialisation option">rowCallback</code></a> etc). The complicating issue with this is that the
|
||||
object hasn't fully initialised, so you can't assign the result to a variable and then use that
|
||||
variable in the callback. However, all of DataTables' callback functions are executed in the scope of
|
||||
the DataTable instance, so you can use the Javascript special variable <code>this</code> to access the
|
||||
API (<code>this.api()</code> will give an API instance) as <code>this</code> is the <code class="tag"
|
||||
title="HTML tag">table</code> node.</p>
|
||||
"DataTables initialisation option">rowCallback<span>DT</span></code></a> etc). The complicating issue
|
||||
with this is that the object hasn't fully initialised, so you can't assign the result to a variable and
|
||||
then use that variable in the callback. However, all of DataTables' callback functions are executed in
|
||||
the scope of the DataTable instance, so you can use the Javascript special variable <code>this</code>
|
||||
to access the API (<code>this.api()</code> will give an API instance) as <code>this</code> is the
|
||||
<code class="tag" title="HTML tag">table</code> node.</p>
|
||||
|
||||
<p>In this example you will be able to see that the <a href=
|
||||
"//datatables.net/reference/api/%24()"><code class="api" title="API method">$()</code></a> method is
|
||||
used to get all cell nodes in the table's body and then act on them (in this case adding a click
|
||||
event). The action here is to apply a filter to the table with the value of what is in each cell.</p>
|
||||
"//datatables.net/reference/api/%24()"><code class="api" title=
|
||||
"DataTables API method">$()<span>DT</span></code></a> method is used to get all cell nodes in the
|
||||
table's body and then act on them (in this case adding a click event). The action here is to apply a
|
||||
filter to the table with the value of what is in each cell.</p>
|
||||
|
||||
<p>It is also worth noting that this same effect could be achieved by attaching a delegated click event
|
||||
after the table has been initialised - but the example shows the use of the API inside the
|
||||
@@ -671,14 +673,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -696,8 +699,8 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -708,7 +711,7 @@ $(document).ready(function() {
|
||||
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li class="active"><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Index column</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -42,7 +43,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Index column</span></h1>
|
||||
<h1>DataTables example <span>Index column</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>A fairly common requirement for highly interactive tables which are displayed on the web is to have
|
||||
@@ -51,16 +52,17 @@ $(document).ready(function() {
|
||||
|
||||
<p>This example shows how this can be achieved with DataTables, where the first column is the counter
|
||||
column, and is updated when ordering or searching occurs. This is done by listening for the <a href=
|
||||
"//datatables.net/reference/event/order"><code class="event" title="Event">order</code></a> and
|
||||
<a href="//datatables.net/reference/event/search"><code class="event" title="Event">search</code></a>
|
||||
events emitted by the table. When these events are detected the <a href=
|
||||
"//datatables.net/reference/api/column().nodes()"><code class="api" title=
|
||||
"API method">column().nodes()</code></a> method is used to get the TD/TH nodes for the target column
|
||||
and the <code>each()</code> helper function used to iterate over each, which have their contents
|
||||
updated as needed. Note that the <code>filter</code> and <code>order</code> options are using in the
|
||||
<a href="//datatables.net/reference/api/column()"><code class="api" title=
|
||||
"API method">column()</code></a> method to get the nodes in the current order and with the currently
|
||||
applied filter.</p>
|
||||
"//datatables.net/reference/event/order"><code class="event" title=
|
||||
"DataTables event">order<span>DT</span></code></a> and <a href=
|
||||
"//datatables.net/reference/event/search"><code class="event" title=
|
||||
"DataTables event">search<span>DT</span></code></a> events emitted by the table. When these events are
|
||||
detected the <a href="//datatables.net/reference/api/column().nodes()"><code class="api" title=
|
||||
"DataTables API method">column().nodes()<span>DT</span></code></a> method is used to get the TD/TH
|
||||
nodes for the target column and the <code>each()</code> helper function used to iterate over each,
|
||||
which have their contents updated as needed. Note that the <code>filter</code> and <code>order</code>
|
||||
options are using in the <a href="//datatables.net/reference/api/column()"><code class="api" title=
|
||||
"DataTables API method">column()<span>DT</span></code></a> method to get the nodes in the current order
|
||||
and with the currently applied filter.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -680,14 +682,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -705,8 +708,8 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -717,7 +720,7 @@ $(document).ready(function() {
|
||||
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Form inputs</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -38,7 +39,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Form inputs</span></h1>
|
||||
<h1>DataTables example <span>Form inputs</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>In order to perform paging, ordering, searching etc, DataTables can remove rows and cells from the
|
||||
@@ -48,10 +49,11 @@ $(document).ready(function() {
|
||||
longer.</p>
|
||||
|
||||
<p>The <a href="//datatables.net/reference/api/%24()"><code class="api" title=
|
||||
"API method">$()</code></a> method can be used to get nodes from the document regardless of paging,
|
||||
ordering etc. This example shows <a href="//datatables.net/reference/api/%24()"><code class="api"
|
||||
title="API method">$()</code></a> being used to get all <code class="tag" title="HTML tag">input</code>
|
||||
elements from the table.</p>
|
||||
"DataTables API method">$()<span>DT</span></code></a> method can be used to get nodes from the document
|
||||
regardless of paging, ordering etc. This example shows <a href=
|
||||
"//datatables.net/reference/api/%24()"><code class="api" title=
|
||||
"DataTables API method">$()<span>DT</span></code></a> being used to get all <code class="tag" title=
|
||||
"HTML tag">input</code> elements from the table.</p>
|
||||
|
||||
<p>In the example a simple <code>alert()</code> is used to show the information from the form, but an
|
||||
Ajax call to the server with the form data could easily be performed.</p>
|
||||
@@ -1733,14 +1735,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1758,8 +1761,8 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -1770,7 +1773,7 @@ $(document).ready(function() {
|
||||
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Highlighting rows and columns</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -49,7 +50,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Highlighting rows and columns</span></h1>
|
||||
<h1>DataTables example <span>Highlighting rows and columns</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Highlighting rows and columns have be quite useful for drawing attention to where the user's cursor
|
||||
@@ -58,12 +59,13 @@ $(document).ready(function() {
|
||||
|
||||
<p>This example shows that in action on DataTable by making use of the <a href=
|
||||
"//datatables.net/reference/api/cell().index()"><code class="api" title=
|
||||
"API method">cell().index()</code></a> method to get the index of the column that is to be operated on,
|
||||
and then the <a href="//datatables.net/reference/api/cells().nodes()"><code class="api" title=
|
||||
"API method">cells().nodes()</code></a> and <a href=
|
||||
"DataTables API method">cell().index()<span>DT</span></code></a> method to get the index of the column
|
||||
that is to be operated on, and then the <a href=
|
||||
"//datatables.net/reference/api/cells().nodes()"><code class="api" title=
|
||||
"DataTables API method">cells().nodes()<span>DT</span></code></a> and <a href=
|
||||
"//datatables.net/reference/api/column().nodes()"><code class="api" title=
|
||||
"API method">column().nodes()</code></a> methods to remove old classes and apply the new highlighted
|
||||
class, respectively.</p>
|
||||
"DataTables API method">column().nodes()<span>DT</span></code></a> methods to remove old classes and
|
||||
apply the new highlighted class, respectively.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="row-border hover order-column" cellspacing="0" width="100%">
|
||||
@@ -686,14 +688,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -711,8 +714,8 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li class="active"><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -723,7 +726,7 @@ $(document).ready(function() {
|
||||
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
@@ -15,7 +16,7 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- API</span></h1>
|
||||
<h1>DataTables example <span>API</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>The real power of DataTables can be exploited through the use of the API that it presents. The
|
||||
@@ -35,8 +36,8 @@
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -47,7 +48,7 @@
|
||||
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,13 +3,20 @@
|
||||
<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>DataTables example - Individual column filtering (text inputs)</title>
|
||||
<title>DataTables example - Individual column searching (text inputs)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<style type="text/css" class="init">
|
||||
|
||||
tfoot input {
|
||||
width: 100%;
|
||||
padding: 3px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
</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>
|
||||
@@ -27,13 +34,15 @@ $(document).ready(function() {
|
||||
|
||||
// DataTable
|
||||
var table = $('#example').DataTable();
|
||||
|
||||
// Apply the filter
|
||||
$("#example tfoot input").on( 'keyup change', function () {
|
||||
table
|
||||
.column( $(this).parent().index()+':visible' )
|
||||
.search( this.value )
|
||||
.draw();
|
||||
|
||||
// Apply the search
|
||||
table.columns().eq( 0 ).each( function ( colIdx ) {
|
||||
$( 'input', table.column( colIdx ).footer() ).on( 'keyup change', function () {
|
||||
table
|
||||
.column( colIdx )
|
||||
.search( this.value )
|
||||
.draw();
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
|
||||
@@ -44,30 +53,31 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Individual column filtering (text inputs)</span></h1>
|
||||
<h1>DataTables example <span>Individual column searching (text inputs)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>The filtering functionality that is provided by DataTables is very useful for quickly search through
|
||||
<p>The searching functionality that is provided by DataTables is very useful for quickly search through
|
||||
the information in the table - however the search is global, and you may wish to present controls to
|
||||
filter on specific columns only.</p>
|
||||
search on specific columns only.</p>
|
||||
|
||||
<p>DataTables has the ability to apply filtering to a specific column through the <a href=
|
||||
<p>DataTables has the ability to apply searching to a specific column through the <a href=
|
||||
"//datatables.net/reference/api/column().search()"><code class="api" title=
|
||||
"API method">column().search()</code></a> method (note that the name of the method is
|
||||
<code>search</code> not <code>filter</code> since <a href=
|
||||
"//datatables.net/reference/api/filter()"><code class="api" title="API method">filter()</code></a> is
|
||||
used to apply a filter to a data set).</p>
|
||||
"DataTables API method">column().search()<span>DT</span></code></a> method (note that the name of the
|
||||
method is <code>search</code> not <code>filter</code> since <a href=
|
||||
"//datatables.net/reference/api/filter()"><code class="api" title=
|
||||
"DataTables API method">filter()<span>DT</span></code></a> is used to apply a filter to a result
|
||||
set).</p>
|
||||
|
||||
<p>The column filters are cumulative, so you can apply multiple individual column filters, in addition
|
||||
to the global filter, allowing complex filtering options to be presented to the user.</p>
|
||||
<p>The column searches are cumulative, so you can apply multiple individual column searchs, in addition
|
||||
to the global search, allowing complex searching options to be presented to the user.</p>
|
||||
|
||||
<p>This examples shows text elements being used with the <a href=
|
||||
"//datatables.net/reference/api/column().search()"><code class="api" title=
|
||||
"API method">column().search()</code></a> method to add input controls in the footer of the table for
|
||||
each column. Note that the <code>*index*:visible</code> option is used for the column selector to
|
||||
ensure that the <a href="//datatables.net/reference/api/column()"><code class="api" title=
|
||||
"API method">column()</code></a> method takes into account any hidden columns when selecting the column
|
||||
to act upon.</p>
|
||||
"DataTables API method">column().search()<span>DT</span></code></a> method to add input controls in the
|
||||
footer of the table for each column. Note that the <code>*index*:visible</code> option is used for the
|
||||
column selector to ensure that the <a href="//datatables.net/reference/api/column()"><code class="api"
|
||||
title="DataTables API method">column()<span>DT</span></code></a> method takes into account any hidden
|
||||
columns when selecting the column to act upon.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -573,13 +583,15 @@ $(document).ready(function() {
|
||||
|
||||
// DataTable
|
||||
var table = $('#example').DataTable();
|
||||
|
||||
// Apply the filter
|
||||
$("#example tfoot input").on( 'keyup change', function () {
|
||||
table
|
||||
.column( $(this).parent().index()+':visible' )
|
||||
.search( this.value )
|
||||
.draw();
|
||||
|
||||
// Apply the search
|
||||
table.columns().eq( 0 ).each( function ( colIdx ) {
|
||||
$( 'input', table.column( colIdx ).footer() ).on( 'keyup change', function () {
|
||||
table
|
||||
.column( colIdx )
|
||||
.search( this.value )
|
||||
.draw();
|
||||
} );
|
||||
} );
|
||||
} );</code>
|
||||
|
||||
@@ -601,7 +613,11 @@ $(document).ready(function() {
|
||||
<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 brush: js;"></code>
|
||||
below:</p><code class="multiline brush: js;">tfoot input {
|
||||
width: 100%;
|
||||
padding: 3px;
|
||||
box-sizing: border-box;
|
||||
}</code>
|
||||
</div>
|
||||
|
||||
<p>The following CSS library files are loaded for use in this example to provide the styling of the
|
||||
@@ -689,14 +705,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -714,9 +731,9 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li class="active"><a href="./multi_filter.html">Individual column filtering (text
|
||||
<li class="active"><a href="./multi_filter.html">Individual column searching (text
|
||||
inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -727,7 +744,7 @@ $(document).ready(function() {
|
||||
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
<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>DataTables example - Individual column filtering (select inputs)</title>
|
||||
<title>DataTables example - Individual column searching (select inputs)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
@@ -25,8 +26,10 @@ $(document).ready(function() {
|
||||
var select = $('<select><option value=""></option></select>')
|
||||
.appendTo( $(this).empty() )
|
||||
.on( 'change', function () {
|
||||
var val = $(this).val();
|
||||
|
||||
table.column( i )
|
||||
.search( $(this).val() )
|
||||
.search( val ? '^'+$(this).val()+'$' : val, true, false )
|
||||
.draw();
|
||||
} );
|
||||
|
||||
@@ -43,7 +46,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Individual column filtering (select inputs)</span></h1>
|
||||
<h1>DataTables example <span>Individual column searching (select inputs)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>This example is almost identical to text based individual column example and provides the same
|
||||
@@ -53,14 +56,24 @@ $(document).ready(function() {
|
||||
<p>After the table is initialised, the API is used to build the <code class="tag" title=
|
||||
"HTML tag">select</code> inputs through the use of the <a href=
|
||||
"//datatables.net/reference/api/column().data()"><code class="api" title=
|
||||
"API method">column().data()</code></a> method to get the data for each column in turn. The helper
|
||||
methods <a href="//datatables.net/reference/api/unique()"><code class="api" title=
|
||||
"API method">unique()</code></a> and <a href="//datatables.net/reference/api/sort()"><code class="api"
|
||||
title="API method">sort()</code></a> are also used to reduce the data for set input to unique and
|
||||
ordered elements. Finally the <code>change</code> event from the <code class="tag" title=
|
||||
"DataTables API method">column().data()<span>DT</span></code></a> method to get the data for each
|
||||
column in turn. The helper methods <a href="//datatables.net/reference/api/unique()"><code class="api"
|
||||
title="DataTables API method">unique()<span>DT</span></code></a> and <a href=
|
||||
"//datatables.net/reference/api/sort()"><code class="api" title=
|
||||
"DataTables API method">sort()<span>DT</span></code></a> are also used to reduce the data for set input
|
||||
to unique and ordered elements. Finally the <code>change</code> event from the <code class="tag" title=
|
||||
"HTML tag">select</code> input is used to trigger a column search using the <a href=
|
||||
"//datatables.net/reference/api/column().search()"><code class="api" title=
|
||||
"API method">column().search()</code></a> method.</p>
|
||||
"DataTables API method">column().search()<span>DT</span></code></a> method.</p>
|
||||
|
||||
<p>Note that the <a href="//datatables.net/reference/api/column().search()"><code class="api" title=
|
||||
"DataTables API method">column().search()<span>DT</span></code></a> method in this particular case
|
||||
performs an exact match through the use of a custom regular expression and disabling DataTables built
|
||||
in smart searching. For more information on the search options in DataTables API please refer to the
|
||||
documentation for <a href="//datatables.net/reference/api/search()"><code class="api" title=
|
||||
"DataTables API method">search()<span>DT</span></code></a> and <a href=
|
||||
"//datatables.net/reference/api/column().search()"><code class="api" title=
|
||||
"DataTables API method">column().search()<span>DT</span></code></a>.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -564,8 +577,10 @@ $(document).ready(function() {
|
||||
var select = $('<select><option value=""></option></select>')
|
||||
.appendTo( $(this).empty() )
|
||||
.on( 'change', function () {
|
||||
var val = $(this).val();
|
||||
|
||||
table.column( i )
|
||||
.search( $(this).val() )
|
||||
.search( val ? '^'+$(this).val()+'$' : val, true, false )
|
||||
.draw();
|
||||
} );
|
||||
|
||||
@@ -681,14 +696,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -706,8 +722,8 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li class="active"><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li class="active"><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -718,7 +734,7 @@ $(document).ready(function() {
|
||||
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
<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>DataTables example - Filtering API (regular expressions)</title>
|
||||
<title>DataTables example - Search API (regular expressions)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
@@ -53,41 +54,41 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Filtering API (regular expressions)</span></h1>
|
||||
<h1>DataTables example <span>Search API (regular expressions)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Filtering a table is one of the most common user interactions with a DataTables table, and
|
||||
<p>Searching a table is one of the most common user interactions with a DataTables table, and
|
||||
DataTables provides a number of methods for you to control this interaction. There are APIs for the
|
||||
global filter (<a href="//datatables.net/reference/api/search()"><code class="api" title=
|
||||
"API method">search()</code></a>) and for each individual column (<a href=
|
||||
global search (<a href="//datatables.net/reference/api/search()"><code class="api" title=
|
||||
"DataTables API method">search()<span>DT</span></code></a>) and for each individual column (<a href=
|
||||
"//datatables.net/reference/api/column().search()"><code class="api" title=
|
||||
"API method">column().search()</code></a>).</p>
|
||||
"DataTables API method">column().search()<span>DT</span></code></a>).</p>
|
||||
|
||||
<p>Note also that you must call the <a href="//datatables.net/reference/api/draw()"><code class="api"
|
||||
title="API method">draw()</code></a> method after performing the search, in order for the results to be
|
||||
displayed.</p>
|
||||
title="DataTables API method">draw()<span>DT</span></code></a> method after performing the search, in
|
||||
order for the results to be displayed.</p>
|
||||
|
||||
<p>Each filter (global or column) can be marked as a regular expression (allowing you to create very
|
||||
complex interactions) and as a smart filter or not. When smart filtering is enabled on a particular
|
||||
filter, DataTables will modify the user input string to a complex regular expression which can make
|
||||
filtering more intuitive.</p>
|
||||
<p>Each search (global or column) can be marked as a regular expression (allowing you to create very
|
||||
complex interactions) and as a smart search or not. When smart searching is enabled on a particular
|
||||
search, DataTables will modify the user input string to a complex regular expression which can make
|
||||
searching more intuitive.</p>
|
||||
|
||||
<p>This example allows you to "play" with the various filtering options that DataTables provides.</p>
|
||||
<p>This example allows you to "play" with the various searching options that DataTables provides.</p>
|
||||
</div>
|
||||
|
||||
<table cellpadding="3" cellspacing="0" border="0" style="width: 67%; margin: 0 auto 2em auto;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Target</th>
|
||||
<th>Filter text</th>
|
||||
<th>Search text</th>
|
||||
<th>Treat as regex</th>
|
||||
<th>Use smart filter</th>
|
||||
<th>Use smart search</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr id="filter_global">
|
||||
<td>Global filtering</td>
|
||||
<td>Global search</td>
|
||||
<td align="center"><input type="text" class="global_filter" id="global_filter"></td>
|
||||
<td align="center"><input type="checkbox" class="global_filter" id="global_regex"></td>
|
||||
<td align="center"><input type="checkbox" class="global_filter" id="global_smart" checked=
|
||||
@@ -766,14 +767,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -791,8 +793,8 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -803,7 +805,7 @@ $(document).ready(function() {
|
||||
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li class="active"><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li class="active"><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Child rows (show extra / detailed information)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -14,7 +15,7 @@ td.details-control {
|
||||
background: url('../resources/details_open.png') no-repeat center center;
|
||||
cursor: pointer;
|
||||
}
|
||||
tr.details td.details-control {
|
||||
tr.shown td.details-control {
|
||||
background: url('../resources/details_close.png') no-repeat center center;
|
||||
}
|
||||
|
||||
@@ -65,7 +66,7 @@ $(document).ready(function() {
|
||||
|
||||
// Add event listener for opening and closing details
|
||||
$('#example tbody').on('click', 'td.details-control', function () {
|
||||
var tr = $(this).parents('tr');
|
||||
var tr = $(this).closest('tr');
|
||||
var row = table.row( tr );
|
||||
|
||||
if ( row.child.isShown() ) {
|
||||
@@ -88,7 +89,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Child rows (show extra / detailed information)</span></h1>
|
||||
<h1>DataTables example <span>Child rows (show extra / detailed information)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>The DataTables API has a number of methods available for attaching child rows to a <em>parent</em>
|
||||
@@ -96,14 +97,15 @@ $(document).ready(function() {
|
||||
where you wish to convey more information about a row than there is space for in the host table.</p>
|
||||
|
||||
<p>The example below makes use of the <a href="//datatables.net/reference/api/row().child"><code class=
|
||||
"api" title="API method">row().child</code></a> methods to firstly check if a row is already displayed,
|
||||
and if so hide it (<a href="//datatables.net/reference/api/row().child.hide()"><code class="api" title=
|
||||
"API method">row().child.hide()</code></a>), otherwise show it (<a href=
|
||||
"api" title="DataTables API method">row().child<span>DT</span></code></a> methods to firstly check if a
|
||||
row is already displayed, and if so hide it (<a href=
|
||||
"//datatables.net/reference/api/row().child.hide()"><code class="api" title=
|
||||
"DataTables API method">row().child.hide()<span>DT</span></code></a>), otherwise show it (<a href=
|
||||
"//datatables.net/reference/api/row().child.show()"><code class="api" title=
|
||||
"API method">row().child.show()</code></a>). The content of the child row is, in this example, defined
|
||||
by the <code>formatDetails()</code> function, but you would replace that with whatever you wanted to
|
||||
show the content required, possibly including, for example, an Ajax call to the server to obtain the
|
||||
extra information to show.</p>
|
||||
"DataTables API method">row().child.show()<span>DT</span></code></a>). The content of the child row is,
|
||||
in this example, defined by the <code>formatDetails()</code> function, but you would replace that with
|
||||
whatever you wanted to show the content required, possibly including, for example, an Ajax call to the
|
||||
server to obtain the extra information to show.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -178,7 +180,7 @@ $(document).ready(function() {
|
||||
|
||||
// Add event listener for opening and closing details
|
||||
$('#example tbody').on('click', 'td.details-control', function () {
|
||||
var tr = $(this).parents('tr');
|
||||
var tr = $(this).closest('tr');
|
||||
var row = table.row( tr );
|
||||
|
||||
if ( row.child.isShown() ) {
|
||||
@@ -216,7 +218,7 @@ $(document).ready(function() {
|
||||
background: url('../resources/details_open.png') no-repeat center center;
|
||||
cursor: pointer;
|
||||
}
|
||||
tr.details td.details-control {
|
||||
tr.shown td.details-control {
|
||||
background: url('../resources/details_close.png') no-repeat center center;
|
||||
}</code>
|
||||
</div>
|
||||
@@ -306,14 +308,15 @@ tr.details td.details-control {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -331,8 +334,8 @@ tr.details td.details-control {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li class="active"><a href="./row_details.html">Child rows (show extra / detailed
|
||||
@@ -344,7 +347,7 @@ tr.details td.details-control {
|
||||
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Row selection (multiple rows)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -37,15 +38,15 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Row selection (multiple rows)</span></h1>
|
||||
<h1>DataTables example <span>Row selection (multiple rows)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>It can be quite useful at times to provide the user with the option to select rows in a DataTable.
|
||||
This can be done by simply using a click event to add / remove a class on the table rows. The <a href=
|
||||
"//datatables.net/reference/api/rows().data()"><code class="api" title=
|
||||
"API method">rows().data()</code></a> method can then be used to get the data for the selected rows. In
|
||||
this case it is simply counting the number of selected rows, but much more complex interactions can
|
||||
easily be developed.</p>
|
||||
"DataTables API method">rows().data()<span>DT</span></code></a> method can then be used to get the data
|
||||
for the selected rows. In this case it is simply counting the number of selected rows, but much more
|
||||
complex interactions can easily be developed.</p>
|
||||
|
||||
<p>If you are looking for a more complete row selection option <a href=
|
||||
"http://datatables.net/extras/tabletools">TableTools for DataTables</a> provides a complete API for
|
||||
@@ -664,14 +665,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -689,8 +691,8 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -701,7 +703,7 @@ $(document).ready(function() {
|
||||
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Row selection and deletion (single row)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -43,7 +44,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Row selection and deletion (single row)</span></h1>
|
||||
<h1>DataTables example <span>Row selection and deletion (single row)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>This example shows a modification of the multiple row selection example, where just a single can now
|
||||
@@ -52,10 +53,11 @@ $(document).ready(function() {
|
||||
and applied to the row to be selected.</p>
|
||||
|
||||
<p>Also shown is the <a href="//datatables.net/reference/api/row().remove()"><code class="api" title=
|
||||
"API method">row().remove()</code></a> method which will delete a row from a table, and the <a href=
|
||||
"//datatables.net/reference/api/draw()"><code class="api" title="API method">draw()</code></a> method
|
||||
with <code>false</code> as its first parameter. This will redraw the table keeping the current paging
|
||||
(without the <code>false</code> parameter the paging would be reset to the first page).</p>
|
||||
"DataTables API method">row().remove()<span>DT</span></code></a> method which will delete a row from a
|
||||
table, and the <a href="//datatables.net/reference/api/draw()"><code class="api" title=
|
||||
"DataTables API method">draw()<span>DT</span></code></a> method with <code>false</code> as its first
|
||||
parameter. This will redraw the table keeping the current paging (without the <code>false</code>
|
||||
parameter the paging would be reset to the first page).</p>
|
||||
|
||||
<p>If you are looking for a more complete row selection option <a href=
|
||||
"http://datatables.net/extras/tabletools">TableTools for DataTables</a> provides a complete API for
|
||||
@@ -680,14 +682,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -705,8 +708,8 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -718,7 +721,7 @@ $(document).ready(function() {
|
||||
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Show / hide columns dynamically</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -42,20 +43,20 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Show / hide columns dynamically</span></h1>
|
||||
<h1>DataTables example <span>Show / hide columns dynamically</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>This example shows how you can make use of the <a href=
|
||||
"//datatables.net/reference/api/column().visible()"><code class="api" title=
|
||||
"API method">column().visible()</code></a> API method to dynamically show and hide columns in a table.
|
||||
Also included here is scrolling, just to show it enabled with this API method, although that is not
|
||||
required for the API function to work.</p>
|
||||
"DataTables API method">column().visible()<span>DT</span></code></a> API method to dynamically show and
|
||||
hide columns in a table. Also included here is scrolling, just to show it enabled with this API method,
|
||||
although that is not required for the API function to work.</p>
|
||||
|
||||
<p>In addition to this, groups of columns can be shown and hidden at the same time using the <a href=
|
||||
"//datatables.net/reference/api/columns()"><code class="api" title="API method">columns()</code></a>
|
||||
method to select multiple columns and then using the <a href=
|
||||
"//datatables.net/reference/api/columns().visible()"><code class="api" title=
|
||||
"API method">columns().visible()</code></a> method to set their state.</p>
|
||||
"//datatables.net/reference/api/columns()"><code class="api" title=
|
||||
"DataTables API method">columns()<span>DT</span></code></a> method to select multiple columns and then
|
||||
using the <a href="//datatables.net/reference/api/columns().visible()"><code class="api" title=
|
||||
"DataTables API method">columns().visible()<span>DT</span></code></a> method to set their state.</p>
|
||||
|
||||
<p>If you are looking for a more complete column visibility interaction controls <a href=
|
||||
"http://datatables.net/extras/colvis">ColVis for DataTables</a> provides a complete interface for
|
||||
@@ -686,14 +687,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -711,8 +713,8 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -723,7 +725,7 @@ $(document).ready(function() {
|
||||
<li class="active"><a href="./show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
<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>DataTables example - Scrolling and jQuery UI tabs</title>
|
||||
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
|
||||
<link rel="stylesheet" type="text/css" href=
|
||||
"//cdn.datatables.net/plug-ins/505bef35b56/integration/jqueryui/dataTables.jqueryui.css">
|
||||
"../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<style type="text/css" class="init">
|
||||
@@ -43,7 +44,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Scrolling and jQuery UI tabs</span></h1>
|
||||
<h1>DataTables example <span>Scrolling and jQuery UI tabs</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>This example shows how DataTables with scrolling can be used together with jQuery UI tabs (or indeed
|
||||
@@ -54,13 +55,13 @@ $(document).ready(function() {
|
||||
|
||||
<p>This misalignment can be corrected by the <a href=
|
||||
"//datatables.net/reference/api/columns.adjust()"><code class="api" title=
|
||||
"API method">columns.adjust()</code></a> method when the table is made visible (i.e. it has
|
||||
dimensions).</p>
|
||||
"DataTables API method">columns.adjust()<span>DT</span></code></a> method when the table is made
|
||||
visible (i.e. it has dimensions).</p>
|
||||
|
||||
<p>This example shows how the jQuery UI <code>show</code> event can be used to trigger this method
|
||||
call. The visible tables on the page are selected using the static <code>dt-api-static tables()</code>
|
||||
method and passing the result to <a href="//datatables.net/reference/api/columns.adjust()"><code class=
|
||||
"api" title="API method">columns.adjust()</code></a>.</p>
|
||||
"api" title="DataTables API method">columns.adjust()<span>DT</span></code></a>.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -602,7 +603,7 @@ $(document).ready(function() {
|
||||
<li><a href=
|
||||
"//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css</a></li>
|
||||
<li><a href=
|
||||
"//cdn.datatables.net/plug-ins/505bef35b56/integration/jqueryui/dataTables.jqueryui.css">//cdn.datatables.net/plug-ins/505bef35b56/integration/jqueryui/dataTables.jqueryui.css</a></li>
|
||||
"../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css">../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -682,14 +683,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -707,8 +709,8 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
|
||||
@@ -720,7 +722,7 @@ $(document).ready(function() {
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li class="active"><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI
|
||||
tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Alternative pagination</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -29,18 +30,18 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Alternative pagination</span></h1>
|
||||
<h1>DataTables example <span>Alternative pagination</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>The default page control presented by DataTables (forward and backward buttons with up to 7 page
|
||||
numbers in-between) is fine for most situations, but there are cases where you may wish to customise
|
||||
the options presented to the end user. This is done through DataTables' extensible pagination
|
||||
mechanism, the <a href="//datatables.net/reference/option/pagingType"><code class="option" title=
|
||||
"Initialisation option">pagingType</code></a> option.</p>
|
||||
"DataTables initialisation option">pagingType<span>DT</span></code></a> option.</p>
|
||||
|
||||
<p>There are four built-in options for which pagination controls DataTables should show:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li><code class="string" title="String">simple</code> - 'Previous' and 'Next' buttons only</li>
|
||||
<li><code class="string" title="String">simple_numbers</code> - 'Previous' and 'Next' buttons, plus
|
||||
page numbers</li>
|
||||
@@ -52,9 +53,9 @@ $(document).ready(function() {
|
||||
|
||||
<p>The language strings of 'First', 'Previous' etc can be optionally through the internationalisation
|
||||
options of DataTables; <a href="//datatables.net/reference/option/language.paginate.first"><code class=
|
||||
"option" title="Initialisation option">language.paginate.first</code></a>, <a href=
|
||||
"//datatables.net/reference/option/language.paginate.previous"><code class="option" title=
|
||||
"Initialisation option">language.paginate.previous</code></a> etc.</p>
|
||||
"option" title="DataTables initialisation option">language.paginate.first<span>DT</span></code></a>,
|
||||
<a href="//datatables.net/reference/option/language.paginate.previous"><code class="option" title=
|
||||
"DataTables initialisation option">language.paginate.previous<span>DT</span></code></a> etc.</p>
|
||||
|
||||
<p>Additional options for the buttons that are shown can be added through the use of pagination type
|
||||
plug-ins. Furthermore, how the buttons are actually shown can be altered through the use of plug-in
|
||||
@@ -668,14 +669,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -693,8 +695,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -707,7 +709,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Language - Comma decimal place</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -32,7 +33,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Language - Comma decimal place</span></h1>
|
||||
<h1>DataTables example <span>Language - Comma decimal place</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>A dot (<code>.</code>) is used to mark the decimal place in Javascript, however, <a href=
|
||||
@@ -43,16 +44,16 @@ $(document).ready(function() {
|
||||
<p>When reading such numbers, Javascript won't automatically recognise them as numbers, however,
|
||||
DataTables' type detection and sorting methods can be instructed through the <a href=
|
||||
"//datatables.net/reference/option/language.decimal"><code class="option" title=
|
||||
"Initialisation option">language.decimal</code></a> option which character is used as the decimal place
|
||||
in your numbers. This will be used to correctly adjust DataTables' type detection and sorting
|
||||
algorithms to sort numbers in your table.</p>
|
||||
"DataTables initialisation option">language.decimal<span>DT</span></code></a> option which character is
|
||||
used as the decimal place in your numbers. This will be used to correctly adjust DataTables' type
|
||||
detection and sorting algorithms to sort numbers in your table.</p>
|
||||
|
||||
<p>Any character can be passed in using the <a href=
|
||||
"//datatables.net/reference/option/language.decimal"><code class="option" title=
|
||||
"Initialisation option">language.decimal</code></a> option, although the decimal place character used
|
||||
in a single table must be consistent (i.e. numbers with a dot decimal place and comma decimal place
|
||||
cannot both appear in the same table). Different tables on the same page can use different decimal
|
||||
characters if required.</p>
|
||||
"DataTables initialisation option">language.decimal<span>DT</span></code></a> option, although the
|
||||
decimal place character used in a single table must be consistent (i.e. numbers with a dot decimal
|
||||
place and comma decimal place cannot both appear in the same table). Different tables on the same page
|
||||
can use different decimal characters if required.</p>
|
||||
|
||||
<p>The example below shows a comma being used as the decimal place in the currency numbers shown in the
|
||||
final column.</p>
|
||||
@@ -665,14 +666,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -690,8 +692,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -704,7 +706,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Complex headers (rowspan and colspan)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -27,7 +28,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Complex headers (rowspan and colspan)</span></h1>
|
||||
<h1>DataTables example <span>Complex headers (rowspan and colspan)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>When using tables to display data, you will often wish to display column information in groups.
|
||||
@@ -35,11 +36,11 @@ $(document).ready(function() {
|
||||
assigning the required order listeners to the TH element suitable for that column.</p>
|
||||
|
||||
<p>Each column must have one TH cell which is unique to it for the listeners to be added. By default
|
||||
DataTables will use the bottom unique cell for the column to attach the irder listener, if more than
|
||||
DataTables will use the bottom unique cell for the column to attach the order listener, if more than
|
||||
one cell for a column if found. The <a href=
|
||||
"//datatables.net/reference/option/orderCellsTop"><code class="option" title=
|
||||
"Initialisation option">orderCellsTop</code></a> option can be used to tell DataTables to use the top
|
||||
cell if you prefer.</p>
|
||||
"DataTables initialisation option">orderCellsTop<span>DT</span></code></a> option can be used to tell
|
||||
DataTables to use the top cell if you prefer.</p>
|
||||
|
||||
<p>The example shown below has two sets of grouped information, grouped by colspan in the header.</p>
|
||||
</div>
|
||||
@@ -651,14 +652,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -676,8 +678,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -690,7 +692,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - DOM positioning</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -29,25 +30,26 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- DOM positioning</span></h1>
|
||||
<h1>DataTables example <span>DOM positioning</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>When customising DataTables for your own usage, you might find that the default position of the
|
||||
feature elements (filter input etc) is not quite to your liking. To address this issue DataTables takes
|
||||
inspiration from the CSS 3 Advanced Layout Module and provides the <a href=
|
||||
"//datatables.net/reference/option/dom"><code class="option" title=
|
||||
"Initialisation option">dom</code></a> initialisation parameter which can be set to indicate where you
|
||||
which particular features to appear in the DOM. You can also specify <code>div</code> wrapping
|
||||
containers (with an id and / or class) to provide complete layout flexibility.</p>
|
||||
"DataTables initialisation option">dom<span>DT</span></code></a> initialisation parameter which can be
|
||||
set to indicate where you which particular features to appear in the DOM. You can also specify
|
||||
<code>div</code> wrapping containers (with an id and / or class) to provide complete layout
|
||||
flexibility.</p>
|
||||
|
||||
<p>Each HTML control element presented by DataTables is denoted by a single character in the <a href=
|
||||
"//datatables.net/reference/option/dom"><code class="option" title=
|
||||
"Initialisation option">dom</code></a> option. For example the <code>l</code> option is used for the
|
||||
<code>L</code>ength changing input option.</p>
|
||||
"DataTables initialisation option">dom<span>DT</span></code></a> option. For example the <code>l</code>
|
||||
option is used for the <code>L</code>ength changing input option.</p>
|
||||
|
||||
<p>The built-in options available are:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li><code>l</code> - <code>L</code>ength changing</li>
|
||||
<li><code>f</code> - <code>F</code>iltering input</li>
|
||||
<li><code>t</code> - The <code>T</code>able!</li>
|
||||
@@ -103,8 +105,8 @@ $(document).ready(function() {
|
||||
table for example).</p>
|
||||
|
||||
<p>Furthermore, note that additional <a href="//datatables.net/reference/option/dom"><code class=
|
||||
"option" title="Initialisation option">dom</code></a> options can be added to DataTables through the
|
||||
use of plug-ins.</p>
|
||||
"option" title="DataTables initialisation option">dom<span>DT</span></code></a> options can be added to
|
||||
DataTables through the use of plug-ins.</p>
|
||||
|
||||
<p>In the example below, the table information is moved to the top of the table, and all the
|
||||
interaction elements to the bottom, each wrapper in a container <code>div</code>.</p>
|
||||
@@ -714,14 +716,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -739,8 +742,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -753,7 +756,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Feature enable / disable</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -31,7 +32,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Feature enable / disable</span></h1>
|
||||
<h1>DataTables example <span>Feature enable / disable</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Disabling features that you don't wish to use for a particular table is easily done by setting a
|
||||
@@ -645,14 +646,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -670,8 +672,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -684,7 +686,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Flexible table width</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -31,7 +32,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Flexible table width</span></h1>
|
||||
<h1>DataTables example <span>Flexible table width</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Often you may want to have your table resize dynamically with the page. Typically this is done by
|
||||
@@ -648,14 +649,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -673,8 +675,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -687,7 +689,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Hidden columns</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -39,14 +40,14 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Hidden columns</span></h1>
|
||||
<h1>DataTables example <span>Hidden columns</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>There are times when you might find it useful to display only a sub-set of the information that was
|
||||
available in the original table. For example you might want to reduce the amount of data shown on
|
||||
screen to make it clearer for the user. This is done through the <a href=
|
||||
"//datatables.net/reference/option/columns.visible"><code class="option" title=
|
||||
"Initialisation option">columns.visible</code></a> column option.</p>
|
||||
"DataTables initialisation option">columns.visible<span>DT</span></code></a> column option.</p>
|
||||
|
||||
<p>The column that is hidden is still part of the table and can be made visible through the <code>api
|
||||
column().visible()</code> API method at a future time if you wish to have columns which can be shown
|
||||
@@ -674,14 +675,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -699,8 +701,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -713,7 +715,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
@@ -15,7 +16,7 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Basic initialisation</span></h1>
|
||||
<h1>DataTables example <span>Basic initialisation</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables is very simple to use as a jQuery plug-in with a huge range of customisable option. The
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Language options</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -35,12 +36,13 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Language options</span></h1>
|
||||
<h1>DataTables example <span>Language options</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Changing the language information displayed by DataTables is as simple as passing in a <a href=
|
||||
"//datatables.net/reference/option/language"><code class="option" title=
|
||||
"Initialisation option">language</code></a> object to the DataTable constructor.</p>
|
||||
"DataTables initialisation option">language<span>DT</span></code></a> object to the DataTable
|
||||
constructor.</p>
|
||||
|
||||
<p>The example above shows a different set of English string being used, rather than the defaults.</p>
|
||||
</div>
|
||||
@@ -655,14 +657,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -680,8 +683,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -694,7 +697,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Multi-column ordering</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -39,29 +40,30 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Multi-column ordering</span></h1>
|
||||
<h1>DataTables example <span>Multi-column ordering</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables allows ordering by multiple columns at the same time, which can be activated in a number
|
||||
of different ways:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li>User shift click on a column (added the clicked column as a secondary, tertiary etc ordering
|
||||
column).</li>
|
||||
<li>On a per-column basis (i.e. order by a specific column and then a secondary column if the data
|
||||
in the first column is identical), through the <a href=
|
||||
"//datatables.net/reference/option/columns.orderData"><code class="option" title=
|
||||
"Initialisation option">columns.orderData</code></a> option.</li>
|
||||
"DataTables initialisation option">columns.orderData<span>DT</span></code></a> option.</li>
|
||||
<li>Using the <a href="//datatables.net/reference/option/columns.orderData"><code class="option"
|
||||
title="Initialisation option">columns.orderData</code></a> option to specify a multiple column
|
||||
order by default (for example <code>[ [0,'asc'], [1,'asc'] ]</code>).</li>
|
||||
title="DataTables initialisation option">columns.orderData<span>DT</span></code></a> option to
|
||||
specify a multiple column order by default (for example <code>[ [0,'asc'], [1,'asc']
|
||||
]</code>).</li>
|
||||
<li>Through the <a href="//datatables.net/reference/api/order()"><code class="api" title=
|
||||
"API method">order()</code></a> API method.</li>
|
||||
"DataTables API method">order()<span>DT</span></code></a> API method.</li>
|
||||
</ul>
|
||||
|
||||
<p>Note that, the ability for the user to shift click to order multiple columns can be disabled through
|
||||
the <a href="//datatables.net/reference/option/orderMulti"><code class="option" title=
|
||||
"Initialisation option">orderMulti</code></a> option.</p>
|
||||
"DataTables initialisation option">orderMulti<span>DT</span></code></a> option.</p>
|
||||
|
||||
<p>The example below shows the first column having a secondary order applied to the second column in
|
||||
the table, vice-versa for the second column being tied directly to the first and the salary column to
|
||||
@@ -612,14 +614,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -637,8 +640,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -651,7 +654,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Multiple tables</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -31,7 +32,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Multiple tables</span></h1>
|
||||
<h1>DataTables example <span>Multiple tables</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Often you might wish to initialise multiple tables with a single statement. This is trivially done
|
||||
@@ -366,14 +367,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -391,8 +393,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -405,7 +407,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Scroll - horizontal</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -35,15 +36,15 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Scroll - horizontal</span></h1>
|
||||
<h1>DataTables example <span>Scroll - horizontal</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables has the ability to show tables with horizontal scrolling, which is very useful for when
|
||||
you have a wide table, but want to constrain it to a limited horizontal display area. To enable
|
||||
x-scrolling simply set the <a href="//datatables.net/reference/option/scrollX"><code class="option"
|
||||
title="Initialisation option">scrollX</code></a> parameter to be whatever you want the container
|
||||
wrapper's width to be (this should be 100% in almost all cases with the width being constrained by the
|
||||
container element).</p>
|
||||
title="DataTables initialisation option">scrollX<span>DT</span></code></a> parameter to be whatever you
|
||||
want the container wrapper's width to be (this should be 100% in almost all cases with the width being
|
||||
constrained by the container element).</p>
|
||||
|
||||
<p>The example below shows a table too wide for the containing element with x-scrolling enabled. The
|
||||
CSS option of <code>th, td { white-space: nowrap; }</code> is also set to have the text content of each
|
||||
@@ -822,14 +823,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -847,8 +849,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -861,7 +863,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Scroll - horizontal and vertical</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -36,7 +37,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Scroll - horizontal and vertical</span></h1>
|
||||
<h1>DataTables example <span>Scroll - horizontal and vertical</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>In this example you can see DataTables doing both horizontal and vertical scrolling at the same
|
||||
@@ -815,14 +816,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -840,8 +842,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -854,7 +856,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Scroll - vertical</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -31,7 +32,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Scroll - vertical</span></h1>
|
||||
<h1>DataTables example <span>Scroll - vertical</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>This example shows the DataTables table body scrolling in the vertical direction. This can generally
|
||||
@@ -41,14 +42,16 @@ $(document).ready(function() {
|
||||
|
||||
<p>To enable y-scrolling simply set the <a href=
|
||||
"//datatables.net/reference/option/scrollY"><code class="option" title=
|
||||
"Initialisation option">scrollY</code></a> parameter to be whatever you want the container wrapper's
|
||||
height to be (any CSS measurement is acceptable, or just a number which is treated as pixels).</p>
|
||||
"DataTables initialisation option">scrollY<span>DT</span></code></a> parameter to be whatever you want
|
||||
the container wrapper's height to be (any CSS measurement is acceptable, or just a number which is
|
||||
treated as pixels).</p>
|
||||
|
||||
<p>Note also that the <a href="//datatables.net/reference/option/scrollCollapse"><code class="option"
|
||||
title="Initialisation option">scrollCollapse</code></a> option is enabled in this example. This will
|
||||
have the container match the height of the rows shown in the table if that height is smaller than that
|
||||
given height by the <a href="//datatables.net/reference/option/scrollY"><code class="option" title=
|
||||
"Initialisation option">scrollY</code></a>.</p>
|
||||
title="DataTables initialisation option">scrollCollapse<span>DT</span></code></a> option is enabled in
|
||||
this example. This will have the container match the height of the rows shown in the table if that
|
||||
height is smaller than that given height by the <a href=
|
||||
"//datatables.net/reference/option/scrollY"><code class="option" title=
|
||||
"DataTables initialisation option">scrollY<span>DT</span></code></a>.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -657,14 +660,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -682,8 +686,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -696,7 +700,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
<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>DataTables example - Scroll - vertical with jQuery UI ThemeRoller</title>
|
||||
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
|
||||
<link rel="stylesheet" type="text/css" href=
|
||||
"//cdn.datatables.net/plug-ins/505bef35b56/integration/jqueryui/dataTables.jqueryui.css">
|
||||
"../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<style type="text/css" class="init">
|
||||
@@ -33,7 +34,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Scroll - vertical with jQuery UI ThemeRoller</span></h1>
|
||||
<h1>DataTables example <span>Scroll - vertical with jQuery UI ThemeRoller</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>This example is an extension of the vertical scrolling example, showing DataTables ability to be
|
||||
@@ -570,7 +571,7 @@ $(document).ready(function() {
|
||||
<li><a href=
|
||||
"//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css</a></li>
|
||||
<li><a href=
|
||||
"//cdn.datatables.net/plug-ins/505bef35b56/integration/jqueryui/dataTables.jqueryui.css">//cdn.datatables.net/plug-ins/505bef35b56/integration/jqueryui/dataTables.jqueryui.css</a></li>
|
||||
"../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css">../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -649,14 +650,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -674,8 +676,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -688,7 +690,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - State saving</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -17,8 +18,10 @@
|
||||
<script type="text/javascript" language="javascript" src="../resources/demo.js"></script>
|
||||
<script type="text/javascript" language="javascript" class="init">
|
||||
|
||||
$('#example').dataTable( {
|
||||
"stateSave": true
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
stateSave: true
|
||||
} );
|
||||
} );
|
||||
|
||||
</script>
|
||||
@@ -27,32 +30,33 @@ $('#example').dataTable( {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- State saving</span></h1>
|
||||
<h1>DataTables example <span>State saving</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables has the option of being able to save the state of a table (its paging position, ordering
|
||||
state etc) so that is can be restored when the user reloads a page, or comes back to the page after
|
||||
visiting a sub-page. This state saving ability is enabled by the <a href=
|
||||
"//datatables.net/reference/option/stateSave"><code class="option" title=
|
||||
"Initialisation option">stateSave</code></a> option.</p>
|
||||
"DataTables initialisation option">stateSave<span>DT</span></code></a> option.</p>
|
||||
|
||||
<p>The built in state saving method uses the HTML5 <code>localStorage</code> API for efficient storage
|
||||
of the data. Please note that this means that the built in state saving option <em>will not work with
|
||||
IE6/7</em> as these browsers do not support this API. Alternative options of using cookies or saving
|
||||
the state on the server through Ajax can be used through the <a href=
|
||||
"//datatables.net/reference/option/stateSaveCallback"><code class="option" title=
|
||||
"Initialisation option">stateSaveCallback</code></a> and <a href=
|
||||
"//datatables.net/reference/option/stateLoadCallback"><code class="option" title=
|
||||
"Initialisation option">stateLoadCallback</code></a> options.</p>
|
||||
<p>The built in state saving method uses the HTML5 <code>localStorage</code> and
|
||||
<code>sessionStorage</code> APIs for efficient storage of the data. Please note that this means that
|
||||
the built in state saving option <strong>will not work with IE6/7</strong> as these browsers do not
|
||||
support these APIs. Alternative options of using cookies or saving the state on the server through Ajax
|
||||
can be used through the <a href="//datatables.net/reference/option/stateSaveCallback"><code class=
|
||||
"option" title="DataTables initialisation option">stateSaveCallback<span>DT</span></code></a> and
|
||||
<a href="//datatables.net/reference/option/stateLoadCallback"><code class="option" title=
|
||||
"DataTables initialisation option">stateLoadCallback<span>DT</span></code></a> options.</p>
|
||||
|
||||
<p>Additionally, note also that the duration for which the saved state is valid and can be used to
|
||||
restore the table state can be set using the <a href=
|
||||
"//datatables.net/reference/option/stateDuration"><code class="option" title=
|
||||
"Initialisation option">stateDuration</code></a> initialisation parameter (2 hours by default).</p>
|
||||
<p>The duration for which the saved state is valid and can be used to restore the table state can be
|
||||
set using the <a href="//datatables.net/reference/option/stateDuration"><code class="option" title=
|
||||
"DataTables initialisation option">stateDuration<span>DT</span></code></a> initialisation parameter (2
|
||||
hours by default). This parameter also controls if <code>localStorage</code> (0 or greater) or
|
||||
<code>sessionStorage</code> (-1) is used to store the data.</p>
|
||||
|
||||
<p>The example below simply shows state saving enabled in DataTables with the <a href=
|
||||
"//datatables.net/reference/option/stateSave"><code class="option" title=
|
||||
"Initialisation option">stateSave</code></a> option.</p>
|
||||
"DataTables initialisation option">stateSave<span>DT</span></code></a> option.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -549,8 +553,10 @@ $('#example').dataTable( {
|
||||
<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 brush: js;">$('#example').dataTable( {
|
||||
"stateSave": true
|
||||
example:</p><code class="multiline brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
stateSave: true
|
||||
} );
|
||||
} );</code>
|
||||
|
||||
<p>In addition to the above code, the following Javascript library files are loaded for use in this
|
||||
@@ -657,14 +663,15 @@ $('#example').dataTable( {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -682,8 +689,8 @@ $('#example').dataTable( {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -696,7 +703,7 @@ $('#example').dataTable( {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Default ordering (sorting)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -29,21 +30,22 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Default ordering (sorting)</span></h1>
|
||||
<h1>DataTables example <span>Default ordering (sorting)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>With DataTables you can alter the ordering characteristics of the table at initialisation time.
|
||||
Using the <a href="//datatables.net/reference/option/order"><code class="option" title=
|
||||
"Initialisation option">order</code></a> initialisation parameter, you can set the table to display the
|
||||
data in exactly the order that you want.</p>
|
||||
"DataTables initialisation option">order<span>DT</span></code></a> initialisation parameter, you can
|
||||
set the table to display the data in exactly the order that you want.</p>
|
||||
|
||||
<p>The <a href="//datatables.net/reference/option/order"><code class="option" title=
|
||||
"Initialisation option">order</code></a> parameter is an array of arrays where the first value of the
|
||||
inner array is the column to order on, and the second is <code class="string" title=
|
||||
"String">'asc'</code> (ascending ordering) or <code class="string" title="String">'desc'</code>
|
||||
(descending ordering) as required. <a href="//datatables.net/reference/option/order"><code class=
|
||||
"option" title="Initialisation option">order</code></a> is a 2D array to allow multi-column ordering to
|
||||
be defined.</p>
|
||||
"DataTables initialisation option">order<span>DT</span></code></a> parameter is an array of arrays
|
||||
where the first value of the inner array is the column to order on, and the second is <code class=
|
||||
"string" title="String">'asc'</code> (ascending ordering) or <code class="string" title=
|
||||
"String">'desc'</code> (descending ordering) as required. <a href=
|
||||
"//datatables.net/reference/option/order"><code class="option" title=
|
||||
"DataTables initialisation option">order<span>DT</span></code></a> is a 2D array to allow multi-column
|
||||
ordering to be defined.</p>
|
||||
|
||||
<p>The table below is ordered (descending) by the Age column.</p>
|
||||
</div>
|
||||
@@ -652,14 +654,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -677,8 +680,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -691,7 +694,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Zero configuration</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -29,7 +30,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Zero configuration</span></h1>
|
||||
<h1>DataTables example <span>Zero configuration</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables has most features enabled by default, so all you need to do to use it with your own
|
||||
@@ -641,14 +642,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -666,8 +668,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -680,7 +682,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Ajax sourced data</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -31,25 +32,26 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Ajax sourced data</span></h1>
|
||||
<h1>DataTables example <span>Ajax sourced data</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables has the ability to read data from virtually any JSON data source that can be obtained by
|
||||
Ajax. This can be done, in its most simple form, by setting the <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> option to the address of the JSON data source.</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> option to the address of the JSON
|
||||
data source.</p>
|
||||
|
||||
<p>The <a href="//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> option also allows for more advanced configuration such as
|
||||
altering how the Ajax request is made. See the <a href=
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> option also allows for more advanced
|
||||
configuration such as altering how the Ajax request is made. See the <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> documentation and the <a href="../ajax">other Ajax examples</a>
|
||||
for further information.</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> documentation and the <a href=
|
||||
"../ajax">other Ajax examples</a> for further information.</p>
|
||||
|
||||
<p>The example below shows DataTables loading data for a table from arrays as the data source (object
|
||||
parameters can also be used through the <a href=
|
||||
"//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> option ).</p>
|
||||
"DataTables initialisation option">columns.data<span>DT</span></code></a> option ).</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -199,14 +201,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -224,8 +227,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -238,7 +241,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - HTML (DOM) sourced data</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -29,7 +30,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- HTML (DOM) sourced data</span></h1>
|
||||
<h1>DataTables example <span>HTML (DOM) sourced data</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>The foundation for DataTables is progressive enhancement, so it is very adept at reading table
|
||||
@@ -645,14 +646,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -670,8 +672,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -684,7 +686,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
@@ -15,12 +16,12 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Data sources</span></h1>
|
||||
<h1>DataTables example <span>Data sources</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables can obtain data from four different fundamental sources:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li>HTML document (DOM)</li>
|
||||
<li>Javascript (array / objects)</li>
|
||||
<li>Ajax sourced data with client-side processing</li>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Javascript sourced data</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -100,22 +101,23 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Javascript sourced data</span></h1>
|
||||
<h1>DataTables example <span>Javascript sourced data</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>At times you will wish to be able to create a table from dynamic information passed directly to
|
||||
DataTables, rather than having it read from the document. This is achieved using the <a href=
|
||||
"//datatables.net/reference/option/data"><code class="option" title=
|
||||
"Initialisation option">data</code></a> option in the initialisation object, passing in an array of
|
||||
data to be used (like all other DataTables handled data, this can be arrays or objects using the
|
||||
<a href="//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> option).</p>
|
||||
"DataTables initialisation option">data<span>DT</span></code></a> option in the initialisation object,
|
||||
passing in an array of data to be used (like all other DataTables handled data, this can be arrays or
|
||||
objects using the <a href="//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"DataTables initialisation option">columns.data<span>DT</span></code></a> option).</p>
|
||||
|
||||
<p>A <code><table></code> must be available on the page for DataTables to use. This examples
|
||||
shows the element being added by Javascript and then initialising the DataTable with a set of data from
|
||||
a Javascript array.</p>
|
||||
</div>
|
||||
<div id="demo">
|
||||
|
||||
<div id="demo"></div>
|
||||
|
||||
<ul class="tabs">
|
||||
<li class="active">Javascript</li>
|
||||
@@ -309,14 +311,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -334,8 +337,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -348,7 +351,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Server-side processing</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -31,7 +32,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Server-side processing</span></h1>
|
||||
<h1>DataTables example <span>Server-side processing</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>There are many ways to get your data into DataTables, and if you are working with seriously large
|
||||
@@ -43,9 +44,9 @@ $(document).ready(function() {
|
||||
|
||||
<p>Server-side processing is enabled by setting the <a href=
|
||||
"//datatables.net/reference/option/serverSide"><code class="option" title=
|
||||
"Initialisation option">serverSide</code></a> option to <code>true</code> and providing an Ajax data
|
||||
source through the <a href="//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> option.</p>
|
||||
"DataTables initialisation option">serverSide<span>DT</span></code></a> option to <code>true</code> and
|
||||
providing an Ajax data source through the <a href="//datatables.net/reference/option/ajax"><code class=
|
||||
"option" title="DataTables initialisation option">ajax<span>DT</span></code></a> option.</p>
|
||||
|
||||
<p>This example shows a very simple table, matching the other examples, but in this instance using
|
||||
server-side processing. For further and more complex examples of using server-side processing, please
|
||||
@@ -201,14 +202,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -226,8 +228,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -240,7 +242,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="./resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="./resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../media/js/jquery.js"></script>
|
||||
@@ -15,7 +16,7 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Examples index</span></h1>
|
||||
<h1>DataTables example <span>Examples index</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>One of the best ways to learn how to do anything new (including software APIs!) is to get your hands
|
||||
@@ -85,14 +86,15 @@
|
||||
<ul class="toc">
|
||||
<li><a href="./styling/display.html">Base style</a></li>
|
||||
<li><a href="./styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="./styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="./styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="./styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="./styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="./styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="./styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="./styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="./styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="./styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="./styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="./styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -110,8 +112,8 @@
|
||||
<h3><a href="./api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="./api/add_row.html">Add rows</a></li>
|
||||
<li><a href="./api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="./api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="./api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="./api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="./api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -123,7 +125,7 @@
|
||||
<li><a href="./api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="./api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - API plug-in methods</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -50,7 +51,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- API plug-in methods</span></h1>
|
||||
<h1>DataTables example <span>API plug-in methods</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>The DataTables API is designed to be fully extensible, with custom functions being very easy to add
|
||||
@@ -63,7 +64,8 @@ $(document).ready(function() {
|
||||
methods, this allows <code>sum()</code> to very easily give the sum for any selected column, and to
|
||||
limit the sum to just the current page, filtered data or all pages. This is done using the options for
|
||||
the <a href="//datatables.net/reference/api/column()"><code class="api" title=
|
||||
"API method">column()</code></a> method and the options for its selectors.</p>
|
||||
"DataTables API method">column()<span>DT</span></code></a> method and the options for its
|
||||
selectors.</p>
|
||||
|
||||
<p>For more information about API plug-ins; creating them and their requirements, please refer to the
|
||||
plug-in development documentation.</p>
|
||||
@@ -695,14 +697,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -720,8 +723,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -734,7 +737,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Live DOM ordering</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -26,6 +27,14 @@ $.fn.dataTable.ext.order['dom-text'] = function ( settings, col )
|
||||
} );
|
||||
}
|
||||
|
||||
/* Create an array with the values of all the input boxes in a column, parsed as numbers */
|
||||
$.fn.dataTable.ext.order['dom-text-numeric'] = function ( settings, col )
|
||||
{
|
||||
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
|
||||
return $('input', td).val() * 1;
|
||||
} );
|
||||
}
|
||||
|
||||
/* Create an array with the values of all the select options in a column */
|
||||
$.fn.dataTable.ext.order['dom-select'] = function ( settings, col )
|
||||
{
|
||||
@@ -47,7 +56,7 @@ $(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"columns": [
|
||||
null,
|
||||
{ "orderDataType": "dom-text", "type": "numeric" },
|
||||
{ "orderDataType": "dom-text-numeric" },
|
||||
{ "orderDataType": "dom-text" },
|
||||
{ "orderDataType": "dom-select" }
|
||||
]
|
||||
@@ -61,7 +70,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Live DOM ordering</span></h1>
|
||||
<h1>DataTables example <span>Live DOM ordering</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>This example shows how you can use information available in the DOM to order columns. Typically
|
||||
@@ -78,9 +87,10 @@ $(document).ready(function() {
|
||||
<p>This is a fairly simple example, but it you aren't constrained to just using form input elements,
|
||||
you could use anything and customise your DOM queries to suit yourself. You could also update the
|
||||
ordering live as a user in entered data into a form using an event handler calling <a href=
|
||||
"//datatables.net/reference/api/order()"><code class="api" title="API method">order()</code></a> or
|
||||
<a href="//datatables.net/reference/api/draw()"><code class="api" title="API method">draw()</code></a>
|
||||
methods.</p>
|
||||
"//datatables.net/reference/api/order()"><code class="api" title=
|
||||
"DataTables API method">order()<span>DT</span></code></a> or <a href=
|
||||
"//datatables.net/reference/api/draw()"><code class="api" title=
|
||||
"DataTables API method">draw()<span>DT</span></code></a> methods.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -1648,6 +1658,14 @@ $.fn.dataTable.ext.order['dom-text'] = function ( settings, col )
|
||||
} );
|
||||
}
|
||||
|
||||
/* Create an array with the values of all the input boxes in a column, parsed as numbers */
|
||||
$.fn.dataTable.ext.order['dom-text-numeric'] = function ( settings, col )
|
||||
{
|
||||
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
|
||||
return $('input', td).val() * 1;
|
||||
} );
|
||||
}
|
||||
|
||||
/* Create an array with the values of all the select options in a column */
|
||||
$.fn.dataTable.ext.order['dom-select'] = function ( settings, col )
|
||||
{
|
||||
@@ -1669,7 +1687,7 @@ $(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"columns": [
|
||||
null,
|
||||
{ "orderDataType": "dom-text", "type": "numeric" },
|
||||
{ "orderDataType": "dom-text-numeric" },
|
||||
{ "orderDataType": "dom-text" },
|
||||
{ "orderDataType": "dom-select" }
|
||||
]
|
||||
@@ -1782,14 +1800,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1807,8 +1826,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -1821,7 +1840,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
@@ -15,7 +16,7 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Plug-ins</span></h1>
|
||||
<h1>DataTables example <span>Plug-ins</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>While DataTables has a wide range of options and data type support built in, it can never cater for
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Custom filtering - range search</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -21,14 +22,14 @@
|
||||
/* Custom filtering function which will search data in column four between two values */
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function( settings, data, dataIndex ) {
|
||||
var min = $('#min').val() * 1;
|
||||
var max = $('#max').val() * 1;
|
||||
var min = parseInt( $('#min').val(), 10 );
|
||||
var max = parseInt( $('#max').val(), 10 );
|
||||
var age = parseFloat( data[3] ) || 0; // use data for the age column
|
||||
|
||||
if ( ( min == '' && max == '' ) ||
|
||||
( min == '' && age <= max ) ||
|
||||
( min <= age && '' == max ) ||
|
||||
( min <= age && age <= max ) )
|
||||
if ( ( isNaN( min ) && isNaN( max ) ) ||
|
||||
( isNaN( min ) && age <= max ) ||
|
||||
( min <= age && isNaN( max ) ) ||
|
||||
( min <= age && age <= max ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -52,7 +53,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Custom filtering - range search</span></h1>
|
||||
<h1>DataTables example <span>Custom filtering - range search</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>There may be occasions when you wish to search data presented to the end user in your own manner,
|
||||
@@ -573,14 +574,14 @@ $(document).ready(function() {
|
||||
example:</p><code class="multiline brush: js;">/* Custom filtering function which will search data in column four between two values */
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function( settings, data, dataIndex ) {
|
||||
var min = $('#min').val() * 1;
|
||||
var max = $('#max').val() * 1;
|
||||
var min = parseInt( $('#min').val(), 10 );
|
||||
var max = parseInt( $('#max').val(), 10 );
|
||||
var age = parseFloat( data[3] ) || 0; // use data for the age column
|
||||
|
||||
if ( ( min == '' && max == '' ) ||
|
||||
( min == '' && age <= max ) ||
|
||||
( min <= age && '' == max ) ||
|
||||
( min <= age && age <= max ) )
|
||||
if ( ( isNaN( min ) && isNaN( max ) ) ||
|
||||
( isNaN( min ) && age <= max ) ||
|
||||
( min <= age && isNaN( max ) ) ||
|
||||
( min <= age && age <= max ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -703,14 +704,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -728,8 +730,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -742,7 +744,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Ordering plug-ins (with type detection)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -20,12 +21,19 @@
|
||||
|
||||
$.fn.dataTable.ext.type.detect.unshift(
|
||||
function ( d ) {
|
||||
return /^[\-\d,]+$/.test( d ) ? 'numeric-comma' : null;
|
||||
return d === 'Low' || d === 'Medium' || d === 'High' ?
|
||||
'salary-grade' :
|
||||
null;
|
||||
}
|
||||
);
|
||||
|
||||
$.fn.dataTable.ext.type.order['numeric-comma-pre'] = function ( d ) {
|
||||
return parseFloat( d.replace(/,/g, '.') ) || 0;
|
||||
$.fn.dataTable.ext.type.order['salary-grade-pre'] = function ( d ) {
|
||||
switch ( d ) {
|
||||
case 'Low': return 1;
|
||||
case 'Medium': return 2;
|
||||
case 'High': return 3;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -40,7 +48,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Ordering plug-ins (with type detection)</span></h1>
|
||||
<h1>DataTables example <span>Ordering plug-ins (with type detection)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Although DataTables will automatically order data from a number of different data types using the
|
||||
@@ -53,8 +61,7 @@ $(document).ready(function() {
|
||||
about type detection and ordering plug-ins; creating them and their requirements, please refer to the
|
||||
plug-in development documentation.</p>
|
||||
|
||||
<p>This example shows ordering with a comma for a decimal place, as is often used in parts of Europe
|
||||
with automatic type detection.</p>
|
||||
<p>This example shows ordering with using an enumerated type.</p>
|
||||
|
||||
<p>A wide variety of ready made ordering plug-ins can be found on <a href=
|
||||
"//datatables.net/plug-ins/sorting">the DataTables plug-ins page</a>.</p>
|
||||
@@ -90,7 +97,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>61</td>
|
||||
<td>2011/04/25</td>
|
||||
<td>$320.800,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Garrett Winters</td>
|
||||
@@ -98,7 +105,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>63</td>
|
||||
<td>2011/07/25</td>
|
||||
<td>$170.750,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ashton Cox</td>
|
||||
@@ -106,7 +113,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>66</td>
|
||||
<td>2009/01/12</td>
|
||||
<td>$86.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cedric Kelly</td>
|
||||
@@ -114,7 +121,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>22</td>
|
||||
<td>2012/03/29</td>
|
||||
<td>$433.060,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Airi Satou</td>
|
||||
@@ -122,7 +129,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>33</td>
|
||||
<td>2008/11/28</td>
|
||||
<td>$162.700,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Brielle Williamson</td>
|
||||
@@ -130,7 +137,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>61</td>
|
||||
<td>2012/12/02</td>
|
||||
<td>$372.000,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Herrod Chandler</td>
|
||||
@@ -138,7 +145,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>59</td>
|
||||
<td>2012/08/06</td>
|
||||
<td>$137.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rhona Davidson</td>
|
||||
@@ -146,7 +153,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>55</td>
|
||||
<td>2010/10/14</td>
|
||||
<td>$327.900,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Colleen Hurst</td>
|
||||
@@ -154,7 +161,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>39</td>
|
||||
<td>2009/09/15</td>
|
||||
<td>$205.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sonya Frost</td>
|
||||
@@ -162,7 +169,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>23</td>
|
||||
<td>2008/12/13</td>
|
||||
<td>$103.600,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jena Gaines</td>
|
||||
@@ -170,7 +177,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>30</td>
|
||||
<td>2008/12/19</td>
|
||||
<td>$90.560,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Quinn Flynn</td>
|
||||
@@ -178,7 +185,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>22</td>
|
||||
<td>2013/03/03</td>
|
||||
<td>$342.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Charde Marshall</td>
|
||||
@@ -186,7 +193,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>36</td>
|
||||
<td>2008/10/16</td>
|
||||
<td>$470.600,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Haley Kennedy</td>
|
||||
@@ -194,7 +201,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>43</td>
|
||||
<td>2012/12/18</td>
|
||||
<td>$313.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tatyana Fitzpatrick</td>
|
||||
@@ -202,7 +209,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>19</td>
|
||||
<td>2010/03/17</td>
|
||||
<td>$385.750,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michael Silva</td>
|
||||
@@ -210,7 +217,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>66</td>
|
||||
<td>2012/11/27</td>
|
||||
<td>$198.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Paul Byrd</td>
|
||||
@@ -218,7 +225,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>64</td>
|
||||
<td>2010/06/09</td>
|
||||
<td>$725.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gloria Little</td>
|
||||
@@ -226,7 +233,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>59</td>
|
||||
<td>2009/04/10</td>
|
||||
<td>$237.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bradley Greer</td>
|
||||
@@ -234,7 +241,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>41</td>
|
||||
<td>2012/10/13</td>
|
||||
<td>$132.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dai Rios</td>
|
||||
@@ -242,7 +249,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>35</td>
|
||||
<td>2012/09/26</td>
|
||||
<td>$217.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jenette Caldwell</td>
|
||||
@@ -250,7 +257,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>30</td>
|
||||
<td>2011/09/03</td>
|
||||
<td>$345.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Yuri Berry</td>
|
||||
@@ -258,7 +265,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>40</td>
|
||||
<td>2009/06/25</td>
|
||||
<td>$675.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Caesar Vance</td>
|
||||
@@ -266,7 +273,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>21</td>
|
||||
<td>2011/12/12</td>
|
||||
<td>$106.450,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doris Wilder</td>
|
||||
@@ -274,7 +281,7 @@ $(document).ready(function() {
|
||||
<td>Sidney</td>
|
||||
<td>23</td>
|
||||
<td>2010/09/20</td>
|
||||
<td>$85.600,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Angelica Ramos</td>
|
||||
@@ -282,7 +289,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>47</td>
|
||||
<td>2009/10/09</td>
|
||||
<td>$1.200.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gavin Joyce</td>
|
||||
@@ -290,7 +297,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>42</td>
|
||||
<td>2010/12/22</td>
|
||||
<td>$92.575,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jennifer Chang</td>
|
||||
@@ -298,7 +305,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>28</td>
|
||||
<td>2010/11/14</td>
|
||||
<td>$357.650,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Brenden Wagner</td>
|
||||
@@ -306,7 +313,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>28</td>
|
||||
<td>2011/06/07</td>
|
||||
<td>$206.850,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fiona Green</td>
|
||||
@@ -314,7 +321,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>48</td>
|
||||
<td>2010/03/11</td>
|
||||
<td>$850.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shou Itou</td>
|
||||
@@ -322,7 +329,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>20</td>
|
||||
<td>2011/08/14</td>
|
||||
<td>$163.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michelle House</td>
|
||||
@@ -330,7 +337,7 @@ $(document).ready(function() {
|
||||
<td>Sidney</td>
|
||||
<td>37</td>
|
||||
<td>2011/06/02</td>
|
||||
<td>$95.400,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Suki Burks</td>
|
||||
@@ -338,7 +345,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>53</td>
|
||||
<td>2009/10/22</td>
|
||||
<td>$114.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prescott Bartlett</td>
|
||||
@@ -346,7 +353,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>27</td>
|
||||
<td>2011/05/07</td>
|
||||
<td>$145.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gavin Cortez</td>
|
||||
@@ -354,7 +361,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>22</td>
|
||||
<td>2008/10/26</td>
|
||||
<td>$235.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Martena Mccray</td>
|
||||
@@ -362,7 +369,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>46</td>
|
||||
<td>2011/03/09</td>
|
||||
<td>$324.050,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Unity Butler</td>
|
||||
@@ -370,7 +377,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>47</td>
|
||||
<td>2009/12/09</td>
|
||||
<td>$85.675,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Howard Hatfield</td>
|
||||
@@ -378,7 +385,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>51</td>
|
||||
<td>2008/12/16</td>
|
||||
<td>$164.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hope Fuentes</td>
|
||||
@@ -386,7 +393,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>41</td>
|
||||
<td>2010/02/12</td>
|
||||
<td>$109.850,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Vivian Harrell</td>
|
||||
@@ -394,7 +401,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>62</td>
|
||||
<td>2009/02/14</td>
|
||||
<td>$452.500,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Timothy Mooney</td>
|
||||
@@ -402,7 +409,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>37</td>
|
||||
<td>2008/12/11</td>
|
||||
<td>$136.200,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jackson Bradshaw</td>
|
||||
@@ -410,7 +417,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>65</td>
|
||||
<td>2008/09/26</td>
|
||||
<td>$645.750,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Olivia Liang</td>
|
||||
@@ -418,7 +425,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>64</td>
|
||||
<td>2011/02/03</td>
|
||||
<td>$234.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bruno Nash</td>
|
||||
@@ -426,7 +433,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>38</td>
|
||||
<td>2011/05/03</td>
|
||||
<td>$163.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sakura Yamamoto</td>
|
||||
@@ -434,7 +441,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>37</td>
|
||||
<td>2009/08/19</td>
|
||||
<td>$139.575,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Thor Walton</td>
|
||||
@@ -442,7 +449,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>61</td>
|
||||
<td>2013/08/11</td>
|
||||
<td>$98.540,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Finn Camacho</td>
|
||||
@@ -450,7 +457,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>47</td>
|
||||
<td>2009/07/07</td>
|
||||
<td>$87.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Serge Baldwin</td>
|
||||
@@ -458,7 +465,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>64</td>
|
||||
<td>2012/04/09</td>
|
||||
<td>$138.575,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zenaida Frank</td>
|
||||
@@ -466,7 +473,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>63</td>
|
||||
<td>2010/01/04</td>
|
||||
<td>$125.250,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zorita Serrano</td>
|
||||
@@ -474,7 +481,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>56</td>
|
||||
<td>2012/06/01</td>
|
||||
<td>$115.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jennifer Acosta</td>
|
||||
@@ -482,7 +489,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>43</td>
|
||||
<td>2013/02/01</td>
|
||||
<td>$75.650,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cara Stevens</td>
|
||||
@@ -490,7 +497,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>46</td>
|
||||
<td>2011/12/06</td>
|
||||
<td>$145.600,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hermione Butler</td>
|
||||
@@ -498,7 +505,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>47</td>
|
||||
<td>2011/03/21</td>
|
||||
<td>$356.250,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lael Greer</td>
|
||||
@@ -506,7 +513,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>21</td>
|
||||
<td>2009/02/27</td>
|
||||
<td>$103.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jonas Alexander</td>
|
||||
@@ -514,7 +521,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>30</td>
|
||||
<td>2010/07/14</td>
|
||||
<td>$86.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shad Decker</td>
|
||||
@@ -522,7 +529,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>51</td>
|
||||
<td>2008/11/13</td>
|
||||
<td>$183.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michael Bruce</td>
|
||||
@@ -530,7 +537,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>29</td>
|
||||
<td>2011/06/27</td>
|
||||
<td>$183.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Donna Snider</td>
|
||||
@@ -538,7 +545,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>27</td>
|
||||
<td>2011/01/25</td>
|
||||
<td>$112.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -556,12 +563,19 @@ $(document).ready(function() {
|
||||
<p>The Javascript shown below is used to initialise the table shown in this
|
||||
example:</p><code class="multiline brush: js;">$.fn.dataTable.ext.type.detect.unshift(
|
||||
function ( d ) {
|
||||
return /^[\-\d,]+$/.test( d ) ? 'numeric-comma' : null;
|
||||
return d === 'Low' || d === 'Medium' || d === 'High' ?
|
||||
'salary-grade' :
|
||||
null;
|
||||
}
|
||||
);
|
||||
|
||||
$.fn.dataTable.ext.type.order['numeric-comma-pre'] = function ( d ) {
|
||||
return parseFloat( d.replace(/,/g, '.') ) || 0;
|
||||
$.fn.dataTable.ext.type.order['salary-grade-pre'] = function ( d ) {
|
||||
switch ( d ) {
|
||||
case 'Low': return 1;
|
||||
case 'Medium': return 2;
|
||||
case 'High': return 3;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -675,14 +689,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -700,8 +715,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -714,7 +729,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Ordering plug-ins (no type detection)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -18,15 +19,20 @@
|
||||
<script type="text/javascript" language="javascript" class="init">
|
||||
|
||||
|
||||
$.fn.dataTable.ext.type.order['numeric-comma-pre'] = function ( d ) {
|
||||
return parseFloat( d.replace(/,/g, '.') ) || 0;
|
||||
$.fn.dataTable.ext.type.order['salary-grade-pre'] = function ( d ) {
|
||||
switch ( d ) {
|
||||
case 'Low': return 1;
|
||||
case 'Medium': return 2;
|
||||
case 'High': return 3;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"columnDefs": [ {
|
||||
"type": "numeric-comma",
|
||||
"targets": 3
|
||||
"type": "salary-grade",
|
||||
"targets": -1
|
||||
} ]
|
||||
} );
|
||||
} );
|
||||
@@ -38,7 +44,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Ordering plug-ins (no type detection)</span></h1>
|
||||
<h1>DataTables example <span>Ordering plug-ins (no type detection)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Although DataTables will order a number of data types using the built in methods, When dealing with
|
||||
@@ -46,14 +52,13 @@ $(document).ready(function() {
|
||||
ordering functions, you have have DataTables order data in any manner you wish.</p>
|
||||
|
||||
<p>This is done by using the <a href="//datatables.net/reference/option/columns.type"><code class=
|
||||
"option" title="Initialisation option">columns.type</code></a> parameter, in combination with a
|
||||
ordering plug-in. The ordering plug-in can be be of any level of complexity (natural ordering for
|
||||
example can be fairly complex while also very powerful), and is defined by attaching to the
|
||||
<code>$.fn.dataTable.ext.type.order</code> object. For more information about ordering plug-ins;
|
||||
"option" title="DataTables initialisation option">columns.type<span>DT</span></code></a> parameter, in
|
||||
combination with a ordering plug-in. The ordering plug-in can be be of any level of complexity (natural
|
||||
ordering for example can be fairly complex while also very powerful), and is defined by attaching to
|
||||
the <code>$.fn.dataTable.ext.type.order</code> object. For more information about ordering plug-ins;
|
||||
creating them and their requirements, please refer to the plug-in development documentation.</p>
|
||||
|
||||
<p>This example shows ordering with a comma for a decimal place, as is often used in parts of
|
||||
Europe.</p>
|
||||
<p>This example shows ordering with using an enumerated type.</p>
|
||||
|
||||
<p>A wide variety of ready made ordering plug-ins can be found on <a href=
|
||||
"//datatables.net/plug-ins/sorting">the DataTables plug-ins page</a>.</p>
|
||||
@@ -89,7 +94,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>61</td>
|
||||
<td>2011/04/25</td>
|
||||
<td>$320.800,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Garrett Winters</td>
|
||||
@@ -97,7 +102,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>63</td>
|
||||
<td>2011/07/25</td>
|
||||
<td>$170.750,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ashton Cox</td>
|
||||
@@ -105,7 +110,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>66</td>
|
||||
<td>2009/01/12</td>
|
||||
<td>$86.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cedric Kelly</td>
|
||||
@@ -113,7 +118,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>22</td>
|
||||
<td>2012/03/29</td>
|
||||
<td>$433.060,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Airi Satou</td>
|
||||
@@ -121,7 +126,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>33</td>
|
||||
<td>2008/11/28</td>
|
||||
<td>$162.700,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Brielle Williamson</td>
|
||||
@@ -129,7 +134,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>61</td>
|
||||
<td>2012/12/02</td>
|
||||
<td>$372.000,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Herrod Chandler</td>
|
||||
@@ -137,7 +142,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>59</td>
|
||||
<td>2012/08/06</td>
|
||||
<td>$137.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rhona Davidson</td>
|
||||
@@ -145,7 +150,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>55</td>
|
||||
<td>2010/10/14</td>
|
||||
<td>$327.900,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Colleen Hurst</td>
|
||||
@@ -153,7 +158,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>39</td>
|
||||
<td>2009/09/15</td>
|
||||
<td>$205.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sonya Frost</td>
|
||||
@@ -161,7 +166,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>23</td>
|
||||
<td>2008/12/13</td>
|
||||
<td>$103.600,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jena Gaines</td>
|
||||
@@ -169,7 +174,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>30</td>
|
||||
<td>2008/12/19</td>
|
||||
<td>$90.560,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Quinn Flynn</td>
|
||||
@@ -177,7 +182,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>22</td>
|
||||
<td>2013/03/03</td>
|
||||
<td>$342.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Charde Marshall</td>
|
||||
@@ -185,7 +190,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>36</td>
|
||||
<td>2008/10/16</td>
|
||||
<td>$470.600,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Haley Kennedy</td>
|
||||
@@ -193,7 +198,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>43</td>
|
||||
<td>2012/12/18</td>
|
||||
<td>$313.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tatyana Fitzpatrick</td>
|
||||
@@ -201,7 +206,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>19</td>
|
||||
<td>2010/03/17</td>
|
||||
<td>$385.750,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michael Silva</td>
|
||||
@@ -209,7 +214,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>66</td>
|
||||
<td>2012/11/27</td>
|
||||
<td>$198.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Paul Byrd</td>
|
||||
@@ -217,7 +222,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>64</td>
|
||||
<td>2010/06/09</td>
|
||||
<td>$725.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gloria Little</td>
|
||||
@@ -225,7 +230,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>59</td>
|
||||
<td>2009/04/10</td>
|
||||
<td>$237.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bradley Greer</td>
|
||||
@@ -233,7 +238,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>41</td>
|
||||
<td>2012/10/13</td>
|
||||
<td>$132.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dai Rios</td>
|
||||
@@ -241,7 +246,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>35</td>
|
||||
<td>2012/09/26</td>
|
||||
<td>$217.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jenette Caldwell</td>
|
||||
@@ -249,7 +254,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>30</td>
|
||||
<td>2011/09/03</td>
|
||||
<td>$345.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Yuri Berry</td>
|
||||
@@ -257,7 +262,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>40</td>
|
||||
<td>2009/06/25</td>
|
||||
<td>$675.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Caesar Vance</td>
|
||||
@@ -265,7 +270,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>21</td>
|
||||
<td>2011/12/12</td>
|
||||
<td>$106.450,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doris Wilder</td>
|
||||
@@ -273,7 +278,7 @@ $(document).ready(function() {
|
||||
<td>Sidney</td>
|
||||
<td>23</td>
|
||||
<td>2010/09/20</td>
|
||||
<td>$85.600,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Angelica Ramos</td>
|
||||
@@ -281,7 +286,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>47</td>
|
||||
<td>2009/10/09</td>
|
||||
<td>$1.200.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gavin Joyce</td>
|
||||
@@ -289,7 +294,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>42</td>
|
||||
<td>2010/12/22</td>
|
||||
<td>$92.575,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jennifer Chang</td>
|
||||
@@ -297,7 +302,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>28</td>
|
||||
<td>2010/11/14</td>
|
||||
<td>$357.650,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Brenden Wagner</td>
|
||||
@@ -305,7 +310,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>28</td>
|
||||
<td>2011/06/07</td>
|
||||
<td>$206.850,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fiona Green</td>
|
||||
@@ -313,7 +318,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>48</td>
|
||||
<td>2010/03/11</td>
|
||||
<td>$850.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shou Itou</td>
|
||||
@@ -321,7 +326,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>20</td>
|
||||
<td>2011/08/14</td>
|
||||
<td>$163.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michelle House</td>
|
||||
@@ -329,7 +334,7 @@ $(document).ready(function() {
|
||||
<td>Sidney</td>
|
||||
<td>37</td>
|
||||
<td>2011/06/02</td>
|
||||
<td>$95.400,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Suki Burks</td>
|
||||
@@ -337,7 +342,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>53</td>
|
||||
<td>2009/10/22</td>
|
||||
<td>$114.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prescott Bartlett</td>
|
||||
@@ -345,7 +350,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>27</td>
|
||||
<td>2011/05/07</td>
|
||||
<td>$145.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gavin Cortez</td>
|
||||
@@ -353,7 +358,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>22</td>
|
||||
<td>2008/10/26</td>
|
||||
<td>$235.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Martena Mccray</td>
|
||||
@@ -361,7 +366,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>46</td>
|
||||
<td>2011/03/09</td>
|
||||
<td>$324.050,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Unity Butler</td>
|
||||
@@ -369,7 +374,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>47</td>
|
||||
<td>2009/12/09</td>
|
||||
<td>$85.675,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Howard Hatfield</td>
|
||||
@@ -377,7 +382,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>51</td>
|
||||
<td>2008/12/16</td>
|
||||
<td>$164.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hope Fuentes</td>
|
||||
@@ -385,7 +390,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>41</td>
|
||||
<td>2010/02/12</td>
|
||||
<td>$109.850,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Vivian Harrell</td>
|
||||
@@ -393,7 +398,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>62</td>
|
||||
<td>2009/02/14</td>
|
||||
<td>$452.500,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Timothy Mooney</td>
|
||||
@@ -401,7 +406,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>37</td>
|
||||
<td>2008/12/11</td>
|
||||
<td>$136.200,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jackson Bradshaw</td>
|
||||
@@ -409,7 +414,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>65</td>
|
||||
<td>2008/09/26</td>
|
||||
<td>$645.750,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Olivia Liang</td>
|
||||
@@ -417,7 +422,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>64</td>
|
||||
<td>2011/02/03</td>
|
||||
<td>$234.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bruno Nash</td>
|
||||
@@ -425,7 +430,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>38</td>
|
||||
<td>2011/05/03</td>
|
||||
<td>$163.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sakura Yamamoto</td>
|
||||
@@ -433,7 +438,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>37</td>
|
||||
<td>2009/08/19</td>
|
||||
<td>$139.575,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Thor Walton</td>
|
||||
@@ -441,7 +446,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>61</td>
|
||||
<td>2013/08/11</td>
|
||||
<td>$98.540,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Finn Camacho</td>
|
||||
@@ -449,7 +454,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>47</td>
|
||||
<td>2009/07/07</td>
|
||||
<td>$87.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Serge Baldwin</td>
|
||||
@@ -457,7 +462,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>64</td>
|
||||
<td>2012/04/09</td>
|
||||
<td>$138.575,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zenaida Frank</td>
|
||||
@@ -465,7 +470,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>63</td>
|
||||
<td>2010/01/04</td>
|
||||
<td>$125.250,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zorita Serrano</td>
|
||||
@@ -473,7 +478,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>56</td>
|
||||
<td>2012/06/01</td>
|
||||
<td>$115.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jennifer Acosta</td>
|
||||
@@ -481,7 +486,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>43</td>
|
||||
<td>2013/02/01</td>
|
||||
<td>$75.650,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cara Stevens</td>
|
||||
@@ -489,7 +494,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>46</td>
|
||||
<td>2011/12/06</td>
|
||||
<td>$145.600,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hermione Butler</td>
|
||||
@@ -497,7 +502,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>47</td>
|
||||
<td>2011/03/21</td>
|
||||
<td>$356.250,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lael Greer</td>
|
||||
@@ -505,7 +510,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>21</td>
|
||||
<td>2009/02/27</td>
|
||||
<td>$103.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jonas Alexander</td>
|
||||
@@ -513,7 +518,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>30</td>
|
||||
<td>2010/07/14</td>
|
||||
<td>$86.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shad Decker</td>
|
||||
@@ -521,7 +526,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>51</td>
|
||||
<td>2008/11/13</td>
|
||||
<td>$183.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michael Bruce</td>
|
||||
@@ -529,7 +534,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>29</td>
|
||||
<td>2011/06/27</td>
|
||||
<td>$183.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Donna Snider</td>
|
||||
@@ -537,7 +542,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>27</td>
|
||||
<td>2011/01/25</td>
|
||||
<td>$112.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -553,15 +558,20 @@ $(document).ready(function() {
|
||||
<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 brush: js;">$.fn.dataTable.ext.type.order['numeric-comma-pre'] = function ( d ) {
|
||||
return parseFloat( d.replace(/,/g, '.') ) || 0;
|
||||
example:</p><code class="multiline brush: js;">$.fn.dataTable.ext.type.order['salary-grade-pre'] = function ( d ) {
|
||||
switch ( d ) {
|
||||
case 'Low': return 1;
|
||||
case 'Medium': return 2;
|
||||
case 'High': return 3;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"columnDefs": [ {
|
||||
"type": "numeric-comma",
|
||||
"targets": 3
|
||||
"type": "salary-grade",
|
||||
"targets": -1
|
||||
} ]
|
||||
} );
|
||||
} );</code>
|
||||
@@ -672,14 +682,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -697,8 +708,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -711,7 +722,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ body {
|
||||
|
||||
|
||||
div.container {
|
||||
width: 980px;
|
||||
max-width: 980px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@@ -30,10 +30,12 @@ h1 {
|
||||
font-weight: 100;
|
||||
letter-spacing: 1px;
|
||||
font-size: 3em;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
h1 span {
|
||||
font-size: 0.5em;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -126,7 +128,7 @@ div.footer {
|
||||
}
|
||||
|
||||
div.footer > div.liner {
|
||||
width: 960px;
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@@ -184,6 +186,13 @@ code {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
code > span {
|
||||
border-left: 1px solid rgba( 0, 0, 0, 0.2 );
|
||||
margin-left: 4px;
|
||||
padding-left: 4px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
code.option {
|
||||
color: #D14; /* red */
|
||||
background-color: #fcf6f8;
|
||||
@@ -196,7 +205,7 @@ code.path {
|
||||
}
|
||||
|
||||
code.tag {
|
||||
color: #cad119; /* yellow */
|
||||
color: #a1a713; /* yellow */
|
||||
background-color: #f7f8e6;
|
||||
border: 1px solid #D6E9C6;
|
||||
}
|
||||
@@ -225,6 +234,12 @@ code.string {
|
||||
border: 1px solid #f7e4c9;
|
||||
}
|
||||
|
||||
code.field {
|
||||
color: #ad1ee8; /* purple */
|
||||
background-color: #f9f1fc;
|
||||
border: 1px solid #ebc9f7;
|
||||
}
|
||||
|
||||
code.multiline {
|
||||
display: inline-block;
|
||||
width: 95%;
|
||||
@@ -232,6 +247,8 @@ code.multiline {
|
||||
|
||||
|
||||
ul.tabs {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
height: 40px;
|
||||
margin: 20px 20px 0 0;
|
||||
}
|
||||
@@ -240,7 +257,7 @@ ul.tabs {
|
||||
ul.tabs li {
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 0 20px;
|
||||
padding: 0 15px;
|
||||
height: 40px;
|
||||
font-size: 1.2em;
|
||||
margin: 0 5px;
|
||||
@@ -268,8 +285,12 @@ ul.tabs li.active:hover {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
div.tabs {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
div.tabs>div {
|
||||
padding: 0 20px;
|
||||
padding: 0 15px;
|
||||
border: 1px solid #ccc;
|
||||
margin-top: 1px;
|
||||
display: none;
|
||||
@@ -287,3 +308,36 @@ div.column_half {
|
||||
width: 49%;
|
||||
padding-right: 1%;
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (max-width : 979px) {
|
||||
div.container,
|
||||
div.footer {
|
||||
padding: 0 1em;
|
||||
}
|
||||
}
|
||||
|
||||
@media
|
||||
screen and (max-width : 767px),
|
||||
screen and (max-width : 768px) and (orientation: portrait) {
|
||||
div.info {
|
||||
-webkit-column-count: 1;
|
||||
-moz-column-count: 1;
|
||||
-ms-column-count: 1;
|
||||
-o-column-count: 1;
|
||||
column-count: 1;
|
||||
}
|
||||
|
||||
div.toc {
|
||||
-webkit-column-count: 1;
|
||||
-moz-column-count: 1;
|
||||
-ms-column-count: 1;
|
||||
-o-column-count: 1;
|
||||
column-count: 1;
|
||||
}
|
||||
|
||||
h1 span {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ $(document).ready( function () {
|
||||
var info = $('div.info');
|
||||
|
||||
if ( info.height() < 115 ) {
|
||||
info.css( 'height', '8em' );
|
||||
info.css( 'min-height', '8em' );
|
||||
}
|
||||
|
||||
var escapeHtml = function ( str ) {
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
right: 1px !important;
|
||||
top: 1px !important;
|
||||
font-size: 10px !important;
|
||||
z-index: 10 !important;
|
||||
z-index: 7 !important;
|
||||
}
|
||||
.syntaxhighlighter .toolbar span.title {
|
||||
display: inline !important;
|
||||
|
||||
76
examples/resources/syntax/shCore.js
vendored
76
examples/resources/syntax/shCore.js
vendored
@@ -768,6 +768,10 @@ function parseParams(str)
|
||||
if ( a ) {
|
||||
result['brush'] = a[1];
|
||||
}
|
||||
else if ( str && str.indexOf('multiline') !== -1 ) {
|
||||
// Markdown code block without a language identifier
|
||||
result['brush'] = 'text';
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
@@ -1985,4 +1989,76 @@ typeof(exports) != 'undefined' ? exports.SyntaxHighlighter = SyntaxHighlighter :
|
||||
})();
|
||||
|
||||
|
||||
;(function()
|
||||
{
|
||||
// CommonJS
|
||||
SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
|
||||
|
||||
function Brush()
|
||||
{
|
||||
var funcs = 'abs avg case cast coalesce convert count current_timestamp ' +
|
||||
'current_user day isnull left lower month nullif replace right ' +
|
||||
'session_user space substring sum system_user upper user year';
|
||||
|
||||
var keywords = 'absolute action add after alter as asc at authorization begin bigint ' +
|
||||
'binary bit by cascade char character check checkpoint close collate ' +
|
||||
'column commit committed connect connection constraint contains continue ' +
|
||||
'create cube current current_date current_time cursor database date ' +
|
||||
'deallocate dec decimal declare default delete desc distinct double drop ' +
|
||||
'dynamic else end end-exec escape except exec execute false fetch first ' +
|
||||
'float for force foreign forward free from full function global goto grant ' +
|
||||
'group grouping having hour ignore index inner insensitive insert instead ' +
|
||||
'int integer intersect into is isolation key last level load local max min ' +
|
||||
'minute modify move name national nchar next no numeric of off on only ' +
|
||||
'open option order out output partial password precision prepare primary ' +
|
||||
'prior privileges procedure public read real references relative repeatable ' +
|
||||
'restrict return returns revoke rollback rollup rows rule schema scroll ' +
|
||||
'second section select sequence serializable set size smallint static ' +
|
||||
'statistics table temp temporary then time timestamp to top transaction ' +
|
||||
'translation trigger true truncate uncommitted union unique update values ' +
|
||||
'varchar varying view when where with work';
|
||||
|
||||
var operators = 'all and any between cross in join like not null or outer some';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: /--(.*)$/gm, css: 'comments' }, // one line comments
|
||||
{ regex: /\/\*([^\*][\s\S]*?)?\*\//gm, css: 'comments' }, // multi line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'color2' }, // functions
|
||||
{ regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
|
||||
];
|
||||
};
|
||||
|
||||
Brush.prototype = new SyntaxHighlighter.Highlighter();
|
||||
Brush.aliases = ['sql'];
|
||||
|
||||
SyntaxHighlighter.brushes.Sql = Brush;
|
||||
|
||||
// CommonJS
|
||||
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
|
||||
})();
|
||||
|
||||
|
||||
|
||||
;(function()
|
||||
{
|
||||
// CommonJS
|
||||
SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
|
||||
|
||||
function Brush()
|
||||
{
|
||||
};
|
||||
|
||||
Brush.prototype = new SyntaxHighlighter.Highlighter();
|
||||
Brush.aliases = ['text', 'plain'];
|
||||
|
||||
SyntaxHighlighter.brushes.Plain = Brush;
|
||||
|
||||
// CommonJS
|
||||
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
|
||||
})();
|
||||
|
||||
|
||||
SyntaxHighlighter.all();
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Custom HTTP variables</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -38,16 +39,16 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Custom HTTP variables</span></h1>
|
||||
<h1>DataTables example <span>Custom HTTP variables</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>It can often be useful to send extra information to the server when utilising DataTables'
|
||||
server-side processing option. This is done by using the <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> option's <code>data</code> parameter which can be used in one
|
||||
of two different ways:</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> option's <code>data</code> parameter
|
||||
which can be used in one of two different ways:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li><code>object</code> - An object data to send to the server. This is useful for adding static
|
||||
data to the request.</li>
|
||||
<li><code>function</code> - A function which will manipulate the data object to send to the server,
|
||||
@@ -215,14 +216,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -240,8 +242,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -254,7 +256,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Deferred loading of data</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -32,7 +33,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Deferred loading of data</span></h1>
|
||||
<h1>DataTables example <span>Deferred loading of data</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>When using DataTables with server-side processing, the default behaviour is to have DataTables
|
||||
@@ -43,15 +44,16 @@ $(document).ready(function() {
|
||||
|
||||
<p>This automatic Ajax call to get the first page of data can be overridden by using the <a href=
|
||||
"//datatables.net/reference/option/deferLoading"><code class="option" title=
|
||||
"Initialisation option">deferLoading</code></a> initialisation property. It serves two purposes,
|
||||
firstly to indicate that deferred loading is required, but also to tell DataTables how many records
|
||||
there are in the full table, in this case 57 (this allows the information element and pagination to be
|
||||
displayed correctly).</p>
|
||||
"DataTables initialisation option">deferLoading<span>DT</span></code></a> initialisation property. It
|
||||
serves two purposes, firstly to indicate that deferred loading is required, but also to tell DataTables
|
||||
how many records there are in the full table, in this case 57 (this allows the information element and
|
||||
pagination to be displayed correctly).</p>
|
||||
|
||||
<p>In the example below, the HTML page already has the first 10 rows of data available it in, so we use
|
||||
<a href="//datatables.net/reference/option/deferLoading"><code class="option" title=
|
||||
"Initialisation option">deferLoading</code></a> to tell DataTables that this data is available and that
|
||||
it should wait for under interaction (ordering, paging etc) before making an Ajax call.</p>
|
||||
"DataTables initialisation option">deferLoading<span>DT</span></code></a> to tell DataTables that this
|
||||
data is available and that it should wait for under interaction (ordering, paging etc) before making an
|
||||
Ajax call.</p>
|
||||
</div>"
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -285,14 +287,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -310,8 +313,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -324,7 +327,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Automatic addition of row ID attributes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -39,7 +40,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Automatic addition of row ID attributes</span></h1>
|
||||
<h1>DataTables example <span>Automatic addition of row ID attributes</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Often when using server-side processing you will find that it can be useful to have a specific ID on
|
||||
@@ -50,7 +51,7 @@ $(document).ready(function() {
|
||||
<p>In addition to <code>DT_RowId</code> there are two other properties which perform similar actions:
|
||||
<code>DT_RowClass</code> and <code>DT_RowData</code>:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li>{string} <code>DT_RowId</code> - Add an ID to the <em>TR</em> element</li>
|
||||
<li>{string} <code>DT_RowClass</code> - Add a class name to the <em>TR</em> element</li>
|
||||
<li>{object} <code>DT_RowData</code> - Add HTML5 <em>data-</em> attributes to the <em>TR</em>
|
||||
@@ -219,14 +220,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -244,8 +246,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -258,7 +260,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
@@ -15,7 +16,7 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Server-side processing</span></h1>
|
||||
<h1>DataTables example <span>Server-side processing</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>There are many ways to get your data into DataTables, and if you are working with seriously large
|
||||
@@ -27,9 +28,9 @@
|
||||
|
||||
<p>Server-side processing is enabled by setting the <a href=
|
||||
"//datatables.net/reference/option/serverSide"><code class="option" title=
|
||||
"Initialisation option">serverSide</code></a> option to <code>true</code> and providing an Ajax data
|
||||
source through the <a href="//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> option.</p>
|
||||
"DataTables initialisation option">serverSide<span>DT</span></code></a> option to <code>true</code> and
|
||||
providing an Ajax data source through the <a href="//datatables.net/reference/option/ajax"><code class=
|
||||
"option" title="DataTables initialisation option">ajax<span>DT</span></code></a> option.</p>
|
||||
|
||||
<p>The examples in this section shows server-side processing in use and how it can be customised to
|
||||
suit your needs.</p>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - JSONP data source for remote domains</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -34,7 +35,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- JSONP data source for remote domains</span></h1>
|
||||
<h1>DataTables example <span>JSONP data source for remote domains</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p><a href="http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/">JSONP</a> is one of
|
||||
@@ -42,18 +43,19 @@ $(document).ready(function() {
|
||||
will block standard Ajax requests to remote source for security reasons). Using JSONP allows DataTables
|
||||
to load server-side sourced data from any domain and is quite simply done with the
|
||||
<code>dataType</code> option of the <a href="//datatables.net/reference/option/ajax"><code class=
|
||||
"option" title="Initialisation option">ajax</code></a> initialisation option.</p>
|
||||
"option" title="DataTables initialisation option">ajax<span>DT</span></code></a> initialisation
|
||||
option.</p>
|
||||
|
||||
<p>When given as an object, the <a href="//datatables.net/reference/option/ajax"><code class="option"
|
||||
title="Initialisation option">ajax</code></a> option maps directly onto the <a href=
|
||||
"http://api.jquery.com/jQuery.ajax/">jQuery ajax</a> options (i.e. any option that can be used in
|
||||
jQuery's Ajax function can also be used in DataTable's <a href=
|
||||
title="DataTables initialisation option">ajax<span>DT</span></code></a> option maps directly onto the
|
||||
<a href="http://api.jquery.com/jQuery.ajax/">jQuery ajax</a> options (i.e. any option that can be used
|
||||
in jQuery's Ajax function can also be used in DataTable's <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> option).</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> option).</p>
|
||||
|
||||
<p>The example below shows <a href="//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> being used with the <code>dataType</code> option set to
|
||||
retrieve JSONP data for server-side processing in DataTables.</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> being used with the
|
||||
<code>dataType</code> option set to retrieve JSONP data for server-side processing in DataTables.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -208,14 +210,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -233,8 +236,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -247,7 +250,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Object data source</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -39,7 +40,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Object data source</span></h1>
|
||||
<h1>DataTables example <span>Object data source</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>The default data format that DataTables expects for server-side processing is a 2D array of data
|
||||
@@ -51,7 +52,8 @@ $(document).ready(function() {
|
||||
<p>In this example the server responds with an array of objects, where DataTables will look up and use
|
||||
each property that is specified by the <a href=
|
||||
"//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> property given for each column.</p>
|
||||
"DataTables initialisation option">columns.data<span>DT</span></code></a> property given for each
|
||||
column.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -211,14 +213,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -236,8 +239,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -250,7 +253,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Pipelining data to reduce Ajax calls for paging</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -24,8 +25,11 @@
|
||||
$.fn.dataTable.pipeline = function ( opts ) {
|
||||
// Configuration options
|
||||
var conf = $.extend( {
|
||||
pages: 5, // number of pages to cache
|
||||
url: '' // script url
|
||||
pages: 5, // number of pages to cache
|
||||
url: '', // script url
|
||||
data: null, // function or object with parameters to send to the server
|
||||
// matching how `ajax.data` works in DataTables
|
||||
method: 'GET' // Ajax HTTP method
|
||||
}, opts );
|
||||
|
||||
// Private variables for storing the cache
|
||||
@@ -37,10 +41,16 @@ $.fn.dataTable.pipeline = function ( opts ) {
|
||||
return function ( request, drawCallback, settings ) {
|
||||
var ajax = false;
|
||||
var requestStart = request.start;
|
||||
var drawStart = request.start;
|
||||
var requestLength = request.length;
|
||||
var requestEnd = requestStart + requestLength;
|
||||
|
||||
if ( cacheLower < 0 || requestStart < cacheLower || requestEnd > cacheUpper ) {
|
||||
if ( settings.clearCache ) {
|
||||
// API requested that the cache be cleared
|
||||
ajax = true;
|
||||
settings.clearCache = false;
|
||||
}
|
||||
else if ( cacheLower < 0 || requestStart < cacheLower || requestEnd > cacheUpper ) {
|
||||
// outside cached data - need to make a request
|
||||
ajax = true;
|
||||
}
|
||||
@@ -71,7 +81,23 @@ $.fn.dataTable.pipeline = function ( opts ) {
|
||||
request.start = requestStart;
|
||||
request.length = requestLength*conf.pages;
|
||||
|
||||
// Provide the same `data` options as DataTables.
|
||||
if ( $.isFunction ( conf.data ) ) {
|
||||
// As a function it is executed with the data object as an arg
|
||||
// for manipulation. If an object is returned, it is used as the
|
||||
// data object to submit
|
||||
var d = conf.data( request );
|
||||
if ( d ) {
|
||||
$.extend( request, d );
|
||||
}
|
||||
}
|
||||
else if ( $.isPlainObject( conf.data ) ) {
|
||||
// As an object, the data given extends the default
|
||||
$.extend( request, conf.data );
|
||||
}
|
||||
|
||||
settings.jqXHR = $.ajax( {
|
||||
"type": conf.method,
|
||||
"url": conf.url,
|
||||
"data": request,
|
||||
"dataType": "json",
|
||||
@@ -79,8 +105,8 @@ $.fn.dataTable.pipeline = function ( opts ) {
|
||||
"success": function ( json ) {
|
||||
cacheLastJson = $.extend(true, {}, json);
|
||||
|
||||
if ( cacheLower != requestStart ) {
|
||||
json.data.splice( 0, requestStart-cacheLower );
|
||||
if ( cacheLower != drawStart ) {
|
||||
json.data.splice( 0, drawStart-cacheLower );
|
||||
}
|
||||
json.data.splice( requestLength, json.data.length );
|
||||
|
||||
@@ -99,6 +125,14 @@ $.fn.dataTable.pipeline = function ( opts ) {
|
||||
}
|
||||
};
|
||||
|
||||
// Register an API method that will empty the pipelined data, forcing an Ajax
|
||||
// fetch on the next draw (i.e. `table.clearPipeline().draw()`)
|
||||
$.fn.dataTable.Api.register( 'clearPipeline()', function () {
|
||||
return this.iterator( 'table', function ( settings ) {
|
||||
settings.clearCache = true;
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
//
|
||||
// DataTables initialisation
|
||||
@@ -121,7 +155,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Pipelining data to reduce Ajax calls for paging</span></h1>
|
||||
<h1>DataTables example <span>Pipelining data to reduce Ajax calls for paging</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Sever-side processing can be quite hard on your server, since it makes an Ajax call to the server
|
||||
@@ -133,8 +167,9 @@ $(document).ready(function() {
|
||||
it through a data cache control; using the data from the cache if available, and making the Ajax
|
||||
request if not. This intercept of the Ajax request is performed by giving the <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> option as a function. This function then performs the logic of
|
||||
deciding if another Ajax call is needed, or if data from the cache can be used.</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> option as a function. This function
|
||||
then performs the logic of deciding if another Ajax call is needed, or if data from the cache can be
|
||||
used.</p>
|
||||
|
||||
<p>Keep in mind that this caching is for paging only; the pipeline must be cleared for other
|
||||
interactions such as ordering and searching since the full data set, when using server-side processing,
|
||||
@@ -182,8 +217,11 @@ $(document).ready(function() {
|
||||
$.fn.dataTable.pipeline = function ( opts ) {
|
||||
// Configuration options
|
||||
var conf = $.extend( {
|
||||
pages: 5, // number of pages to cache
|
||||
url: '' // script url
|
||||
pages: 5, // number of pages to cache
|
||||
url: '', // script url
|
||||
data: null, // function or object with parameters to send to the server
|
||||
// matching how `ajax.data` works in DataTables
|
||||
method: 'GET' // Ajax HTTP method
|
||||
}, opts );
|
||||
|
||||
// Private variables for storing the cache
|
||||
@@ -195,10 +233,16 @@ $.fn.dataTable.pipeline = function ( opts ) {
|
||||
return function ( request, drawCallback, settings ) {
|
||||
var ajax = false;
|
||||
var requestStart = request.start;
|
||||
var drawStart = request.start;
|
||||
var requestLength = request.length;
|
||||
var requestEnd = requestStart + requestLength;
|
||||
|
||||
if ( cacheLower < 0 || requestStart < cacheLower || requestEnd > cacheUpper ) {
|
||||
if ( settings.clearCache ) {
|
||||
// API requested that the cache be cleared
|
||||
ajax = true;
|
||||
settings.clearCache = false;
|
||||
}
|
||||
else if ( cacheLower < 0 || requestStart < cacheLower || requestEnd > cacheUpper ) {
|
||||
// outside cached data - need to make a request
|
||||
ajax = true;
|
||||
}
|
||||
@@ -229,7 +273,23 @@ $.fn.dataTable.pipeline = function ( opts ) {
|
||||
request.start = requestStart;
|
||||
request.length = requestLength*conf.pages;
|
||||
|
||||
// Provide the same `data` options as DataTables.
|
||||
if ( $.isFunction ( conf.data ) ) {
|
||||
// As a function it is executed with the data object as an arg
|
||||
// for manipulation. If an object is returned, it is used as the
|
||||
// data object to submit
|
||||
var d = conf.data( request );
|
||||
if ( d ) {
|
||||
$.extend( request, d );
|
||||
}
|
||||
}
|
||||
else if ( $.isPlainObject( conf.data ) ) {
|
||||
// As an object, the data given extends the default
|
||||
$.extend( request, conf.data );
|
||||
}
|
||||
|
||||
settings.jqXHR = $.ajax( {
|
||||
"type": conf.method,
|
||||
"url": conf.url,
|
||||
"data": request,
|
||||
"dataType": "json",
|
||||
@@ -237,8 +297,8 @@ $.fn.dataTable.pipeline = function ( opts ) {
|
||||
"success": function ( json ) {
|
||||
cacheLastJson = $.extend(true, {}, json);
|
||||
|
||||
if ( cacheLower != requestStart ) {
|
||||
json.data.splice( 0, requestStart-cacheLower );
|
||||
if ( cacheLower != drawStart ) {
|
||||
json.data.splice( 0, drawStart-cacheLower );
|
||||
}
|
||||
json.data.splice( requestLength, json.data.length );
|
||||
|
||||
@@ -257,6 +317,14 @@ $.fn.dataTable.pipeline = function ( opts ) {
|
||||
}
|
||||
};
|
||||
|
||||
// Register an API method that will empty the pipelined data, forcing an Ajax
|
||||
// fetch on the next draw (i.e. `table.clearPipeline().draw()`)
|
||||
$.fn.dataTable.Api.register( 'clearPipeline()', function () {
|
||||
return this.iterator( 'table', function ( settings ) {
|
||||
settings.clearCache = true;
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
//
|
||||
// DataTables initialisation
|
||||
@@ -378,14 +446,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -403,8 +472,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -417,7 +486,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - POST data</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -43,24 +44,25 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- POST data</span></h1>
|
||||
<h1>DataTables example <span>POST data</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>By default, the Ajax request that DataTables makes to obtain server-side processing data is an HTTP
|
||||
GET request. However, there are times when you might wish to use POST. This is very easily done by
|
||||
using the <code>type</code> option of the <a href="//datatables.net/reference/option/ajax"><code class=
|
||||
"option" title="Initialisation option">ajax</code></a> initialisation option.</p>
|
||||
"option" title="DataTables initialisation option">ajax<span>DT</span></code></a> initialisation
|
||||
option.</p>
|
||||
|
||||
<p>When given as an object, the <a href="//datatables.net/reference/option/ajax"><code class="option"
|
||||
title="Initialisation option">ajax</code></a> option maps directly onto the <a href=
|
||||
"http://api.jquery.com/jQuery.ajax/">jQuery ajax</a> options (i.e. any option that can be used in
|
||||
jQuery's Ajax function can also be used in DataTable's <a href=
|
||||
title="DataTables initialisation option">ajax<span>DT</span></code></a> option maps directly onto the
|
||||
<a href="http://api.jquery.com/jQuery.ajax/">jQuery ajax</a> options (i.e. any option that can be used
|
||||
in jQuery's Ajax function can also be used in DataTable's <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> option).</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> option).</p>
|
||||
|
||||
<p>The example below shows <a href="//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"Initialisation option">ajax</code></a> being used with the <code>type</code> option set to
|
||||
<code class="string" title="String">POST</code> to make a POST request.</p>
|
||||
"DataTables initialisation option">ajax<span>DT</span></code></a> being used with the <code>type</code>
|
||||
option set to <code class="string" title="String">POST</code> to make a POST request.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -223,14 +225,15 @@ $(document).ready(function() {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -248,8 +251,8 @@ $(document).ready(function() {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -262,7 +265,7 @@ $(document).ready(function() {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>DataTables example - Row details</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -56,7 +57,7 @@ $(document).ready(function() {
|
||||
var detailRows = [];
|
||||
|
||||
$('#example tbody').on( 'click', 'tr td:first-child', function () {
|
||||
var tr = $(this).parents('tr');
|
||||
var tr = $(this).closest('tr');
|
||||
var row = dt.row( tr );
|
||||
var idx = $.inArray( tr.attr('id'), detailRows );
|
||||
|
||||
@@ -92,7 +93,7 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Row details</span></h1>
|
||||
<h1>DataTables example <span>Row details</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>This example shows the use of DataTables' ability to show and hide child rows which are attached to
|
||||
@@ -103,19 +104,19 @@ $(document).ready(function() {
|
||||
<p>The example below shows server-side processing being used with the first column having an event
|
||||
listener attached to it which will toggle the child row's display. This is set up using <a href=
|
||||
"//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"Initialisation option">columns.data</code></a> and <a href=
|
||||
"DataTables initialisation option">columns.data<span>DT</span></code></a> and <a href=
|
||||
"//datatables.net/reference/option/columns.defaultContent"><code class="option" title=
|
||||
"Initialisation option">columns.defaultContent</code></a>, in combination with CSS to show an empty
|
||||
cell with a background image which can be clicked upon.</p>
|
||||
"DataTables initialisation option">columns.defaultContent<span>DT</span></code></a>, in combination
|
||||
with CSS to show an empty cell with a background image which can be clicked upon.</p>
|
||||
|
||||
<p>The event handler makes use of the <a href="//datatables.net/reference/api/row().child"><code class=
|
||||
"api" title="API method">row().child</code></a> methods to firstly check if a row is already displayed,
|
||||
and if so hide it, if not show it. The content of the child row is, in this example, defined by the
|
||||
<code>formatDetails()</code> function, but you would replace that with whatever you wanted to show the
|
||||
content required, possibly including, for example, an Ajax call to the server to obtain the extra
|
||||
information to show. Note that the format details function has access to the full data source object
|
||||
for the row, including information that is not actually shown in the table (the salary parameter for
|
||||
example).</p>
|
||||
"api" title="DataTables API method">row().child<span>DT</span></code></a> methods to firstly check if a
|
||||
row is already displayed, and if so hide it, if not show it. The content of the child row is, in this
|
||||
example, defined by the <code>formatDetails()</code> function, but you would replace that with whatever
|
||||
you wanted to show the content required, possibly including, for example, an Ajax call to the server to
|
||||
obtain the extra information to show. Note that the format details function has access to the full data
|
||||
source object for the row, including information that is not actually shown in the table (the salary
|
||||
parameter for example).</p>
|
||||
|
||||
<p>Furthermore, this example shows a small difference from the <a href=
|
||||
"../api/row_details.html">client-side row details example</a> in that to have rows automatically reopen
|
||||
@@ -187,7 +188,7 @@ $(document).ready(function() {
|
||||
var detailRows = [];
|
||||
|
||||
$('#example tbody').on( 'click', 'tr td:first-child', function () {
|
||||
var tr = $(this).parents('tr');
|
||||
var tr = $(this).closest('tr');
|
||||
var row = dt.row( tr );
|
||||
var idx = $.inArray( tr.attr('id'), detailRows );
|
||||
|
||||
@@ -329,14 +330,15 @@ tr.details td.details-control {
|
||||
<ul class="toc">
|
||||
<li><a href="../styling/display.html">Base style</a></li>
|
||||
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
|
||||
<li><a href="../styling/compact.html">Base style - compact</a></li>
|
||||
<li><a href="../styling/hover.html">Base style - hover</a></li>
|
||||
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
|
||||
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
|
||||
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
|
||||
<li><a href="../styling/foundation.html">Foundation</a></li>
|
||||
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -354,8 +356,8 @@ tr.details td.details-control {
|
||||
<h3><a href="../api/index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="../api/add_row.html">Add rows</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column searching (select
|
||||
inputs)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Child rows (show extra / detailed
|
||||
@@ -368,7 +370,7 @@ tr.details td.details-control {
|
||||
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="../api/regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
// DB table to use
|
||||
$table = 'datatables-demo';
|
||||
$table = 'datatables_demo';
|
||||
|
||||
// Table's primary key
|
||||
$primaryKey = 'id';
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
// DB table to use
|
||||
$table = 'datatables-demo';
|
||||
$table = 'datatables_demo';
|
||||
|
||||
// Table's primary key
|
||||
$primaryKey = 'id';
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
// DB table to use
|
||||
$table = 'datatables-demo';
|
||||
$table = 'datatables_demo';
|
||||
|
||||
// Table's primary key
|
||||
$primaryKey = 'id';
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
# DataTables server-side processing example database structure and dataTables
|
||||
--
|
||||
-- DataTables Ajax and server-side processing database (MySQL)
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `datatables-demo`;
|
||||
DROP TABLE IF EXISTS `datatables_demo`;
|
||||
|
||||
CREATE TABLE `datatables-demo` (
|
||||
`id` int(10) NOT NULL auto_increment,
|
||||
`first_name` varchar(250) NOT NULL default '',
|
||||
`last_name` varchar(250) NOT NULL default '',
|
||||
`position` varchar(250) NOT NULL default '',
|
||||
`email` varchar(250) NOT NULL default '',
|
||||
`office` varchar(250) NOT NULL default '',
|
||||
`start_date` timestamp DEFAULT CURRENT_TIMESTAMP,
|
||||
`age` int(8),
|
||||
`salary` int(8),
|
||||
`extn` int(8),
|
||||
PRIMARY KEY (`id`)
|
||||
CREATE TABLE `datatables_demo` (
|
||||
`id` int(10) NOT NULL auto_increment,
|
||||
`first_name` varchar(250) NOT NULL default '',
|
||||
`last_name` varchar(250) NOT NULL default '',
|
||||
`position` varchar(250) NOT NULL default '',
|
||||
`email` varchar(250) NOT NULL default '',
|
||||
`office` varchar(250) NOT NULL default '',
|
||||
`start_date` timestamp DEFAULT CURRENT_TIMESTAMP,
|
||||
`age` int(8),
|
||||
`salary` int(8),
|
||||
`extn` int(8),
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
INSERT
|
||||
INTO `datatables-demo`
|
||||
INSERT INTO `datatables_demo`
|
||||
( id, first_name, last_name, age, position, salary, start_date, extn, email, office )
|
||||
VALUES
|
||||
( 1, 'Tiger', 'Nixon', 61, 'System Architect', 320800, '2011/04/25', 5421, 't.nixon@datatables.net', 'Edinburgh' ),
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
// DB table to use
|
||||
$table = 'datatables-demo';
|
||||
$table = 'datatables_demo';
|
||||
|
||||
// Table's primary key
|
||||
$primaryKey = 'id';
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
// DB table to use
|
||||
$table = 'datatables-demo';
|
||||
$table = 'datatables_demo';
|
||||
|
||||
// Table's primary key
|
||||
$primaryKey = 'id';
|
||||
|
||||
79
examples/server_side/scripts/postgres.sql
Normal file
79
examples/server_side/scripts/postgres.sql
Normal file
@@ -0,0 +1,79 @@
|
||||
--
|
||||
-- DataTables Ajax and server-side processing database (Postgres)
|
||||
--
|
||||
DROP TABLE IF EXISTS datatables_demo;
|
||||
|
||||
CREATE TABLE datatables_demo (
|
||||
id serial,
|
||||
first_name text NOT NULL default '',
|
||||
last_name text NOT NULL default '',
|
||||
position text NOT NULL default '',
|
||||
email text NOT NULL default '',
|
||||
office text NOT NULL default '',
|
||||
start_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
|
||||
age integer,
|
||||
salary integer,
|
||||
extn integer,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
INSERT INTO datatables_demo
|
||||
( id, first_name, last_name, age, position, salary, start_date, extn, email, office )
|
||||
VALUES
|
||||
( 1, 'Tiger', 'Nixon', 61, 'System Architect', 320800, '2011/04/25', 5421, 't.nixon@datatables.net', 'Edinburgh' ),
|
||||
( 2, 'Garrett', 'Winters', 63, 'Accountant', 170750, '2011/07/25', 8422, 'g.winters@datatables.net', 'Tokyo' ),
|
||||
( 3, 'Ashton', 'Cox', 66, 'Junior Technical Author', 86000, '2009/01/12', 1562, 'a.cox@datatables.net', 'San Francisco' ),
|
||||
( 4, 'Cedric', 'Kelly', 22, 'Senior Javascript Developer', 433060, '2012/03/29', 6224, 'c.kelly@datatables.net', 'Edinburgh' ),
|
||||
( 5, 'Airi', 'Satou', 33, 'Accountant', 162700, '2008/11/28', 5407, 'a.satou@datatables.net', 'Tokyo' ),
|
||||
( 6, 'Brielle', 'Williamson', 61, 'Integration Specialist', 372000, '2012/12/02', 4804, 'b.williamson@datatables.net', 'New York' ),
|
||||
( 7, 'Herrod', 'Chandler', 59, 'Sales Assistant', 137500, '2012/08/06', 9608, 'h.chandler@datatables.net', 'San Francisco' ),
|
||||
( 8, 'Rhona', 'Davidson', 55, 'Integration Specialist', 327900, '2010/10/14', 6200, 'r.davidson@datatables.net', 'Tokyo' ),
|
||||
( 9, 'Colleen', 'Hurst', 39, 'Javascript Developer', 205500, '2009/09/15', 2360, 'c.hurst@datatables.net', 'San Francisco' ),
|
||||
( 10, 'Sonya', 'Frost', 23, 'Software Engineer', 103600, '2008/12/13', 1667, 's.frost@datatables.net', 'Edinburgh' ),
|
||||
( 11, 'Jena', 'Gaines', 30, 'Office Manager', 90560, '2008/12/19', 3814, 'j.gaines@datatables.net', 'London' ),
|
||||
( 12, 'Quinn', 'Flynn', 22, 'Support Lead', 342000, '2013/03/03', 9497, 'q.flynn@datatables.net', 'Edinburgh' ),
|
||||
( 13, 'Charde', 'Marshall', 36, 'Regional Director', 470600, '2008/10/16', 6741, 'c.marshall@datatables.net', 'San Francisco' ),
|
||||
( 14, 'Haley', 'Kennedy', 43, 'Senior Marketing Designer', 313500, '2012/12/18', 3597, 'h.kennedy@datatables.net', 'London' ),
|
||||
( 15, 'Tatyana', 'Fitzpatrick', 19, 'Regional Director', 385750, '2010/03/17', 1965, 't.fitzpatrick@datatables.net', 'London' ),
|
||||
( 16, 'Michael', 'Silva', 66, 'Marketing Designer', 198500, '2012/11/27', 1581, 'm.silva@datatables.net', 'London' ),
|
||||
( 17, 'Paul', 'Byrd', 64, 'Chief Financial Officer (CFO)', 725000, '2010/06/09', 3059, 'p.byrd@datatables.net', 'New York' ),
|
||||
( 18, 'Gloria', 'Little', 59, 'Systems Administrator', 237500, '2009/04/10', 1721, 'g.little@datatables.net', 'New York' ),
|
||||
( 19, 'Bradley', 'Greer', 41, 'Software Engineer', 132000, '2012/10/13', 2558, 'b.greer@datatables.net', 'London' ),
|
||||
( 20, 'Dai', 'Rios', 35, 'Personnel Lead', 217500, '2012/09/26', 2290, 'd.rios@datatables.net', 'Edinburgh' ),
|
||||
( 21, 'Jenette', 'Caldwell', 30, 'Development Lead', 345000, '2011/09/03', 1937, 'j.caldwell@datatables.net', 'New York' ),
|
||||
( 22, 'Yuri', 'Berry', 40, 'Chief Marketing Officer (CMO)', 675000, '2009/06/25', 6154, 'y.berry@datatables.net', 'New York' ),
|
||||
( 23, 'Caesar', 'Vance', 21, 'Pre-Sales Support', 106450, '2011/12/12', 8330, 'c.vance@datatables.net', 'New York' ),
|
||||
( 24, 'Doris', 'Wilder', 23, 'Sales Assistant', 85600, '2010/09/20', 3023, 'd.wilder@datatables.net', 'Sidney' ),
|
||||
( 25, 'Angelica', 'Ramos', 47, 'Chief Executive Officer (CEO)', 1200000, '2009/10/09', 5797, 'a.ramos@datatables.net', 'London' ),
|
||||
( 26, 'Gavin', 'Joyce', 42, 'Developer', 92575, '2010/12/22', 8822, 'g.joyce@datatables.net', 'Edinburgh' ),
|
||||
( 27, 'Jennifer', 'Chang', 28, 'Regional Director', 357650, '2010/11/14', 9239, 'j.chang@datatables.net', 'Singapore' ),
|
||||
( 28, 'Brenden', 'Wagner', 28, 'Software Engineer', 206850, '2011/06/07', 1314, 'b.wagner@datatables.net', 'San Francisco' ),
|
||||
( 29, 'Fiona', 'Green', 48, 'Chief Operating Officer (COO)', 850000, '2010/03/11', 2947, 'f.green@datatables.net', 'San Francisco' ),
|
||||
( 30, 'Shou', 'Itou', 20, 'Regional Marketing', 163000, '2011/08/14', 8899, 's.itou@datatables.net', 'Tokyo' ),
|
||||
( 31, 'Michelle', 'House', 37, 'Integration Specialist', 95400, '2011/06/02', 2769, 'm.house@datatables.net', 'Sidney' ),
|
||||
( 32, 'Suki', 'Burks', 53, 'Developer', 114500, '2009/10/22', 6832, 's.burks@datatables.net', 'London' ),
|
||||
( 33, 'Prescott', 'Bartlett', 27, 'Technical Author', 145000, '2011/05/07', 3606, 'p.bartlett@datatables.net', 'London' ),
|
||||
( 34, 'Gavin', 'Cortez', 22, 'Team Leader', 235500, '2008/10/26', 2860, 'g.cortez@datatables.net', 'San Francisco' ),
|
||||
( 35, 'Martena', 'Mccray', 46, 'Post-Sales support', 324050, '2011/03/09', 8240, 'm.mccray@datatables.net', 'Edinburgh' ),
|
||||
( 36, 'Unity', 'Butler', 47, 'Marketing Designer', 85675, '2009/12/09', 5384, 'u.butler@datatables.net', 'San Francisco' ),
|
||||
( 37, 'Howard', 'Hatfield', 51, 'Office Manager', 164500, '2008/12/16', 7031, 'h.hatfield@datatables.net', 'San Francisco' ),
|
||||
( 38, 'Hope', 'Fuentes', 41, 'Secretary', 109850, '2010/02/12', 6318, 'h.fuentes@datatables.net', 'San Francisco' ),
|
||||
( 39, 'Vivian', 'Harrell', 62, 'Financial Controller', 452500, '2009/02/14', 9422, 'v.harrell@datatables.net', 'San Francisco' ),
|
||||
( 40, 'Timothy', 'Mooney', 37, 'Office Manager', 136200, '2008/12/11', 7580, 't.mooney@datatables.net', 'London' ),
|
||||
( 41, 'Jackson', 'Bradshaw', 65, 'Director', 645750, '2008/09/26', 1042, 'j.bradshaw@datatables.net', 'New York' ),
|
||||
( 42, 'Olivia', 'Liang', 64, 'Support Engineer', 234500, '2011/02/03', 2120, 'o.liang@datatables.net', 'Singapore' ),
|
||||
( 43, 'Bruno', 'Nash', 38, 'Software Engineer', 163500, '2011/05/03', 6222, 'b.nash@datatables.net', 'London' ),
|
||||
( 44, 'Sakura', 'Yamamoto', 37, 'Support Engineer', 139575, '2009/08/19', 9383, 's.yamamoto@datatables.net', 'Tokyo' ),
|
||||
( 45, 'Thor', 'Walton', 61, 'Developer', 98540, '2013/08/11', 8327, 't.walton@datatables.net', 'New York' ),
|
||||
( 46, 'Finn', 'Camacho', 47, 'Support Engineer', 87500, '2009/07/07', 2927, 'f.camacho@datatables.net', 'San Francisco' ),
|
||||
( 47, 'Serge', 'Baldwin', 64, 'Data Coordinator', 138575, '2012/04/09', 8352, 's.baldwin@datatables.net', 'Singapore' ),
|
||||
( 48, 'Zenaida', 'Frank', 63, 'Software Engineer', 125250, '2010/01/04', 7439, 'z.frank@datatables.net', 'New York' ),
|
||||
( 49, 'Zorita', 'Serrano', 56, 'Software Engineer', 115000, '2012/06/01', 4389, 'z.serrano@datatables.net', 'San Francisco' ),
|
||||
( 50, 'Jennifer', 'Acosta', 43, 'Junior Javascript Developer', 75650, '2013/02/01', 3431, 'j.acosta@datatables.net', 'Edinburgh' ),
|
||||
( 51, 'Cara', 'Stevens', 46, 'Sales Assistant', 145600, '2011/12/06', 3990, 'c.stevens@datatables.net', 'New York' ),
|
||||
( 52, 'Hermione', 'Butler', 47, 'Regional Director', 356250, '2011/03/21', 1016, 'h.butler@datatables.net', 'London' ),
|
||||
( 53, 'Lael', 'Greer', 21, 'Systems Administrator', 103500, '2009/02/27', 6733, 'l.greer@datatables.net', 'London' ),
|
||||
( 54, 'Jonas', 'Alexander', 30, 'Developer', 86500, '2010/07/14', 8196, 'j.alexander@datatables.net', 'San Francisco' ),
|
||||
( 55, 'Shad', 'Decker', 51, 'Regional Director', 183000, '2008/11/13', 6373, 's.decker@datatables.net', 'Edinburgh' ),
|
||||
( 56, 'Michael', 'Bruce', 29, 'Javascript Developer', 183000, '2011/06/27', 5384, 'm.bruce@datatables.net', 'Singapore' ),
|
||||
( 57, 'Donna', 'Snider', 27, 'Customer Support', 112000, '2011/01/25', 4226, 'd.snider@datatables.net', 'New York' );
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
// DB table to use
|
||||
$table = 'datatables-demo';
|
||||
$table = 'datatables_demo';
|
||||
|
||||
// Table's primary key
|
||||
$primaryKey = 'id';
|
||||
|
||||
78
examples/server_side/scripts/sqlite.sql
Normal file
78
examples/server_side/scripts/sqlite.sql
Normal file
@@ -0,0 +1,78 @@
|
||||
--
|
||||
-- DataTables Ajax and server-side processing database (SQLite)
|
||||
--
|
||||
DROP TABLE IF EXISTS datatables_demo;
|
||||
|
||||
CREATE TABLE datatables_demo (
|
||||
id integer primary key,
|
||||
first_name text NOT NULL default '',
|
||||
last_name text NOT NULL default '',
|
||||
position text NOT NULL default '',
|
||||
email text NOT NULL default '',
|
||||
office text NOT NULL default '',
|
||||
start_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
|
||||
age integer,
|
||||
salary integer,
|
||||
extn integer
|
||||
);
|
||||
|
||||
INSERT INTO datatables_demo
|
||||
( id, first_name, last_name, age, position, salary, start_date, extn, email, office )
|
||||
VALUES
|
||||
( 1, 'Tiger', 'Nixon', 61, 'System Architect', 320800, '2011/04/25', 5421, 't.nixon@datatables.net', 'Edinburgh' ),
|
||||
( 2, 'Garrett', 'Winters', 63, 'Accountant', 170750, '2011/07/25', 8422, 'g.winters@datatables.net', 'Tokyo' ),
|
||||
( 3, 'Ashton', 'Cox', 66, 'Junior Technical Author', 86000, '2009/01/12', 1562, 'a.cox@datatables.net', 'San Francisco' ),
|
||||
( 4, 'Cedric', 'Kelly', 22, 'Senior Javascript Developer', 433060, '2012/03/29', 6224, 'c.kelly@datatables.net', 'Edinburgh' ),
|
||||
( 5, 'Airi', 'Satou', 33, 'Accountant', 162700, '2008/11/28', 5407, 'a.satou@datatables.net', 'Tokyo' ),
|
||||
( 6, 'Brielle', 'Williamson', 61, 'Integration Specialist', 372000, '2012/12/02', 4804, 'b.williamson@datatables.net', 'New York' ),
|
||||
( 7, 'Herrod', 'Chandler', 59, 'Sales Assistant', 137500, '2012/08/06', 9608, 'h.chandler@datatables.net', 'San Francisco' ),
|
||||
( 8, 'Rhona', 'Davidson', 55, 'Integration Specialist', 327900, '2010/10/14', 6200, 'r.davidson@datatables.net', 'Tokyo' ),
|
||||
( 9, 'Colleen', 'Hurst', 39, 'Javascript Developer', 205500, '2009/09/15', 2360, 'c.hurst@datatables.net', 'San Francisco' ),
|
||||
( 10, 'Sonya', 'Frost', 23, 'Software Engineer', 103600, '2008/12/13', 1667, 's.frost@datatables.net', 'Edinburgh' ),
|
||||
( 11, 'Jena', 'Gaines', 30, 'Office Manager', 90560, '2008/12/19', 3814, 'j.gaines@datatables.net', 'London' ),
|
||||
( 12, 'Quinn', 'Flynn', 22, 'Support Lead', 342000, '2013/03/03', 9497, 'q.flynn@datatables.net', 'Edinburgh' ),
|
||||
( 13, 'Charde', 'Marshall', 36, 'Regional Director', 470600, '2008/10/16', 6741, 'c.marshall@datatables.net', 'San Francisco' ),
|
||||
( 14, 'Haley', 'Kennedy', 43, 'Senior Marketing Designer', 313500, '2012/12/18', 3597, 'h.kennedy@datatables.net', 'London' ),
|
||||
( 15, 'Tatyana', 'Fitzpatrick', 19, 'Regional Director', 385750, '2010/03/17', 1965, 't.fitzpatrick@datatables.net', 'London' ),
|
||||
( 16, 'Michael', 'Silva', 66, 'Marketing Designer', 198500, '2012/11/27', 1581, 'm.silva@datatables.net', 'London' ),
|
||||
( 17, 'Paul', 'Byrd', 64, 'Chief Financial Officer (CFO)', 725000, '2010/06/09', 3059, 'p.byrd@datatables.net', 'New York' ),
|
||||
( 18, 'Gloria', 'Little', 59, 'Systems Administrator', 237500, '2009/04/10', 1721, 'g.little@datatables.net', 'New York' ),
|
||||
( 19, 'Bradley', 'Greer', 41, 'Software Engineer', 132000, '2012/10/13', 2558, 'b.greer@datatables.net', 'London' ),
|
||||
( 20, 'Dai', 'Rios', 35, 'Personnel Lead', 217500, '2012/09/26', 2290, 'd.rios@datatables.net', 'Edinburgh' ),
|
||||
( 21, 'Jenette', 'Caldwell', 30, 'Development Lead', 345000, '2011/09/03', 1937, 'j.caldwell@datatables.net', 'New York' ),
|
||||
( 22, 'Yuri', 'Berry', 40, 'Chief Marketing Officer (CMO)', 675000, '2009/06/25', 6154, 'y.berry@datatables.net', 'New York' ),
|
||||
( 23, 'Caesar', 'Vance', 21, 'Pre-Sales Support', 106450, '2011/12/12', 8330, 'c.vance@datatables.net', 'New York' ),
|
||||
( 24, 'Doris', 'Wilder', 23, 'Sales Assistant', 85600, '2010/09/20', 3023, 'd.wilder@datatables.net', 'Sidney' ),
|
||||
( 25, 'Angelica', 'Ramos', 47, 'Chief Executive Officer (CEO)', 1200000, '2009/10/09', 5797, 'a.ramos@datatables.net', 'London' ),
|
||||
( 26, 'Gavin', 'Joyce', 42, 'Developer', 92575, '2010/12/22', 8822, 'g.joyce@datatables.net', 'Edinburgh' ),
|
||||
( 27, 'Jennifer', 'Chang', 28, 'Regional Director', 357650, '2010/11/14', 9239, 'j.chang@datatables.net', 'Singapore' ),
|
||||
( 28, 'Brenden', 'Wagner', 28, 'Software Engineer', 206850, '2011/06/07', 1314, 'b.wagner@datatables.net', 'San Francisco' ),
|
||||
( 29, 'Fiona', 'Green', 48, 'Chief Operating Officer (COO)', 850000, '2010/03/11', 2947, 'f.green@datatables.net', 'San Francisco' ),
|
||||
( 30, 'Shou', 'Itou', 20, 'Regional Marketing', 163000, '2011/08/14', 8899, 's.itou@datatables.net', 'Tokyo' ),
|
||||
( 31, 'Michelle', 'House', 37, 'Integration Specialist', 95400, '2011/06/02', 2769, 'm.house@datatables.net', 'Sidney' ),
|
||||
( 32, 'Suki', 'Burks', 53, 'Developer', 114500, '2009/10/22', 6832, 's.burks@datatables.net', 'London' ),
|
||||
( 33, 'Prescott', 'Bartlett', 27, 'Technical Author', 145000, '2011/05/07', 3606, 'p.bartlett@datatables.net', 'London' ),
|
||||
( 34, 'Gavin', 'Cortez', 22, 'Team Leader', 235500, '2008/10/26', 2860, 'g.cortez@datatables.net', 'San Francisco' ),
|
||||
( 35, 'Martena', 'Mccray', 46, 'Post-Sales support', 324050, '2011/03/09', 8240, 'm.mccray@datatables.net', 'Edinburgh' ),
|
||||
( 36, 'Unity', 'Butler', 47, 'Marketing Designer', 85675, '2009/12/09', 5384, 'u.butler@datatables.net', 'San Francisco' ),
|
||||
( 37, 'Howard', 'Hatfield', 51, 'Office Manager', 164500, '2008/12/16', 7031, 'h.hatfield@datatables.net', 'San Francisco' ),
|
||||
( 38, 'Hope', 'Fuentes', 41, 'Secretary', 109850, '2010/02/12', 6318, 'h.fuentes@datatables.net', 'San Francisco' ),
|
||||
( 39, 'Vivian', 'Harrell', 62, 'Financial Controller', 452500, '2009/02/14', 9422, 'v.harrell@datatables.net', 'San Francisco' ),
|
||||
( 40, 'Timothy', 'Mooney', 37, 'Office Manager', 136200, '2008/12/11', 7580, 't.mooney@datatables.net', 'London' ),
|
||||
( 41, 'Jackson', 'Bradshaw', 65, 'Director', 645750, '2008/09/26', 1042, 'j.bradshaw@datatables.net', 'New York' ),
|
||||
( 42, 'Olivia', 'Liang', 64, 'Support Engineer', 234500, '2011/02/03', 2120, 'o.liang@datatables.net', 'Singapore' ),
|
||||
( 43, 'Bruno', 'Nash', 38, 'Software Engineer', 163500, '2011/05/03', 6222, 'b.nash@datatables.net', 'London' ),
|
||||
( 44, 'Sakura', 'Yamamoto', 37, 'Support Engineer', 139575, '2009/08/19', 9383, 's.yamamoto@datatables.net', 'Tokyo' ),
|
||||
( 45, 'Thor', 'Walton', 61, 'Developer', 98540, '2013/08/11', 8327, 't.walton@datatables.net', 'New York' ),
|
||||
( 46, 'Finn', 'Camacho', 47, 'Support Engineer', 87500, '2009/07/07', 2927, 'f.camacho@datatables.net', 'San Francisco' ),
|
||||
( 47, 'Serge', 'Baldwin', 64, 'Data Coordinator', 138575, '2012/04/09', 8352, 's.baldwin@datatables.net', 'Singapore' ),
|
||||
( 48, 'Zenaida', 'Frank', 63, 'Software Engineer', 125250, '2010/01/04', 7439, 'z.frank@datatables.net', 'New York' ),
|
||||
( 49, 'Zorita', 'Serrano', 56, 'Software Engineer', 115000, '2012/06/01', 4389, 'z.serrano@datatables.net', 'San Francisco' ),
|
||||
( 50, 'Jennifer', 'Acosta', 43, 'Junior Javascript Developer', 75650, '2013/02/01', 3431, 'j.acosta@datatables.net', 'Edinburgh' ),
|
||||
( 51, 'Cara', 'Stevens', 46, 'Sales Assistant', 145600, '2011/12/06', 3990, 'c.stevens@datatables.net', 'New York' ),
|
||||
( 52, 'Hermione', 'Butler', 47, 'Regional Director', 356250, '2011/03/21', 1016, 'h.butler@datatables.net', 'London' ),
|
||||
( 53, 'Lael', 'Greer', 21, 'Systems Administrator', 103500, '2009/02/27', 6733, 'l.greer@datatables.net', 'London' ),
|
||||
( 54, 'Jonas', 'Alexander', 30, 'Developer', 86500, '2010/07/14', 8196, 'j.alexander@datatables.net', 'San Francisco' ),
|
||||
( 55, 'Shad', 'Decker', 51, 'Regional Director', 183000, '2008/11/13', 6373, 's.decker@datatables.net', 'Edinburgh' ),
|
||||
( 56, 'Michael', 'Bruce', 29, 'Javascript Developer', 183000, '2011/06/27', 5384, 'm.bruce@datatables.net', 'Singapore' ),
|
||||
( 57, 'Donna', 'Snider', 27, 'Customer Support', 112000, '2011/01/25', 4226, 'd.snider@datatables.net', 'New York' );
|
||||
80
examples/server_side/scripts/sqlserver.sql
Normal file
80
examples/server_side/scripts/sqlserver.sql
Normal file
@@ -0,0 +1,80 @@
|
||||
--
|
||||
-- DataTables Ajax and server-side processing database (SQL Server)
|
||||
--
|
||||
IF OBJECT_ID('dbo.datatables_demo', 'U') IS NOT NULL
|
||||
DROP TABLE dbo.datatables_demo;
|
||||
|
||||
CREATE TABLE datatables_demo (
|
||||
id int NOT NULL identity,
|
||||
first_name varchar(250) NOT NULL default '',
|
||||
last_name varchar(250) NOT NULL default '',
|
||||
position varchar(250) NOT NULL default '',
|
||||
email varchar(250) NOT NULL default '',
|
||||
office varchar(250) NOT NULL default '',
|
||||
start_date datetime DEFAULT GETDATE(),
|
||||
age int,
|
||||
salary int,
|
||||
extn int,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
INSERT INTO datatables_demo
|
||||
( id, first_name, last_name, age, position, salary, start_date, extn, email, office )
|
||||
VALUES
|
||||
( 1, 'Tiger', 'Nixon', 61, 'System Architect', 320800, '2011/04/25', 5421, 't.nixon@datatables.net', 'Edinburgh' ),
|
||||
( 2, 'Garrett', 'Winters', 63, 'Accountant', 170750, '2011/07/25', 8422, 'g.winters@datatables.net', 'Tokyo' ),
|
||||
( 3, 'Ashton', 'Cox', 66, 'Junior Technical Author', 86000, '2009/01/12', 1562, 'a.cox@datatables.net', 'San Francisco' ),
|
||||
( 4, 'Cedric', 'Kelly', 22, 'Senior Javascript Developer', 433060, '2012/03/29', 6224, 'c.kelly@datatables.net', 'Edinburgh' ),
|
||||
( 5, 'Airi', 'Satou', 33, 'Accountant', 162700, '2008/11/28', 5407, 'a.satou@datatables.net', 'Tokyo' ),
|
||||
( 6, 'Brielle', 'Williamson', 61, 'Integration Specialist', 372000, '2012/12/02', 4804, 'b.williamson@datatables.net', 'New York' ),
|
||||
( 7, 'Herrod', 'Chandler', 59, 'Sales Assistant', 137500, '2012/08/06', 9608, 'h.chandler@datatables.net', 'San Francisco' ),
|
||||
( 8, 'Rhona', 'Davidson', 55, 'Integration Specialist', 327900, '2010/10/14', 6200, 'r.davidson@datatables.net', 'Tokyo' ),
|
||||
( 9, 'Colleen', 'Hurst', 39, 'Javascript Developer', 205500, '2009/09/15', 2360, 'c.hurst@datatables.net', 'San Francisco' ),
|
||||
( 10, 'Sonya', 'Frost', 23, 'Software Engineer', 103600, '2008/12/13', 1667, 's.frost@datatables.net', 'Edinburgh' ),
|
||||
( 11, 'Jena', 'Gaines', 30, 'Office Manager', 90560, '2008/12/19', 3814, 'j.gaines@datatables.net', 'London' ),
|
||||
( 12, 'Quinn', 'Flynn', 22, 'Support Lead', 342000, '2013/03/03', 9497, 'q.flynn@datatables.net', 'Edinburgh' ),
|
||||
( 13, 'Charde', 'Marshall', 36, 'Regional Director', 470600, '2008/10/16', 6741, 'c.marshall@datatables.net', 'San Francisco' ),
|
||||
( 14, 'Haley', 'Kennedy', 43, 'Senior Marketing Designer', 313500, '2012/12/18', 3597, 'h.kennedy@datatables.net', 'London' ),
|
||||
( 15, 'Tatyana', 'Fitzpatrick', 19, 'Regional Director', 385750, '2010/03/17', 1965, 't.fitzpatrick@datatables.net', 'London' ),
|
||||
( 16, 'Michael', 'Silva', 66, 'Marketing Designer', 198500, '2012/11/27', 1581, 'm.silva@datatables.net', 'London' ),
|
||||
( 17, 'Paul', 'Byrd', 64, 'Chief Financial Officer (CFO)', 725000, '2010/06/09', 3059, 'p.byrd@datatables.net', 'New York' ),
|
||||
( 18, 'Gloria', 'Little', 59, 'Systems Administrator', 237500, '2009/04/10', 1721, 'g.little@datatables.net', 'New York' ),
|
||||
( 19, 'Bradley', 'Greer', 41, 'Software Engineer', 132000, '2012/10/13', 2558, 'b.greer@datatables.net', 'London' ),
|
||||
( 20, 'Dai', 'Rios', 35, 'Personnel Lead', 217500, '2012/09/26', 2290, 'd.rios@datatables.net', 'Edinburgh' ),
|
||||
( 21, 'Jenette', 'Caldwell', 30, 'Development Lead', 345000, '2011/09/03', 1937, 'j.caldwell@datatables.net', 'New York' ),
|
||||
( 22, 'Yuri', 'Berry', 40, 'Chief Marketing Officer (CMO)', 675000, '2009/06/25', 6154, 'y.berry@datatables.net', 'New York' ),
|
||||
( 23, 'Caesar', 'Vance', 21, 'Pre-Sales Support', 106450, '2011/12/12', 8330, 'c.vance@datatables.net', 'New York' ),
|
||||
( 24, 'Doris', 'Wilder', 23, 'Sales Assistant', 85600, '2010/09/20', 3023, 'd.wilder@datatables.net', 'Sidney' ),
|
||||
( 25, 'Angelica', 'Ramos', 47, 'Chief Executive Officer (CEO)', 1200000, '2009/10/09', 5797, 'a.ramos@datatables.net', 'London' ),
|
||||
( 26, 'Gavin', 'Joyce', 42, 'Developer', 92575, '2010/12/22', 8822, 'g.joyce@datatables.net', 'Edinburgh' ),
|
||||
( 27, 'Jennifer', 'Chang', 28, 'Regional Director', 357650, '2010/11/14', 9239, 'j.chang@datatables.net', 'Singapore' ),
|
||||
( 28, 'Brenden', 'Wagner', 28, 'Software Engineer', 206850, '2011/06/07', 1314, 'b.wagner@datatables.net', 'San Francisco' ),
|
||||
( 29, 'Fiona', 'Green', 48, 'Chief Operating Officer (COO)', 850000, '2010/03/11', 2947, 'f.green@datatables.net', 'San Francisco' ),
|
||||
( 30, 'Shou', 'Itou', 20, 'Regional Marketing', 163000, '2011/08/14', 8899, 's.itou@datatables.net', 'Tokyo' ),
|
||||
( 31, 'Michelle', 'House', 37, 'Integration Specialist', 95400, '2011/06/02', 2769, 'm.house@datatables.net', 'Sidney' ),
|
||||
( 32, 'Suki', 'Burks', 53, 'Developer', 114500, '2009/10/22', 6832, 's.burks@datatables.net', 'London' ),
|
||||
( 33, 'Prescott', 'Bartlett', 27, 'Technical Author', 145000, '2011/05/07', 3606, 'p.bartlett@datatables.net', 'London' ),
|
||||
( 34, 'Gavin', 'Cortez', 22, 'Team Leader', 235500, '2008/10/26', 2860, 'g.cortez@datatables.net', 'San Francisco' ),
|
||||
( 35, 'Martena', 'Mccray', 46, 'Post-Sales support', 324050, '2011/03/09', 8240, 'm.mccray@datatables.net', 'Edinburgh' ),
|
||||
( 36, 'Unity', 'Butler', 47, 'Marketing Designer', 85675, '2009/12/09', 5384, 'u.butler@datatables.net', 'San Francisco' ),
|
||||
( 37, 'Howard', 'Hatfield', 51, 'Office Manager', 164500, '2008/12/16', 7031, 'h.hatfield@datatables.net', 'San Francisco' ),
|
||||
( 38, 'Hope', 'Fuentes', 41, 'Secretary', 109850, '2010/02/12', 6318, 'h.fuentes@datatables.net', 'San Francisco' ),
|
||||
( 39, 'Vivian', 'Harrell', 62, 'Financial Controller', 452500, '2009/02/14', 9422, 'v.harrell@datatables.net', 'San Francisco' ),
|
||||
( 40, 'Timothy', 'Mooney', 37, 'Office Manager', 136200, '2008/12/11', 7580, 't.mooney@datatables.net', 'London' ),
|
||||
( 41, 'Jackson', 'Bradshaw', 65, 'Director', 645750, '2008/09/26', 1042, 'j.bradshaw@datatables.net', 'New York' ),
|
||||
( 42, 'Olivia', 'Liang', 64, 'Support Engineer', 234500, '2011/02/03', 2120, 'o.liang@datatables.net', 'Singapore' ),
|
||||
( 43, 'Bruno', 'Nash', 38, 'Software Engineer', 163500, '2011/05/03', 6222, 'b.nash@datatables.net', 'London' ),
|
||||
( 44, 'Sakura', 'Yamamoto', 37, 'Support Engineer', 139575, '2009/08/19', 9383, 's.yamamoto@datatables.net', 'Tokyo' ),
|
||||
( 45, 'Thor', 'Walton', 61, 'Developer', 98540, '2013/08/11', 8327, 't.walton@datatables.net', 'New York' ),
|
||||
( 46, 'Finn', 'Camacho', 47, 'Support Engineer', 87500, '2009/07/07', 2927, 'f.camacho@datatables.net', 'San Francisco' ),
|
||||
( 47, 'Serge', 'Baldwin', 64, 'Data Coordinator', 138575, '2012/04/09', 8352, 's.baldwin@datatables.net', 'Singapore' ),
|
||||
( 48, 'Zenaida', 'Frank', 63, 'Software Engineer', 125250, '2010/01/04', 7439, 'z.frank@datatables.net', 'New York' ),
|
||||
( 49, 'Zorita', 'Serrano', 56, 'Software Engineer', 115000, '2012/06/01', 4389, 'z.serrano@datatables.net', 'San Francisco' ),
|
||||
( 50, 'Jennifer', 'Acosta', 43, 'Junior Javascript Developer', 75650, '2013/02/01', 3431, 'j.acosta@datatables.net', 'Edinburgh' ),
|
||||
( 51, 'Cara', 'Stevens', 46, 'Sales Assistant', 145600, '2011/12/06', 3990, 'c.stevens@datatables.net', 'New York' ),
|
||||
( 52, 'Hermione', 'Butler', 47, 'Regional Director', 356250, '2011/03/21', 1016, 'h.butler@datatables.net', 'London' ),
|
||||
( 53, 'Lael', 'Greer', 21, 'Systems Administrator', 103500, '2009/02/27', 6733, 'l.greer@datatables.net', 'London' ),
|
||||
( 54, 'Jonas', 'Alexander', 30, 'Developer', 86500, '2010/07/14', 8196, 'j.alexander@datatables.net', 'San Francisco' ),
|
||||
( 55, 'Shad', 'Decker', 51, 'Regional Director', 183000, '2008/11/13', 6373, 's.decker@datatables.net', 'Edinburgh' ),
|
||||
( 56, 'Michael', 'Bruce', 29, 'Javascript Developer', 183000, '2011/06/27', 5384, 'm.bruce@datatables.net', 'Singapore' ),
|
||||
( 57, 'Donna', 'Snider', 27, 'Customer Support', 112000, '2011/01/25', 4226, 'd.snider@datatables.net', 'New York' );
|
||||
@@ -93,7 +93,7 @@ class SSP {
|
||||
|
||||
if ( isset($request['order']) && count($request['order']) ) {
|
||||
$orderBy = array();
|
||||
$dtColumns = SSP::pluck( $columns, 'dt' );
|
||||
$dtColumns = self::pluck( $columns, 'dt' );
|
||||
|
||||
for ( $i=0, $ien=count($request['order']) ; $i<$ien ; $i++ ) {
|
||||
// Convert the column index into the column data property
|
||||
@@ -138,7 +138,7 @@ class SSP {
|
||||
{
|
||||
$globalSearch = array();
|
||||
$columnSearch = array();
|
||||
$dtColumns = SSP::pluck( $columns, 'dt' );
|
||||
$dtColumns = self::pluck( $columns, 'dt' );
|
||||
|
||||
if ( isset($request['search']) && $request['search']['value'] != '' ) {
|
||||
$str = $request['search']['value'];
|
||||
@@ -149,7 +149,7 @@ class SSP {
|
||||
$column = $columns[ $columnIdx ];
|
||||
|
||||
if ( $requestColumn['searchable'] == 'true' ) {
|
||||
$binding = SSP::bind( $bindings, '%'.$str.'%', PDO::PARAM_STR );
|
||||
$binding = self::bind( $bindings, '%'.$str.'%', PDO::PARAM_STR );
|
||||
$globalSearch[] = "`".$column['db']."` LIKE ".$binding;
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ class SSP {
|
||||
|
||||
if ( $requestColumn['searchable'] == 'true' &&
|
||||
$str != '' ) {
|
||||
$binding = SSP::bind( $bindings, '%'.$str.'%', PDO::PARAM_STR );
|
||||
$binding = self::bind( $bindings, '%'.$str.'%', PDO::PARAM_STR );
|
||||
$columnSearch[] = "`".$column['db']."` LIKE ".$binding;
|
||||
}
|
||||
}
|
||||
@@ -179,8 +179,8 @@ class SSP {
|
||||
|
||||
if ( count( $columnSearch ) ) {
|
||||
$where = $where === '' ?
|
||||
implode(' AND ', $globalSearch) :
|
||||
$where .' AND '. implode(' AND ', $globalSearch);
|
||||
implode(' AND ', $columnSearch) :
|
||||
$where .' AND '. implode(' AND ', $columnSearch);
|
||||
}
|
||||
|
||||
if ( $where !== '' ) {
|
||||
@@ -208,16 +208,16 @@ class SSP {
|
||||
static function simple ( $request, $sql_details, $table, $primaryKey, $columns )
|
||||
{
|
||||
$bindings = array();
|
||||
$db = SSP::sql_connect( $sql_details );
|
||||
$db = self::sql_connect( $sql_details );
|
||||
|
||||
// Build the SQL query string from the request
|
||||
$limit = SSP::limit( $request, $columns );
|
||||
$order = SSP::order( $request, $columns );
|
||||
$where = SSP::filter( $request, $columns, $bindings );
|
||||
$limit = self::limit( $request, $columns );
|
||||
$order = self::order( $request, $columns );
|
||||
$where = self::filter( $request, $columns, $bindings );
|
||||
|
||||
// Main query to actually get the data
|
||||
$data = SSP::sql_exec( $db, $bindings,
|
||||
"SELECT SQL_CALC_FOUND_ROWS `".implode("`, `", SSP::pluck($columns, 'db'))."`
|
||||
$data = self::sql_exec( $db, $bindings,
|
||||
"SELECT SQL_CALC_FOUND_ROWS `".implode("`, `", self::pluck($columns, 'db'))."`
|
||||
FROM `$table`
|
||||
$where
|
||||
$order
|
||||
@@ -225,13 +225,13 @@ class SSP {
|
||||
);
|
||||
|
||||
// Data set length after filtering
|
||||
$resFilterLength = SSP::sql_exec( $db,
|
||||
$resFilterLength = self::sql_exec( $db,
|
||||
"SELECT FOUND_ROWS()"
|
||||
);
|
||||
$recordsFiltered = $resFilterLength[0][0];
|
||||
|
||||
// Total data set length
|
||||
$resTotalLength = SSP::sql_exec( $db,
|
||||
$resTotalLength = self::sql_exec( $db,
|
||||
"SELECT COUNT(`{$primaryKey}`)
|
||||
FROM `$table`"
|
||||
);
|
||||
@@ -245,7 +245,7 @@ class SSP {
|
||||
"draw" => intval( $request['draw'] ),
|
||||
"recordsTotal" => intval( $recordsTotal ),
|
||||
"recordsFiltered" => intval( $recordsFiltered ),
|
||||
"data" => SSP::data_output( $columns, $data )
|
||||
"data" => self::data_output( $columns, $data )
|
||||
);
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ class SSP {
|
||||
);
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
SSP::fatal(
|
||||
self::fatal(
|
||||
"An error occurred while connecting to the database. ".
|
||||
"The error reported by the server was: ".$e->getMessage()
|
||||
);
|
||||
@@ -315,7 +315,7 @@ class SSP {
|
||||
$stmt->execute();
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
SSP::fatal( "An SQL error occurred: ".$e->getMessage() );
|
||||
self::fatal( "An SQL error occurred: ".$e->getMessage() );
|
||||
}
|
||||
|
||||
// Return all
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user