Compare commits

..

46 Commits
1.9.1 ... 1.9.3

Author SHA1 Message Date
Allan Jardine
b16efbc62a DataTables 1.9.3 :-) 2012-08-08 22:39:39 +01:00
Allan Jardine
660e8cb374 Update - examples: Witht he change in name from mDataProp to mData, this change is now refelected in the examples to encorage mData usage (do remember that mDataProp will still work, but use of mData is encoraged). 2012-08-08 22:30:26 +01:00
Allan Jardine
725c1b68ba Fix: Typos in documentation comments and source comments - 11083 2012-08-08 22:22:45 +01:00
Allan Jardine
1f0b162760 Dev fix: In the update to the search array building methods I neglegted to strip \n\r from all rows (only HMTL rows were being stripped) - this is required for searching to work as expected. Picked up by the unit tests. 2012-08-08 22:05:14 +01:00
Allan Jardine
fd0e0a42e4 Fix #39 - null values should also be considered like undefined values when working with nested data and have properties created as needed. 2012-08-08 20:16:40 +01:00
Allan Jardine
0804c50d72 Dev: Unit tests for set functions 2012-08-08 20:02:59 +01:00
Allan Jardine
9a7613362f New: xhr event now has the json returned from the server as the third parameter. 2012-08-08 16:29:27 +01:00
Allan Jardine
9c51aa0ad7 New: xhr event 2012-08-08 16:27:42 +01:00
Allan Jardine
320f53e217 New: When making an Ajax call for data (fnServerData) and the server responds with the JSON parameter "sError" set, Data
Tables will alert this out. Typically end users should never see this - it is useful for error reporting from the server
 though.
2012-08-06 20:41:49 +01:00
Allan Jardine
ed935f3fb8 New: When making an Ajax call for data (fnServerData) and the server responds with the JSON parameter "sError" set, DataTables will alert this out. Typically end users should never see this - it is useful for error reporting from the server though. 2012-08-06 20:39:57 +01:00
Allan Jardine
45a6d2b505 Fix: null values that were applied to extended object properties were not being correctly applied since typeof null === 'object' - 11180 2012-08-04 09:34:26 +01:00
Allan Jardine
5311067cd2 Dev: Tidy up _fnColumnIndexToVisible and _fnVisibleToColumnIndex to use the new _fnGetColumns method. 2012-07-31 09:39:51 +01:00
Allan Jardine
d034d187bd Performance: Alter how _fnBuildSearchRow works to be much faster. For this a new method call _fnGetColumns is introduced which will pluck the column indexes that we want into an array that can then be iterated over (rather than spinning over the full aoColumns array twice, we now do it only the once for columns which are actually marked as searchable). Also use array join rather than string concatination to keep the number of operations down as much as possible. The callers of _fnBuildSearchRow must now pass in the data to be searched, limited by the searchable flag (i.e. call _fnGetRowData with the column indexes from _fnGetColumns).
Fix: Use jQuery html() and text() for HTML data to search method. Much tidier and copes with strict XHTML - downside is that it is a little slower if & is in a data string.
2012-07-31 09:25:35 +01:00
Allan Jardine
a3a4619f12 Fix - documentation: Two syntax errors in the examples, one for fnStateSaveParams and the other mDataProp - 11083 2012-07-30 10:04:42 +01:00
Allan Jardine
649dcd8789 Merge branch 'master' of github.com:DataTables/DataTables 2012-07-30 10:03:55 +01:00
Allan Jardine
a79e5127f5 Fix: Remove dud CSS from themeroller file - 10794 2012-07-10 08:11:23 +01:00
Allan Jardine
6cc9524695 Merge pull request #67 from jerrykan/patch-2
Fix typos in examples/api/multi_filter_select.html
2012-07-04 23:20:31 -07:00
John Kristensen
3be6982a63 Fix typos in examples/api/multi_filter_select.html 2012-07-05 15:31:18 +10:00
Allan Jardine
1186901c95 Fix: Remove duplicate CSS lines - 10663 2012-06-30 07:07:52 +01:00
Allan Jardine
f03c670cf9 Update: Unit test updated for the mData name change from mDataProp. Note that a number of tests to test the backwards compability of mDataProp! 2012-06-29 20:10:15 +01:00
Allan Jardine
d155f7a7e7 Updated: Renaming mDataProp to mData for naming consistency and to show its flexibility. Please note that this is a backwards compatible change! DataTables will automatically check for mDataProp on a column and use that if required (if both mData and mDataProp are given then the new mData is used in preference). 2012-06-29 20:08:52 +01:00
Allan Jardine
4886322183 New: mRender option for columns - this is effectively a simpiler version of mDataProp for reading data only (while mDataProp also sets data), and much more comprhensive than fnRender (as such fnRender is now offically deprecated). See the documentation comments in model.defaults.columns.js for further information on how to use mRender. 2012-06-29 19:37:22 +01:00
Allan Jardine
0ed6ceda95 Updated: mDataProp syntax now has the ability to accept array syntax (for example "access[].name" would get an array of the 'name' properties from the access property of the data source). This is exceptionally useful for manipulating arrays - however, you are very _strongly_ advised not to use in in mDataProp itself, since when setting arrays, you will overwrite the old array (thus destroying any other properties that it already has!). Instead, see the new mRender property if you want to make use of this syntax for drawing the table. 2012-06-29 17:47:00 +01:00
Allan Jardine
56b0d11c96 Fix: When fnUpdate is called with a column index given, assume that the update is for an individual cell (which the API call has specified, so this is the correct thing to do). This also lets us tidy up some of the code in fnUpate, partiuclarly when regarding deeply nested options. 2012-06-26 17:09:03 +01:00
Allan Jardine
a022e2f736 Dev - remove debug 2012-06-25 20:06:19 +01:00
Allan Jardine
40a236a7cc Update: Remove use of $.browser since this is depricated in jQuery 1.8 and will be completely removed in jQuery 1.9. Instead we now use feature detection to determine if there is a browser bug with the width calculation of scrolling elements that needs to be worked around. This does unfortunatly increase the code size a bit - it is either this or using user agent string detection (which is exactly what is being removed from jQuery).
Starting 1.9.3 development
2012-06-25 11:19:56 +01:00
Allan Jardine
1bd6b29fe4 DataTables 1.9.2 :-) 2012-06-22 08:19:26 +01:00
Allan Jardine
6a61818e52 Dev: Ignore the Plugins repo 2012-06-22 08:18:53 +01:00
Allan Jardine
1055d27887 Fix: Regex filter escaping wasn't escaping the dash ('-') character believe it or not. That's been there since very early DataTables! 2012-06-13 18:27:04 +01:00
Allan Jardine
dc3f9b148e Fix - examples: Security updates to the server-side processing demo scripts from Chris Wright - specifically no MySQL error strings are shown to the end user. 2012-06-12 10:44:10 +01:00
Allan Jardine
284658e3c9 Fix: When setting deeply nested object properties, where the parent object doesn't yet exist, don't just silently fail. Since we are setting a value, we are at liberty to create the parent object and then set the value - this now does so. 2012-06-07 09:43:47 +01:00
Allan Jardine
29e0d112cb Fix - docs: Add jqXHR saving to fnServerData example 2012-06-01 07:42:01 +01:00
Allan Jardine
3d802a685b Fix - docs: JSDoc syntax errors which were picked up by JSDoc Toolkit 2012-05-20 10:55:23 +01:00
Allan Jardine
391cd6a7a6 Fix - API: $ method, when used with defered rendering, when all rows have not been rendered, results in jQUery trying to perform a selector on 'null' which throws an error. Now check for the tr having being created before adding it to the array to pass to jQuery - 8862 2012-05-20 10:33:35 +01:00
Allan Jardine
90edd0bd94 Example - update: Use $ and fnUpdate in the index column example - 9840 2012-05-10 18:52:25 +01:00
Allan Jardine
b64dda47c3 Fix: fnDeleteRow could cause the page to drop back by one - 9505 2012-05-02 07:05:00 +01:00
Allan Jardine
49fe9f2e0e Fix: Calling fnClose in fnPreDrawCallback would result in an error - 9702 2012-04-29 18:57:37 +01:00
Allan Jardine
d512e8cce7 Dev - build the last change (fee3ba7) 2012-04-29 10:15:51 +01:00
Allan Jardine
fee3ba754f Merge pull request #46 from Petah/master
Allow custom JUI header and footer classes
2012-04-29 02:13:33 -07:00
Allan Jardine
c2a2b4f531 Fix - docs: fnStateLoad example has a spare parameter (although not in the parameters list). Removed 2012-04-29 08:23:17 +01:00
Allan Jardine
2884ee23d2 Start 1.9.2 development
Fix - docs: sDom default had an error in it for the closing bracket
2012-04-27 16:17:22 +01:00
Allan Jardine
09a9755540 Fix - examples: The global filter in the example PHP scripts wasn't taking into account the bSearchable_{i} flag - it was only being checked on individual column filtering - 8949 2012-04-20 08:14:48 +01:00
Allan Jardine
1fa1ef94a8 Update - examples: Update XRegExp to 1.5.1 with IE8 fix 2012-04-16 18:42:21 +01:00
Allan Jardine
43f7878fab Fix - examples: Remove debug code 2012-04-16 18:42:01 +01:00
Petah
904f5dd672 Allow custom JUI header and footer classes 2012-01-31 14:42:10 +13:00
Petah
05b9ad3d0c Add JUI header/footer classes 2012-01-31 14:39:24 +13:00
102 changed files with 4010 additions and 1731 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@ docs
cdn
media/js/jquery.dataTables.min.js
.DS_Store
Plugins

View File

@@ -17,11 +17,11 @@
"bProcessing": true,
"sAjaxSource": "sources/deep.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform.inner" },
{ "mDataProp": "platform.details.0" },
{ "mDataProp": "platform.details.1" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform.inner" },
{ "mData": "platform.details.0" },
{ "mData": "platform.details.1" }
]
} );
} );
@@ -71,11 +71,11 @@
"bProcessing": true,
"sAjaxSource": "sources/deep.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform.inner" },
{ "mDataProp": "platform.details.0" },
{ "mDataProp": "platform.details.1" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform.inner" },
{ "mData": "platform.details.0" },
{ "mData": "platform.details.1" }
]
} );
} );</pre>

View File

@@ -22,7 +22,7 @@
null,
null,
null,
{ "mDataProp": null }
{ "mData": null }
]
} );
} );
@@ -35,7 +35,7 @@
</div>
<h1>Preamble</h1>
<p>In some tables it can be useful to not need to specify any data source for a column, as it's content is automatically generated (for example using fnRender). This is fairly common with add, edit and delete columns for a CRUD interface. You can now use the <b>mDataProp</b> set to <i>null</i> to specify that the column has no data source. DataTables will render this column as empty.</p>
<p>In some tables it can be useful to not need to specify any data source for a column, as it's content is automatically generated (for example using fnRender). This is fairly common with add, edit and delete columns for a CRUD interface. You can now use the <b>mData</b> set to <i>null</i> to specify that the column has no data source. DataTables will render this column as empty.</p>
<h1>Live example</h1>
<div id="dynamic">
@@ -67,7 +67,7 @@
null,
null,
null,
{ "mDataProp": null }
{ "mData": null }
]
} );
} );</pre>

View File

@@ -17,11 +17,11 @@
"bProcessing": true,
"sAjaxSource": "sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
} );
@@ -71,11 +71,11 @@
"bProcessing": true,
"sAjaxSource": "sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
} );</pre>

View File

@@ -17,11 +17,11 @@
"bProcessing": true,
"sAjaxSource": "sources/objects_subarrays.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "details.0" },
{ "mDataProp": "details.1" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "details.0" },
{ "mData": "details.1" }
]
} );
} );
@@ -71,11 +71,11 @@
"bProcessing": true,
"sAjaxSource": "sources/objects_subarrays.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "details.0" },
{ "mDataProp": "details.1" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "details.0" },
{ "mData": "details.1" }
]
} );
} );</pre>

View File

@@ -15,13 +15,14 @@
$(document).ready(function() {
$('#example').dataTable( {
"fnDrawCallback": function ( oSettings ) {
var that = this;
/* Need to redo the counters if filtered or sorted */
if ( oSettings.bSorted || oSettings.bFiltered )
{
for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ )
{
$('td:eq(0)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
}
this.$('td:first-child', {"filter":"applied"}).each( function (i) {
that.fnUpdate( i+1, this.parentNode, 0, false, false );
} );
}
},
"aoColumnDefs": [
@@ -539,10 +540,9 @@
/* Need to redo the counters if filtered or sorted */
if ( oSettings.bSorted || oSettings.bFiltered )
{
for ( var i=0, iLen=oSettings.aiDisplay.length ; i&lt;iLen ; i++ )
{
$('td:eq(0)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
}
this.$('td:first-child', {"filter":"applied"}).each( function (i) {
that.fnUpdate( i+1, this.parentNode, 0, false, false );
} );
}
},
"aoColumnDefs": [

View File

@@ -28,13 +28,13 @@
// check that we have a column id
if ( typeof iColumn == "undefined" ) return new Array();
// by default we only wany unique data
// by default we only want unique data
if ( typeof bUnique == "undefined" ) bUnique = true;
// by default we do want to only look at filtered data
if ( typeof bFiltered == "undefined" ) bFiltered = true;
// by default we do not wany to include empty values
// by default we do not want to include empty values
if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true;
// list of rows which we're going to loop through
@@ -554,13 +554,13 @@ $.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique,
// check that we have a column id
if ( typeof iColumn == "undefined" ) return new Array();
// by default we only wany unique data
// by default we only want unique data
if ( typeof bUnique == "undefined" ) bUnique = true;
// by default we do want to only look at filtered data
if ( typeof bFiltered == "undefined" ) bFiltered = true;
// by default we do not wany to include empty values
// by default we do not want to include empty values
if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true;
// list of rows which we're going to loop through

View File

@@ -16,11 +16,7 @@
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "../server_side/scripts/server_processing.php",
"sScrollY": "300",
bPaginate: false,
sScrollX: "100%",
sScrollXInner: "120%"
"sAjaxSource": "../server_side/scripts/server_processing.php"
} );
} );
</script>

View File

@@ -1,21 +1,5 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
// XRegExp 1.5.0
// (c) 2007-2010 Steven Levithan
// XRegExp 1.5.1
// (c) 2007-2012 Steven Levithan
// MIT License
// <http://xregexp.com>
// Provides an augmented, extensible, cross-browser implementation of regular expressions,
@@ -29,7 +13,7 @@ if (XRegExp) {
}
// Run within an anonymous function to protect variables and avoid new globals
(function () {
(function (undefined) {
//---------------------------------
// Constructor
@@ -73,7 +57,7 @@ if (XRegExp) {
} else {
// Check for native multicharacter metasequences (excluding character classes) at
// the current position
if (match = real.exec.call(nativeTokens[currScope], pattern.slice(pos))) {
if (match = nativ.exec.call(nativeTokens[currScope], pattern.slice(pos))) {
output.push(match[0]);
pos += match[0].length;
} else {
@@ -89,7 +73,7 @@ if (XRegExp) {
}
}
regex = RegExp(output.join(""), real.replace.call(flags, flagClip, ""));
regex = RegExp(output.join(""), nativ.replace.call(flags, flagClip, ""));
regex._xregexp = {
source: pattern,
captureNames: context.hasNamedCapture ? context.captureNames : null
@@ -102,7 +86,7 @@ if (XRegExp) {
// Public properties
//---------------------------------
XRegExp.version = "1.5.0";
XRegExp.version = "1.5.1";
// Token scope bitflags
XRegExp.INSIDE_CLASS = 1;
@@ -119,22 +103,17 @@ if (XRegExp) {
isInsideConstructor = false,
tokens = [],
// Copy native globals for reference ("native" is an ES3 reserved keyword)
real = {
nativ = {
exec: RegExp.prototype.exec,
test: RegExp.prototype.test,
match: String.prototype.match,
replace: String.prototype.replace,
split: String.prototype.split
},
compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups
compliantExecNpcg = nativ.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups
compliantLastIndexIncrement = function () {
var x = /^/g;
real.test.call(x, "");
return !x.lastIndex;
}(),
compliantLastIndexReset = function () {
var x = /x/g;
real.replace.call("x", x, "");
nativ.test.call(x, "");
return !x.lastIndex;
}(),
hasNativeY = RegExp.prototype.sticky !== undefined,
@@ -189,15 +168,17 @@ if (XRegExp) {
// Accepts a string to search, regex to search with, position to start the search within the
// string (default: 0), and an optional Boolean indicating whether matches must start at-or-
// after the position or at the specified position only. This function ignores the `lastIndex`
// property of the provided regex
// of the provided regex in its own handling, but updates the property for compatibility
XRegExp.execAt = function (str, regex, pos, anchored) {
regex = clone(regex, "g" + ((anchored && hasNativeY) ? "y" : ""));
regex.lastIndex = pos = pos || 0;
var match = regex.exec(str);
if (anchored)
return (match && match.index === pos) ? match : null;
else
return match;
var r2 = clone(regex, "g" + ((anchored && hasNativeY) ? "y" : "")),
match;
r2.lastIndex = pos = pos || 0;
match = r2.exec(str); // Run the altered `exec` (required for `lastIndex` fix, etc.)
if (anchored && match && match.index !== pos)
match = null;
if (regex.global)
regex.lastIndex = match ? r2.lastIndex : 0;
return match;
};
// Breaks the unrestorable link to XRegExp's private list of tokens, thereby preventing
@@ -219,16 +200,18 @@ if (XRegExp) {
// Executes `callback` once per match within `str`. Provides a simpler and cleaner way to
// iterate over regex matches compared to the traditional approaches of subverting
// `String.prototype.replace` or repeatedly calling `exec` within a `while` loop
XRegExp.iterate = function (str, origRegex, callback, context) {
var regex = clone(origRegex, "g"),
XRegExp.iterate = function (str, regex, callback, context) {
var r2 = clone(regex, "g"),
i = -1, match;
while (match = regex.exec(str)) {
while (match = r2.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.)
if (regex.global)
regex.lastIndex = r2.lastIndex; // Doing this to follow expectations if `lastIndex` is checked within `callback`
callback.call(context, match, ++i, str, regex);
if (regex.lastIndex === match.index)
regex.lastIndex++;
if (r2.lastIndex === match.index)
r2.lastIndex++;
}
if (origRegex.global)
origRegex.lastIndex = 0;
if (regex.global)
regex.lastIndex = 0;
};
// Accepts a string and an array of regexes; returns the result of using each successive regex
@@ -285,16 +268,18 @@ if (XRegExp) {
// rather than the empty string.
// - `lastIndex` should not be incremented after zero-length matches.
RegExp.prototype.exec = function (str) {
var match = real.exec.apply(this, arguments),
name, r2;
if (match && str) {
var match, name, r2, origLastIndex;
if (!this.global)
origLastIndex = this.lastIndex;
match = nativ.exec.apply(this, arguments);
if (match) {
// Fix browsers whose `exec` methods don't consistently return `undefined` for
// nonparticipating capturing groups
if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", ""));
r2 = RegExp(this.source, nativ.replace.call(getNativeFlags(this), "g", ""));
// Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
// matching due to characters outside the match
real.replace.call(str.slice(match.index), r2, function () {
nativ.replace.call((str + "").slice(match.index), r2, function () {
for (var i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined)
match[i] = undefined;
@@ -313,29 +298,33 @@ if (XRegExp) {
if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
this.lastIndex--;
}
if (!this.global)
this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows)
return match;
};
// Don't override `test` if it won't change anything
if (!compliantLastIndexIncrement) {
// Fix browser bug in native method
RegExp.prototype.test = function (str) {
// Use the native `exec` to skip some processing overhead, even though the overriden
// `exec` would take care of the `lastIndex` fix
var match = real.exec.call(this, str);
// Fix browsers that increment `lastIndex` after zero-length matches
if (match && this.global && !match[0].length && (this.lastIndex > match.index))
this.lastIndex--;
return !!match;
};
}
// Fix browser bugs in native method
RegExp.prototype.test = function (str) {
// Use the native `exec` to skip some processing overhead, even though the altered
// `exec` would take care of the `lastIndex` fixes
var match, origLastIndex;
if (!this.global)
origLastIndex = this.lastIndex;
match = nativ.exec.call(this, str);
// Fix browsers that increment `lastIndex` after zero-length matches
if (match && !compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
this.lastIndex--;
if (!this.global)
this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows)
return !!match;
};
// Adds named capture support and fixes browser bugs in native method
String.prototype.match = function (regex) {
if (!XRegExp.isRegExp(regex))
regex = RegExp(regex); // Native `RegExp`
if (regex.global) {
var result = real.match.apply(this, arguments);
var result = nativ.match.apply(this, arguments);
regex.lastIndex = 0; // Fix IE bug
return result;
}
@@ -350,20 +339,24 @@ if (XRegExp) {
// third (`flags`) parameter
String.prototype.replace = function (search, replacement) {
var isRegex = XRegExp.isRegExp(search),
captureNames, result, str;
captureNames, result, str, origLastIndex;
// There are many combinations of search/replacement types/values and browser bugs that
// preclude passing to native `replace`, so just keep this check relatively simple
if (isRegex && typeof replacement.valueOf() === "string" && replacement.indexOf("${") === -1 && compliantLastIndexReset)
return real.replace.apply(this, arguments);
// There are too many combinations of search/replacement types/values and browser bugs that
// preclude passing to native `replace`, so don't try
//if (...)
// return nativ.replace.apply(this, arguments);
if (!isRegex)
if (isRegex) {
if (search._xregexp)
captureNames = search._xregexp.captureNames; // Array or `null`
if (!search.global)
origLastIndex = search.lastIndex;
} else {
search = search + ""; // Type conversion
else if (search._xregexp)
captureNames = search._xregexp.captureNames; // Array or `null`
}
if (typeof replacement === "function") {
result = real.replace.call(this, search, function () {
if (Object.prototype.toString.call(replacement) === "[object Function]") {
result = nativ.replace.call(this + "", search, function () {
if (captureNames) {
// Change the `arguments[0]` string primitive to a String object which can store properties
arguments[0] = new String(arguments[0]);
@@ -373,16 +366,16 @@ if (XRegExp) {
arguments[0][captureNames[i]] = arguments[i + 1];
}
}
// Update `lastIndex` before calling `replacement`
// Update `lastIndex` before calling `replacement` (fix browsers)
if (isRegex && search.global)
search.lastIndex = arguments[arguments.length - 2] + arguments[0].length;
return replacement.apply(null, arguments);
});
} else {
str = this + ""; // Type conversion, so `args[args.length - 1]` will be a string (given nonstring `this`)
result = real.replace.call(str, search, function () {
result = nativ.replace.call(str, search, function () {
var args = arguments; // Keep this function's `arguments` available through closure
return real.replace.call(replacement, replacementToken, function ($0, $1, $2) {
return nativ.replace.call(replacement + "", replacementToken, function ($0, $1, $2) {
// Numbered backreference (without delimiters) or special variable
if ($1) {
switch ($1) {
@@ -428,8 +421,12 @@ if (XRegExp) {
});
}
if (isRegex && search.global)
search.lastIndex = 0; // Fix IE bug
if (isRegex) {
if (search.global)
search.lastIndex = 0; // Fix IE, Safari bug (last tested IE 9.0.5, Safari 5.1.2 on Windows)
else
search.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows)
}
return result;
};
@@ -438,7 +435,7 @@ if (XRegExp) {
String.prototype.split = function (s /* separator */, limit) {
// If separator `s` is not a regex, use the native `split`
if (!XRegExp.isRegExp(s))
return real.split.apply(this, arguments);
return nativ.split.apply(this, arguments);
var str = this + "", // Type conversion
output = [],
@@ -482,7 +479,7 @@ if (XRegExp) {
}
if (lastLastIndex === str.length) {
if (!real.test.call(s, "") || lastLength)
if (!nativ.test.call(s, "") || lastLength)
output.push("");
} else {
output.push(str.slice(lastLastIndex));
@@ -511,7 +508,7 @@ if (XRegExp) {
};
}
return regex;
};
}
function getNativeFlags (regex) {
return (regex.global ? "g" : "") +
@@ -519,7 +516,7 @@ if (XRegExp) {
(regex.multiline ? "m" : "") +
(regex.extended ? "x" : "") + // Proposed for ES4; included in AS3
(regex.sticky ? "y" : "");
};
}
function runTokens (pattern, index, scope, context) {
var i = tokens.length,
@@ -548,7 +545,7 @@ if (XRegExp) {
isInsideConstructor = false;
}
return result;
};
}
function indexOf (array, item, from) {
if (Array.prototype.indexOf) // Use the native array method if available
@@ -558,7 +555,7 @@ if (XRegExp) {
return i;
}
return -1;
};
}
//---------------------------------
@@ -573,7 +570,7 @@ if (XRegExp) {
/\(\?#[^)]*\)/,
function (match) {
// Keep tokens separated unless the following token is a quantifier
return real.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)";
return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)";
}
);
@@ -635,7 +632,7 @@ if (XRegExp) {
/(?:\s+|#.*)+/,
function (match) {
// Keep tokens separated unless the following token is a quantifier
return real.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)";
return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)";
},
XRegExp.OUTSIDE_CLASS,
function () {return this.hasFlag("x");}
@@ -664,6 +661,7 @@ if (XRegExp) {
*/
})();
//
// Begin anonymous function. This is used to contain local scope variables without polutting global scope.
//
@@ -2536,6 +2534,8 @@ var dtOptions = [
'fnStateSaveCallback',
'bDeferRender',
'mDataProp',
'mData',
'mRender',
'iDeferLoading',
'bSortCellsTop',
'sDefaultContent',
@@ -2644,6 +2644,8 @@ var dtLinks = [
'fnStateSaveCallback',
'bDeferRender',
'mDataProp',
'mData',
'mRender',
'iDeferLoading',
'bSortCellsTop',
'sDefaultContent',
@@ -2696,12 +2698,10 @@ var dtLinks = [
/* Show and syntax highlight XHR returns from the server */
$(document).ready( function () {
if ( $.fn.dataTableSettings.length >= 1 ) {
$('#example').dataTable().bind('xhr', function ( e, oSettings ) {
$('#example').dataTable().bind('xhr', function ( e, oSettings, json ) {
var n = document.getElementById('latest_xhr');
if ( n ) {
n.innerHTML = JSON.stringify(
JSON.parse(oSettings.jqXHR.responseText), null, 2
);
n.innerHTML = JSON.stringify( json, null, 2 );
n.className = "brush: js;"
SyntaxHighlighter.highlight({}, n);
}

View File

@@ -18,11 +18,11 @@
"bServerSide": true,
"sAjaxSource": "scripts/objects.php",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
} );
@@ -36,7 +36,7 @@
<h1>Preamble</h1>
<p>The "native" data format that DataTables expects for server-side processing is a 2D array of data (rows by columns). However, this is often not flexible enough for either the server-side environment, or you might want to convey more information in the data source than is necessary to show in the table (row IDs from the database for example). For this DataTables supports the reading of data for objects as well as arrays.</p>
<p>In this example the server responds with an array of objects, and DataTables will look up each property that is specified by the <b>mDataProp</b> property given for each column</p>
<p>In this example the server responds with an array of objects, and DataTables will look up each property that is specified by the <b>mData</b> property given for each column</p>
<h1>Live example</h1>
<div id="dynamic">
@@ -76,11 +76,11 @@
"bServerSide": true,
"sAjaxSource": "scripts/objects.php",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
} );</pre>

View File

@@ -29,14 +29,28 @@
* no need to edit below this line
*/
/*
* Local functions
*/
function fatal_error ( $sErrorMessage = '' )
{
header( $_SERVER['SERVER_PROTOCOL'] .' 500 Internal Server Error' );
die( $sErrorMessage );
}
/*
* MySQL connection
*/
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
if ( ! $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) )
{
fatal_error( 'Could not open connection to server' );
}
if ( ! mysql_select_db( $gaSql['db'], $gaSql['link'] ) )
{
fatal_error( 'Could not select database ' );
}
/*
@@ -86,7 +100,10 @@
$sWhere = "WHERE (";
for ( $i=0 ; $i<count($aColumns) ; $i++ )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
}
}
$sWhere = substr_replace( $sWhere, "", -3 );
$sWhere .= ')';
@@ -121,13 +138,13 @@
$sOrder
$sLimit
";
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
/* Data set length after filtering */
$sQuery = "
SELECT FOUND_ROWS()
";
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
$iFilteredTotal = $aResultFilterTotal[0];
@@ -136,7 +153,7 @@
SELECT COUNT(".$sIndexColumn.")
FROM $sTable
";
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultTotal = mysql_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];

View File

@@ -29,14 +29,28 @@
* no need to edit below this line
*/
/*
* Local functions
*/
function fatal_error ( $sErrorMessage = '' )
{
header( $_SERVER['SERVER_PROTOCOL'] .' 500 Internal Server Error' );
die( $sErrorMessage );
}
/*
* MySQL connection
*/
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
if ( ! $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) )
{
fatal_error( 'Could not open connection to server' );
}
if ( ! mysql_select_db( $gaSql['db'], $gaSql['link'] ) )
{
fatal_error( 'Could not select database ' );
}
/*
@@ -86,7 +100,10 @@
$sWhere = "WHERE (";
for ( $i=0 ; $i<count($aColumns) ; $i++ )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
}
}
$sWhere = substr_replace( $sWhere, "", -3 );
$sWhere .= ')';
@@ -121,13 +138,13 @@
$sOrder
$sLimit
";
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
/* Data set length after filtering */
$sQuery = "
SELECT FOUND_ROWS()
";
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
$iFilteredTotal = $aResultFilterTotal[0];
@@ -136,7 +153,7 @@
SELECT COUNT(".$sIndexColumn.")
FROM $sTable
";
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultTotal = mysql_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];

View File

@@ -2,11 +2,30 @@
/* MySQL connection */
include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php" ); /* ;-) */
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
/*
* Local functions
*/
function fatal_error ( $sErrorMessage = '' )
{
header( $_SERVER['SERVER_PROTOCOL'] .' 500 Internal Server Error' );
die( $sErrorMessage );
}
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
/*
* MySQL connection
*/
if ( ! $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) )
{
fatal_error( 'Could not open connection to server' );
}
if ( ! mysql_select_db( $gaSql['db'], $gaSql['link'] ) )
{
fatal_error( 'Could not select database ' );
}
/* Paging */
$sLimit = "";
@@ -65,12 +84,12 @@
$sOrder
$sLimit
";
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$sQuery = "
SELECT FOUND_ROWS()
";
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
$iFilteredTotal = $aResultFilterTotal[0];
@@ -78,7 +97,7 @@
SELECT COUNT(id)
FROM ajax
";
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultTotal = mysql_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];

View File

@@ -29,14 +29,28 @@
* no need to edit below this line
*/
/*
* Local functions
*/
function fatal_error ( $sErrorMessage = '' )
{
header( $_SERVER['SERVER_PROTOCOL'] .' 500 Internal Server Error' );
die( $sErrorMessage );
}
/*
* MySQL connection
*/
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
if ( ! $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) )
{
fatal_error( 'Could not open connection to server' );
}
if ( ! mysql_select_db( $gaSql['db'], $gaSql['link'] ) )
{
fatal_error( 'Could not select database ' );
}
/*
@@ -86,7 +100,10 @@
$sWhere = "WHERE (";
for ( $i=0 ; $i<count($aColumns) ; $i++ )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
}
}
$sWhere = substr_replace( $sWhere, "", -3 );
$sWhere .= ')';
@@ -121,13 +138,13 @@
$sOrder
$sLimit
";
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
/* Data set length after filtering */
$sQuery = "
SELECT FOUND_ROWS()
";
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
$iFilteredTotal = $aResultFilterTotal[0];
@@ -136,7 +153,7 @@
SELECT COUNT(".$sIndexColumn.")
FROM $sTable
";
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultTotal = mysql_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];

View File

@@ -29,14 +29,28 @@
* no need to edit below this line
*/
/*
* Local functions
*/
function fatal_error ( $sErrorMessage = '' )
{
header( $_SERVER['SERVER_PROTOCOL'] .' 500 Internal Server Error' );
die( $sErrorMessage );
}
/*
* MySQL connection
*/
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
if ( ! $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) )
{
fatal_error( 'Could not open connection to server' );
}
if ( ! mysql_select_db( $gaSql['db'], $gaSql['link'] ) )
{
fatal_error( 'Could not select database ' );
}
/*
@@ -86,7 +100,10 @@
$sWhere = "WHERE (";
for ( $i=0 ; $i<count($aColumns) ; $i++ )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
}
}
$sWhere = substr_replace( $sWhere, "", -3 );
$sWhere .= ')';
@@ -121,13 +138,13 @@
$sOrder
$sLimit
";
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
/* Data set length after filtering */
$sQuery = "
SELECT FOUND_ROWS()
";
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
$iFilteredTotal = $aResultFilterTotal[0];
@@ -136,7 +153,7 @@
SELECT COUNT(".$sIndexColumn.")
FROM $sTable
";
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultTotal = mysql_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];

View File

@@ -29,14 +29,28 @@
* no need to edit below this line
*/
/*
* Local functions
*/
function fatal_error ( $sErrorMessage = '' )
{
header( $_SERVER['SERVER_PROTOCOL'] .' 500 Internal Server Error' );
die( $sErrorMessage );
}
/*
* MySQL connection
*/
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
if ( ! $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) )
{
fatal_error( 'Could not open connection to server' );
}
if ( ! mysql_select_db( $gaSql['db'], $gaSql['link'] ) )
{
fatal_error( 'Could not select database ' );
}
/*
@@ -86,7 +100,10 @@
$sWhere = "WHERE (";
for ( $i=0 ; $i<count($aColumns) ; $i++ )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
}
}
$sWhere = substr_replace( $sWhere, "", -3 );
$sWhere .= ')';
@@ -121,13 +138,13 @@
$sOrder
$sLimit
";
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
/* Data set length after filtering */
$sQuery = "
SELECT FOUND_ROWS()
";
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
$iFilteredTotal = $aResultFilterTotal[0];
@@ -136,7 +153,7 @@
SELECT COUNT(".$sIndexColumn.")
FROM $sTable
";
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultTotal = mysql_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];

View File

@@ -29,14 +29,28 @@
* no need to edit below this line
*/
/*
* Local functions
*/
function fatal_error ( $sErrorMessage = '' )
{
header( $_SERVER['SERVER_PROTOCOL'] .' 500 Internal Server Error' );
die( $sErrorMessage );
}
/*
* MySQL connection
*/
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
if ( ! $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) )
{
fatal_error( 'Could not open connection to server' );
}
if ( ! mysql_select_db( $gaSql['db'], $gaSql['link'] ) )
{
fatal_error( 'Could not select database ' );
}
/*
@@ -87,7 +101,10 @@
$sWhere = "WHERE (";
for ( $i=0 ; $i<count($aColumns) ; $i++ )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
}
}
$sWhere = substr_replace( $sWhere, "", -3 );
$sWhere .= ')';
@@ -123,13 +140,13 @@
$sOrder
$sLimit
";
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
/* Data set length after filtering */
$sQuery = "
SELECT FOUND_ROWS()
";
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
$iFilteredTotal = $aResultFilterTotal[0];
@@ -138,7 +155,7 @@
SELECT COUNT(".$sIndexColumn.")
FROM $sTable
";
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultTotal = mysql_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];

View File

@@ -29,14 +29,28 @@
* no need to edit below this line
*/
/*
* Local functions
*/
function fatal_error ( $sErrorMessage = '' )
{
header( $_SERVER['SERVER_PROTOCOL'] .' 500 Internal Server Error' );
die( $sErrorMessage );
}
/*
* MySQL connection
*/
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
if ( ! $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) )
{
fatal_error( 'Could not open connection to server' );
}
if ( ! mysql_select_db( $gaSql['db'], $gaSql['link'] ) )
{
fatal_error( 'Could not select database ' );
}
/*
@@ -87,7 +101,10 @@
$sWhere = "WHERE (";
for ( $i=0 ; $i<count($aColumns) ; $i++ )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
}
}
$sWhere = substr_replace( $sWhere, "", -3 );
$sWhere .= ')';
@@ -123,13 +140,13 @@
$sOrder
$sLimit
";
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
/* Data set length after filtering */
$sQuery = "
SELECT FOUND_ROWS()
";
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
$iFilteredTotal = $aResultFilterTotal[0];
@@ -138,7 +155,7 @@
SELECT COUNT(".$sIndexColumn.")
FROM $sTable
";
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultTotal = mysql_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];

View File

@@ -29,14 +29,28 @@
* no need to edit below this line
*/
/*
* Local functions
*/
function fatal_error ( $sErrorMessage = '' )
{
header( $_SERVER['SERVER_PROTOCOL'] .' 500 Internal Server Error' );
die( $sErrorMessage );
}
/*
* MySQL connection
*/
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
if ( ! $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) )
{
fatal_error( 'Could not open connection to server' );
}
if ( ! mysql_select_db( $gaSql['db'], $gaSql['link'] ) )
{
fatal_error( 'Could not select database ' );
}
/*
@@ -85,7 +99,10 @@
$sWhere = "WHERE (";
for ( $i=0 ; $i<count($aColumns) ; $i++ )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_POST['sSearch'] )."%' OR ";
if ( isset($_POST['bSearchable_'.$i]) && $_POST['bSearchable_'.$i] == "true" )
{
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_POST['sSearch'] )."%' OR ";
}
}
$sWhere = substr_replace( $sWhere, "", -3 );
$sWhere .= ')';
@@ -120,13 +137,13 @@
$sOrder
$sLimit
";
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
/* Data set length after filtering */
$sQuery = "
SELECT FOUND_ROWS()
";
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
$iFilteredTotal = $aResultFilterTotal[0];
@@ -135,7 +152,7 @@
SELECT COUNT(".$sIndexColumn.")
FROM $sTable
";
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultTotal = mysql_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];

View File

@@ -29,24 +29,37 @@
* no need to edit below this line
*/
/*
* Local functions
*/
function fatal_error ( $sErrorMessage = '' )
{
header( $_SERVER['SERVER_PROTOCOL'] .' 500 Internal Server Error' );
die( $sErrorMessage );
}
/*
* MySQL connection
*/
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
if ( ! $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) )
{
fatal_error( 'Could not open connection to server' );
}
if ( ! mysql_select_db( $gaSql['db'], $gaSql['link'] ) )
{
fatal_error( 'Could not select database ' );
}
/*
* Paging
*/
$sLimit = "";
if ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )
{
$sLimit = "LIMIT ".mysql_real_escape_string( $_GET['iDisplayStart'] ).", ".
mysql_real_escape_string( $_GET['iDisplayLength'] );
$sLimit = "LIMIT ".intval( $_GET['iDisplayStart'] ).", ".
intval( $_GET['iDisplayLength'] );
}
@@ -86,7 +99,10 @@
$sWhere = "WHERE (";
for ( $i=0 ; $i<count($aColumns) ; $i++ )
{
$sWhere .= "`".$aColumns[$i]."` LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" )
{
$sWhere .= "`".$aColumns[$i]."` LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
}
}
$sWhere = substr_replace( $sWhere, "", -3 );
$sWhere .= ')';
@@ -121,13 +137,13 @@
$sOrder
$sLimit
";
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
/* Data set length after filtering */
$sQuery = "
SELECT FOUND_ROWS()
";
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
$iFilteredTotal = $aResultFilterTotal[0];
@@ -136,7 +152,7 @@
SELECT COUNT(`".$sIndexColumn."`)
FROM $sTable
";
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultTotal = mysql_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];

View File

@@ -111,14 +111,28 @@
* no need to edit below this line
*/
/*
* Local functions
*/
function fatal_error ( $sErrorMessage = '' )
{
header( $_SERVER['SERVER_PROTOCOL'] .' 500 Internal Server Error' );
die( $sErrorMessage );
}
/*
* MySQL connection
*/
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
if ( ! $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) )
{
fatal_error( 'Could not open connection to server' );
}
if ( ! mysql_select_db( $gaSql['db'], $gaSql['link'] ) )
{
fatal_error( 'Could not select database ' );
}
/*
@@ -203,13 +217,13 @@
$sOrder
$sLimit
";
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
/* Data set length after filtering */
$sQuery = "
SELECT FOUND_ROWS()
";
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
$iFilteredTotal = $aResultFilterTotal[0];
@@ -218,7 +232,7 @@
SELECT COUNT(`".$sIndexColumn."`)
FROM $sTable
";
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or fatal_error( 'MySQL Error: ' . mysql_errno() );
$aResultTotal = mysql_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];

View File

@@ -82,7 +82,6 @@ div.dataTables_wrapper .ui-widget-header {
table.display thead th div.DataTables_sort_wrapper {
position: relative;
padding-right: 20px;
padding-right: 20px;
}
table.display thead th div.DataTables_sort_wrapper span {
@@ -147,30 +146,6 @@ table.display thead th div.DataTables_sort_wrapper span {
text-align: right;
}
/* Pagination nested */
.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next {
height: 19px;
width: 19px;
margin-left: 3px;
float: left;
}
.paginate_disabled_previous {
background-image: url('../images/back_disabled.jpg');
}
.paginate_enabled_previous {
background-image: url('../images/back_enabled.jpg');
}
.paginate_disabled_next {
background-image: url('../images/forward_disabled.jpg');
}
.paginate_enabled_next {
background-image: url('../images/forward_enabled.jpg');
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

View File

@@ -216,7 +216,6 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
table.dataTable thead th div.DataTables_sort_wrapper {
position: relative;
padding-right: 20px;
padding-right: 20px;
}
table.dataTable thead th div.DataTables_sort_wrapper span {

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
/**
* @summary DataTables
* @description Paginate, search and sort HTML tables
* @version 1.9.1
* @version 1.9.3
* @file jquery.dataTables.js
* @author Allan Jardine (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
@@ -21,7 +21,7 @@
*/
/*jslint evil: true, undef: true, browser: true */
/*globals $, jQuery,_fnExternApiFunc,_fnInitialise,_fnInitComplete,_fnLanguageCompat,_fnAddColumn,_fnColumnOptions,_fnAddData,_fnCreateTr,_fnGatherData,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnServerParams,_fnAddOptionsHtml,_fnFeatureHtmlTable,_fnScrollDraw,_fnAdjustColumnSizing,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnBuildSearchArray,_fnBuildSearchRow,_fnFilterCreateSearch,_fnDataToSearch,_fnSort,_fnSortAttachListener,_fnSortingClasses,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnFeatureHtmlLength,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnNodeToDataIndex,_fnVisbleColumns,_fnCalculateEnd,_fnConvertToWidth,_fnCalculateColumnWidths,_fnScrollingWidthAdjust,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnDetectType,_fnSettingsFromNode,_fnGetDataMaster,_fnGetTrNodes,_fnGetTdNodes,_fnEscapeRegex,_fnDeleteIndex,_fnReOrderIndex,_fnColumnOrdering,_fnLog,_fnClearTable,_fnSaveState,_fnLoadState,_fnCreateCookie,_fnReadCookie,_fnDetectHeader,_fnGetUniqueThs,_fnScrollBarWidth,_fnApplyToChildren,_fnMap,_fnGetRowData,_fnGetCellData,_fnSetCellData,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnApplyColumnDefs,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnJsonString,_fnRender,_fnNodeToColumnIndex,_fnInfoMacros*/
/*globals $, jQuery,_fnExternApiFunc,_fnInitialise,_fnInitComplete,_fnLanguageCompat,_fnAddColumn,_fnColumnOptions,_fnAddData,_fnCreateTr,_fnGatherData,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnServerParams,_fnAddOptionsHtml,_fnFeatureHtmlTable,_fnScrollDraw,_fnAdjustColumnSizing,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnBuildSearchArray,_fnBuildSearchRow,_fnFilterCreateSearch,_fnDataToSearch,_fnSort,_fnSortAttachListener,_fnSortingClasses,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnFeatureHtmlLength,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnNodeToDataIndex,_fnVisbleColumns,_fnCalculateEnd,_fnConvertToWidth,_fnCalculateColumnWidths,_fnScrollingWidthAdjust,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnDetectType,_fnSettingsFromNode,_fnGetDataMaster,_fnGetTrNodes,_fnGetTdNodes,_fnEscapeRegex,_fnDeleteIndex,_fnReOrderIndex,_fnColumnOrdering,_fnLog,_fnClearTable,_fnSaveState,_fnLoadState,_fnCreateCookie,_fnReadCookie,_fnDetectHeader,_fnGetUniqueThs,_fnScrollBarWidth,_fnApplyToChildren,_fnMap,_fnGetRowData,_fnGetCellData,_fnSetCellData,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnApplyColumnDefs,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnJsonString,_fnRender,_fnNodeToColumnIndex,_fnInfoMacros,_fnBrowserDetect,_fnGetColumns*/
(/** @lends <global> */function($, window, document, undefined) {
/**
@@ -93,7 +93,7 @@
* @type string
* @default Version number
*/
DataTable.version = "1.9.1";
DataTable.version = "1.9.3";
/**
* Private data store, containing all of the settings objects that are created for the
@@ -245,6 +245,7 @@
* @event
* @param {event} e jQuery event object
* @param {object} o DataTables settings object {@link DataTable.models.oSettings}
* @param {object} json JSON returned from the server
*/
/**

View File

@@ -1,7 +1,7 @@
/*
* This is really a good bit rubbish this method of exposing the internal methods
* publically... - To be fixed in 2.0 using methods on the prototype
* publicly... - To be fixed in 2.0 using methods on the prototype
*/
@@ -113,7 +113,9 @@ this.oApi = {
"_fnJsonString": _fnJsonString,
"_fnRender": _fnRender,
"_fnNodeToColumnIndex": _fnNodeToColumnIndex,
"_fnInfoMacros": _fnInfoMacros
"_fnInfoMacros": _fnInfoMacros,
"_fnBrowserDetect": _fnBrowserDetect,
"_fnGetColumns": _fnGetColumns
};
$.extend( DataTable.ext.oApi, this.oApi );

View File

@@ -37,8 +37,11 @@
*/
this.$ = function ( sSelector, oOpts )
{
var i, iLen, a = [];
var i, iLen, a = [], tr;
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
var aoData = oSettings.aoData;
var aiDisplay = oSettings.aiDisplay;
var aiDisplayMaster = oSettings.aiDisplayMaster;
if ( !oOpts )
{
@@ -57,37 +60,54 @@ this.$ = function ( sSelector, oOpts )
{
for ( i=oSettings._iDisplayStart, iLen=oSettings.fnDisplayEnd() ; i<iLen ; i++ )
{
a.push( oSettings.aoData[ oSettings.aiDisplay[i] ].nTr );
tr = aoData[ aiDisplay[i] ].nTr;
if ( tr )
{
a.push( tr );
}
}
}
else if ( oOpts.order == "current" && oOpts.filter == "none" )
{
for ( i=0, iLen=oSettings.aiDisplayMaster.length ; i<iLen ; i++ )
for ( i=0, iLen=aiDisplayMaster.length ; i<iLen ; i++ )
{
a.push( oSettings.aoData[ oSettings.aiDisplayMaster[i] ].nTr );
tr = aoData[ aiDisplayMaster[i] ].nTr;
if ( tr )
{
a.push( tr );
}
}
}
else if ( oOpts.order == "current" && oOpts.filter == "applied" )
{
for ( i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ )
for ( i=0, iLen=aiDisplay.length ; i<iLen ; i++ )
{
a.push( oSettings.aoData[ oSettings.aiDisplay[i] ].nTr );
tr = aoData[ aiDisplay[i] ].nTr;
if ( tr )
{
a.push( tr );
}
}
}
else if ( oOpts.order == "original" && oOpts.filter == "none" )
{
for ( i=0, iLen=oSettings.aoData.length ; i<iLen ; i++ )
for ( i=0, iLen=aoData.length ; i<iLen ; i++ )
{
a.push( oSettings.aoData[ i ].nTr );
tr = aoData[ i ].nTr ;
if ( tr )
{
a.push( tr );
}
}
}
else if ( oOpts.order == "original" && oOpts.filter == "applied" )
{
for ( i=0, iLen=oSettings.aoData.length ; i<iLen ; i++ )
for ( i=0, iLen=aoData.length ; i<iLen ; i++ )
{
if ( $.inArray( i, oSettings.aiDisplay ) !== -1 )
tr = aoData[ i ].nTr;
if ( $.inArray( i, aiDisplay ) !== -1 && tr )
{
a.push( oSettings.aoData[ i ].nTr );
a.push( tr );
}
}
}
@@ -111,11 +131,11 @@ this.$ = function ( sSelector, oOpts )
/**
* Almost identical to $ in operation, but in this case returns the data for the matched
* rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes
* rather than any decendents, so the data can be obtained for the row/cell. If matching
* rather than any descendants, so the data can be obtained for the row/cell. If matching
* rows are found, the data returned is the original data array/object that was used to
* create the row (or a generated array if from a DOM source).
*
* This method is often useful incombination with $ where both functions are given the
* This method is often useful in-combination with $ where both functions are given the
* same parameters and the array indexes will match identically.
* @param {string|node|jQuery} sSelector jQuery selector or node collection to act on
* @param {object} [oOpts] Optional parameters for modifying the rows to be included
@@ -179,8 +199,8 @@ this._ = function ( sSelector, oOpts )
* <ul>
* <li>1D array of data - add a single row with the data provided</li>
* <li>2D array of arrays - add multiple rows in a single call</li>
* <li>object - data object when using <i>mDataProp</i></li>
* <li>array of objects - multiple data objects when using <i>mDataProp</i></li>
* <li>object - data object when using <i>mData</i></li>
* <li>array of objects - multiple data objects when using <i>mData</i></li>
* </ul>
* @param {bool} [bRedraw=true] redraw the table or not
* @returns {array} An array of integers, representing the list of indexes in
@@ -414,8 +434,8 @@ this.fnDeleteRow = function( mTarget, fnCallBack, bRedraw )
fnCallBack.call( this, oSettings, oData );
}
/* Check for an 'overflow' they case for dislaying the table */
if ( oSettings._iDisplayStart >= oSettings.aiDisplay.length )
/* Check for an 'overflow' they case for displaying the table */
if ( oSettings._iDisplayStart >= oSettings.fnRecordsDisplay() )
{
oSettings._iDisplayStart -= oSettings._iDisplayLength;
if ( oSettings._iDisplayStart < 0 )
@@ -1148,7 +1168,7 @@ this.fnSortListener = function( nNode, iColumn, fnCallback )
* @param {node|int} mRow TR element you want to update or the aoData index
* @param {int} [iColumn] The column to update (not used of mData is an array or object)
* @param {bool} [bRedraw=true] Redraw the table or not
* @param {bool} [bAction=true] Perform predraw actions or not
* @param {bool} [bAction=true] Perform pre-draw actions or not
* @returns {int} 0 on success, 1 on error
* @dtopt API
*
@@ -1166,30 +1186,26 @@ this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )
var iRow = (typeof mRow === 'object') ?
_fnNodeToDataIndex(oSettings, mRow) : mRow;
if ( oSettings.__fnUpdateDeep === undefined && $.isArray(mData) && typeof mData === 'object' )
if ( $.isArray(mData) && iColumn === undefined )
{
/* Array update - update the whole row */
oSettings.aoData[iRow]._aData = mData.slice();
/* Flag to the function that we are recursing */
oSettings.__fnUpdateDeep = true;
for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
{
this.fnUpdate( _fnGetCellData( oSettings, iRow, i ), iRow, i, false, false );
}
oSettings.__fnUpdateDeep = undefined;
}
else if ( oSettings.__fnUpdateDeep === undefined && mData !== null && typeof mData === 'object' )
else if ( $.isPlainObject(mData) && iColumn === undefined )
{
/* Object update - update the whole row - assume the developer gets the object right */
oSettings.aoData[iRow]._aData = $.extend( true, {}, mData );
oSettings.__fnUpdateDeep = true;
for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
{
this.fnUpdate( _fnGetCellData( oSettings, iRow, i ), iRow, i, false, false );
}
oSettings.__fnUpdateDeep = undefined;
}
else
{
@@ -1218,8 +1234,10 @@ this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )
* will rebuild the search array - however, the redraw might be disabled by the user)
*/
var iDisplayIndex = $.inArray( iRow, oSettings.aiDisplay );
oSettings.asDataSearch[iDisplayIndex] = _fnBuildSearchRow( oSettings,
_fnGetRowData( oSettings, iRow, 'filter' ) );
oSettings.asDataSearch[iDisplayIndex] = _fnBuildSearchRow(
oSettings,
_fnGetRowData( oSettings, iRow, 'filter', _fnGetColumns( oSettings, 'bSearchable' ) )
);
/* Perform pre-draw actions */
if ( bAction === undefined || bAction )

View File

@@ -50,7 +50,7 @@ function _fnAjaxParameters( oSettings )
for ( i=0 ; i<iColumns ; i++ )
{
mDataProp = oSettings.aoColumns[i].mDataProp;
mDataProp = oSettings.aoColumns[i].mData;
aoData.push( { "name": "mDataProp_"+i, "value": typeof(mDataProp)==="function" ? 'function' : mDataProp } );
}
@@ -100,7 +100,7 @@ function _fnAjaxParameters( oSettings )
/**
* Add Ajax parameters from plugins
* Add Ajax parameters from plug-ins
* @param {object} oSettings dataTables settings object
* @param array {objects} aoData name/value pairs to send to the server
* @memberof DataTable#oApi
@@ -127,7 +127,7 @@ function _fnAjaxUpdateDraw ( oSettings, json )
if ( json.sEcho !== undefined )
{
/* Protect against old returns over-writing a new one. Possible when you get
* very fast interaction, and later queires are completed much faster
* very fast interaction, and later queries are completed much faster
*/
if ( json.sEcho*1 < oSettings.iDraw )
{

View File

@@ -16,7 +16,7 @@ function _fnAddColumn( oSettings, nTh )
"nTh": nTh ? nTh : document.createElement('th'),
"sTitle": oDefaults.sTitle ? oDefaults.sTitle : nTh ? nTh.innerHTML : '',
"aDataSort": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol],
"mDataProp": oDefaults.mDataProp ? oDefaults.oDefaults : iCol
"mData": oDefaults.mData ? oDefaults.oDefaults : iCol
} );
oSettings.aoColumns.push( oCol );
@@ -55,7 +55,7 @@ function _fnAddColumn( oSettings, nTh )
* Apply options for a column
* @param {object} oSettings dataTables settings object
* @param {int} iCol column index to consider
* @param {object} oOptions object with sType, bVisible and bSearchable
* @param {object} oOptions object with sType, bVisible and bSearchable etc
* @memberof DataTable#oApi
*/
function _fnColumnOptions( oSettings, iCol, oOptions )
@@ -65,6 +65,12 @@ function _fnColumnOptions( oSettings, iCol, oOptions )
/* User specified column options */
if ( oOptions !== undefined && oOptions !== null )
{
/* Backwards compatibility for mDataProp */
if ( oOptions.mDataProp && !oOptions.mData )
{
oOptions.mData = oOptions.mDataProp;
}
if ( oOptions.sType !== undefined )
{
oCol.sType = oOptions.sType;
@@ -85,8 +91,19 @@ function _fnColumnOptions( oSettings, iCol, oOptions )
}
/* Cache the data get and set functions for speed */
oCol.fnGetData = _fnGetObjectDataFn( oCol.mDataProp );
oCol.fnSetData = _fnSetObjectDataFn( oCol.mDataProp );
var mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null;
var mData = _fnGetObjectDataFn( oCol.mData );
oCol.fnGetData = function (oData, sSpecific) {
var innerData = mData( oData, sSpecific );
if ( oCol.mRender && (sSpecific && sSpecific !== '') )
{
return mRender( innerData, sSpecific, oData );
}
return innerData;
};
oCol.fnSetData = _fnSetObjectDataFn( oCol.mData );
/* Feature sorting overrides column specific when off */
if ( !oSettings.oFeatures.bSort )
@@ -128,7 +145,7 @@ function _fnColumnOptions( oSettings, iCol, oOptions )
*/
function _fnAdjustColumnSizing ( oSettings )
{
/* Not interested in doing column width calculation if autowidth is disabled */
/* Not interested in doing column width calculation if auto-width is disabled */
if ( oSettings.oFeatures.bAutoWidth === false )
{
return false;
@@ -152,22 +169,11 @@ function _fnAdjustColumnSizing ( oSettings )
*/
function _fnVisibleToColumnIndex( oSettings, iMatch )
{
var iColumn = -1;
for ( var i=0 ; i<oSettings.aoColumns.length ; i++ )
{
if ( oSettings.aoColumns[i].bVisible === true )
{
iColumn++;
}
if ( iColumn == iMatch )
{
return i;
}
}
return null;
var aiVis = _fnGetColumns( oSettings, 'bVisible' );
return typeof aiVis[iMatch] === 'number' ?
aiVis[iMatch] :
null;
}
@@ -181,41 +187,44 @@ function _fnVisibleToColumnIndex( oSettings, iMatch )
*/
function _fnColumnIndexToVisible( oSettings, iMatch )
{
var iVisible = -1;
for ( var i=0 ; i<oSettings.aoColumns.length ; i++ )
{
if ( oSettings.aoColumns[i].bVisible === true )
{
iVisible++;
}
if ( i == iMatch )
{
return oSettings.aoColumns[i].bVisible === true ? iVisible : null;
}
}
return null;
var aiVis = _fnGetColumns( oSettings, 'bVisible' );
var iPos = $.inArray( iMatch, aiVis );
return iPos !== -1 ? iPos : null;
}
/**
* Get the number of visible columns
* @param {object} oSettings dataTables settings object
* @returns {int} i the number of visible columns
* @param {object} oS dataTables settings object
* @memberof DataTable#oApi
*/
function _fnVisbleColumns( oS )
function _fnVisbleColumns( oSettings )
{
var iVis = 0;
for ( var i=0 ; i<oS.aoColumns.length ; i++ )
{
if ( oS.aoColumns[i].bVisible === true )
{
iVis++;
return _fnGetColumns( oSettings, 'bVisible' ).length;
}
/**
* Get an array of column indexes that match a given property
* @param {object} oSettings dataTables settings object
* @param {string} sParam Parameter in aoColumns to look for - typically
* bVisible or bSearchable
* @returns {array} Array of indexes with matched properties
* @memberof DataTable#oApi
*/
function _fnGetColumns( oSettings, sParam )
{
var a = [];
$.map( oSettings.aoColumns, function(val, i) {
if ( val[sParam] ) {
a.push( i );
}
}
return iVis;
} );
return a;
}

View File

@@ -253,7 +253,7 @@ for ( i=0, iLen=oSettings.asStripeClasses.length ; i<iLen ; i++ )
if ( bStripeRemove )
{
/* Store the classes which we are about to remove so they can be readded on destroy */
/* Store the classes which we are about to remove so they can be re-added on destroy */
oSettings.asDestroyStripes = [ '', '' ];
if ( $(anRows[0]).hasClass(oSettings.oClasses.sStripeOdd) )
{
@@ -371,6 +371,9 @@ _fnSortingClasses( oSettings );
* Cache the header, body and footer as required, creating them if needed
*/
/* Browser support detection */
_fnBrowserDetect( oSettings );
// Work around for Webkit bug 83867 - store the caption-side before removing from doc
var captions = $(this).children('caption').each( function () {
this._captionSide = $(this).css('caption-side');

View File

@@ -30,8 +30,8 @@ function _fnAddData ( oSettings, aDataSupplied )
{
oCol = oSettings.aoColumns[i];
/* Use rendered data for filtering/sorting */
if ( typeof oCol.fnRender === 'function' && oCol.bUseRendered && oCol.mDataProp !== null )
/* Use rendered data for filtering / sorting */
if ( typeof oCol.fnRender === 'function' && oCol.bUseRendered && oCol.mData !== null )
{
_fnSetCellData( oSettings, iRow, i, _fnRender(oSettings, iRow, i) );
}
@@ -186,7 +186,7 @@ function _fnGatherData( oSettings )
}
}
if ( typeof oCol.mDataProp === 'function' )
if ( typeof oCol.mData === 'function' )
{
nCell.innerHTML = _fnGetCellData( oSettings, iRow, iColumn, 'display' );
}
@@ -198,7 +198,7 @@ function _fnGatherData( oSettings )
nCell.innerHTML = sRendered;
if ( oCol.bUseRendered )
{
/* Use the rendered data for filtering/sorting */
/* Use the rendered data for filtering / sorting */
_fnSetCellData( oSettings, iRow, iColumn, sRendered );
}
}
@@ -209,7 +209,7 @@ function _fnGatherData( oSettings )
nCell.className += ' '+oCol.sClass;
}
/* Column visability */
/* Column visibility */
if ( !bVisible )
{
oData._anHidden[iColumn] = nCell;
@@ -283,15 +283,16 @@ function _fnNodeToColumnIndex( oSettings, iRow, n )
* @param {object} oSettings dataTables settings object
* @param {int} iRow aoData row id
* @param {string} sSpecific data get type ('type' 'filter' 'sort')
* @param {array} aiColumns Array of column indexes to get data from
* @returns {array} Data array
* @memberof DataTable#oApi
*/
function _fnGetRowData( oSettings, iRow, sSpecific )
function _fnGetRowData( oSettings, iRow, sSpecific, aiColumns )
{
var out = [];
for ( var i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
for ( var i=0, iLen=aiColumns.length ; i<iLen ; i++ )
{
out.push( _fnGetCellData( oSettings, iRow, i, sSpecific ) );
out.push( _fnGetCellData( oSettings, iRow, aiColumns[i], sSpecific ) );
}
return out;
}
@@ -317,7 +318,7 @@ function _fnGetCellData( oSettings, iRow, iCol, sSpecific )
if ( oSettings.iDrawError != oSettings.iDraw && oCol.sDefaultContent === null )
{
_fnLog( oSettings, 0, "Requested unknown parameter "+
(typeof oCol.mDataProp=='function' ? '{mDataprop function}' : "'"+oCol.mDataProp+"'")+
(typeof oCol.mData=='function' ? '{mData function}' : "'"+oCol.mData+"'")+
" from the data source for row "+iRow );
oSettings.iDrawError = oSettings.iDraw;
}
@@ -360,6 +361,9 @@ function _fnSetCellData( oSettings, iRow, iCol, val )
}
// Private variable that is used to match array syntax in the data property object
var __reArray = /\[.*?\]$/;
/**
* Return a function that can be used to get data from a source object, taking
* into account the ability to use nested objects as a source
@@ -378,30 +382,71 @@ function _fnGetObjectDataFn( mSource )
}
else if ( typeof mSource === 'function' )
{
return function (data, type) {
return mSource( data, type );
return function (data, type, extra) {
return mSource( data, type, extra );
};
}
else if ( typeof mSource === 'string' && mSource.indexOf('.') != -1 )
else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 || mSource.indexOf('[') !== -1) )
{
/* If there is a . in the source string then the data source is in a
* nested object so we loop over the data for each level to get the next
* level down. On each loop we test for undefined, and if found immediatly
* level down. On each loop we test for undefined, and if found immediately
* return. This allows entire objects to be missing and sDefaultContent to
* be used if defined, rather than throwing an error
*/
var a = mSource.split('.');
return function (data, type) {
for ( var i=0, iLen=a.length ; i<iLen ; i++ )
var fetchData = function (data, type, src) {
var a = src.split('.');
var arrayNotation, out, innerSrc;
if ( src !== "" )
{
data = data[ a[i] ];
if ( data === undefined )
for ( var i=0, iLen=a.length ; i<iLen ; i++ )
{
return undefined;
// Check if we are dealing with an array notation request
arrayNotation = a[i].match(__reArray);
if ( arrayNotation ) {
a[i] = a[i].replace(__reArray, '');
// Condition allows simply [] to be passed in
if ( a[i] !== "" ) {
data = data[ a[i] ];
}
out = [];
// Get the remainder of the nested object to get
a.splice( 0, i+1 );
innerSrc = a.join('.');
// Traverse each entry in the array getting the properties requested
for ( var j=0, jLen=data.length ; j<jLen ; j++ ) {
out.push( fetchData( data[j], type, innerSrc ) );
}
// If a string is given in between the array notation indicators, that
// is used to join the strings together, otherwise an array is returned
var join = arrayNotation[0].substring(1, arrayNotation[0].length-1);
data = (join==="") ? out : out.join(join);
// The inner call to fetchData has already traversed through the remainder
// of the source requested, so we exit from the loop
break;
}
if ( data === null || data[ a[i] ] === undefined )
{
return undefined;
}
data = data[ a[i] ];
}
}
return data;
};
return function (data, type) {
return fetchData( data, type, mSource );
};
}
else
{
@@ -433,20 +478,57 @@ function _fnSetObjectDataFn( mSource )
mSource( data, 'set', val );
};
}
else if ( typeof mSource === 'string' && mSource.indexOf('.') != -1 )
else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 || mSource.indexOf('[') !== -1) )
{
/* Like the get, we need to get data from a nested object. */
var a = mSource.split('.');
return function (data, val) {
/* Like the get, we need to get data from a nested object */
var setData = function (data, val, src) {
var a = src.split('.'), b;
var arrayNotation, o, innerSrc;
for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )
{
data = data[ a[i] ];
if ( data === undefined )
// Check if we are dealing with an array notation request
arrayNotation = a[i].match(__reArray);
if ( arrayNotation )
{
a[i] = a[i].replace(__reArray, '');
data[ a[i] ] = [];
// Get the remainder of the nested object to set so we can recurse
b = a.slice();
b.splice( 0, i+1 );
innerSrc = b.join('.');
// Traverse each entry in the array setting the properties requested
for ( var j=0, jLen=val.length ; j<jLen ; j++ )
{
o = {};
setData( o, val[j], innerSrc );
data[ a[i] ].push( o );
}
// The inner call to setData has already traversed through the remainder
// of the source and has set the data, thus we can exit here
return;
}
// If the nested object doesn't currently exist - since we are
// trying to set the value - create it
if ( data[ a[i] ] === null || data[ a[i] ] === undefined )
{
data[ a[i] ] = {};
}
data = data[ a[i] ];
}
data[ a[a.length-1] ] = val;
// If array notation is used, we just want to strip it and use the property name
// and assign the value. If it isn't used, then we get the result we want anyway
data[ a[a.length-1].replace(__reArray, '') ] = val;
};
return function (data, val) {
return setData( data, val, mSource );
};
}
else
@@ -539,6 +621,6 @@ function _fnRender( oSettings, iRow, iCol )
"iDataColumn": iCol,
"oSettings": oSettings,
"aData": oSettings.aoData[iRow]._aData,
"mDataProp": oCol.mDataProp
"mDataProp": oCol.mData
}, _fnGetCellData(oSettings, iRow, iCol, 'display') );
}

View File

@@ -1,5 +1,4 @@
/**
* Create a new TR element (and it's TD children) for a row
* @param {object} oSettings dataTables settings object
@@ -40,7 +39,7 @@ function _fnCreateTr ( oSettings, iRow )
/* Render if needed - if bUseRendered is true then we already have the rendered
* value in the data source - so can just use that
*/
nTd.innerHTML = (typeof oCol.fnRender === 'function' && (!oCol.bUseRendered || oCol.mDataProp === null)) ?
nTd.innerHTML = (typeof oCol.fnRender === 'function' && (!oCol.bUseRendered || oCol.mData === null)) ?
_fnRender( oSettings, iRow, i ) :
_fnGetCellData( oSettings, iRow, i, 'display' );
@@ -301,12 +300,6 @@ function _fnDrawHead( oSettings, aoSource, bIncludeHidden )
*/
function _fnDraw( oSettings )
{
var i, iLen, n;
var anRows = [];
var iRowCount = 0;
var iStripes = oSettings.asStripeClasses.length;
var iOpenRows = oSettings.aoOpenRows.length;
/* Provide a pre-callback function which can be used to cancel the draw is false is returned */
var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );
if ( $.inArray( false, aPreDraw ) !== -1 )
@@ -315,6 +308,12 @@ function _fnDraw( oSettings )
return;
}
var i, iLen, n;
var anRows = [];
var iRowCount = 0;
var iStripes = oSettings.asStripeClasses.length;
var iOpenRows = oSettings.aoOpenRows.length;
oSettings.bDrawing = true;
/* Check and see if we have an initial draw position from state saving */
@@ -380,7 +379,7 @@ function _fnDraw( oSettings )
}
}
/* Row callback functions - might want to manipule the row */
/* Row callback functions - might want to manipulate the row */
_fnCallbackFire( oSettings, 'aoRowCallback', null,
[nRow, oSettings.aoData[ oSettings.aiDisplay[j] ]._aData, iRowCount, j] );
@@ -573,11 +572,11 @@ function _fnAddOptionsHtml ( oSettings )
/* Replace jQuery UI constants */
if ( sAttr == "H" )
{
sAttr = "fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix";
sAttr = oSettings.oClasses.sJUIHeader;
}
else if ( sAttr == "F" )
{
sAttr = "fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix";
sAttr = oSettings.oClasses.sJUIFooter;
}
/* The attribute can be in the format of "#id.class", "#id" or "class" This logic
@@ -756,7 +755,7 @@ function _fnDetectHeader ( aLayout, nThead )
* @param {object} oSettings dataTables settings object
* @param {node} nHeader automatically detect the layout from this node - optional
* @param {array} aLayout thead/tfoot layout from _fnDetectHeader - optional
* @returns array {node} aReturn list of unique ths
* @returns array {node} aReturn list of unique th's
* @memberof DataTable#oApi
*/
function _fnGetUniqueThs ( oSettings, nHeader, aLayout )

View File

@@ -133,15 +133,22 @@ function _fnFilterComplete ( oSettings, oInput, iForce )
function _fnFilterCustom( oSettings )
{
var afnFilters = DataTable.ext.afnFiltering;
var aiFilterColumns = _fnGetColumns( oSettings, 'bSearchable' );
for ( var i=0, iLen=afnFilters.length ; i<iLen ; i++ )
{
var iCorrector = 0;
for ( var j=0, jLen=oSettings.aiDisplay.length ; j<jLen ; j++ )
{
var iDisIndex = oSettings.aiDisplay[j-iCorrector];
var bTest = afnFilters[i](
oSettings,
_fnGetRowData( oSettings, iDisIndex, 'filter', aiFilterColumns ),
iDisIndex
);
/* Check if we should use this row based on the filtering function */
if ( !afnFilters[i]( oSettings, _fnGetRowData( oSettings, iDisIndex, 'filter' ), iDisIndex ) )
if ( !bTest )
{
oSettings.aiDisplay.splice( j-iCorrector, 1 );
iCorrector++;
@@ -280,15 +287,19 @@ function _fnBuildSearchArray ( oSettings, iMaster )
if ( !oSettings.oFeatures.bServerSide )
{
/* Clear out the old data */
oSettings.asDataSearch.splice( 0, oSettings.asDataSearch.length );
oSettings.asDataSearch = [];
var aiFilterColumns = _fnGetColumns( oSettings, 'bSearchable' );
var aiIndex = (iMaster===1) ?
oSettings.aiDisplayMaster :
oSettings.aiDisplay;
var aArray = (iMaster && iMaster===1) ?
oSettings.aiDisplayMaster : oSettings.aiDisplay;
for ( var i=0, iLen=aArray.length ; i<iLen ; i++ )
for ( var i=0, iLen=aiIndex.length ; i<iLen ; i++ )
{
oSettings.asDataSearch[i] = _fnBuildSearchRow( oSettings,
_fnGetRowData( oSettings, aArray[i], 'filter' ) );
oSettings.asDataSearch[i] = _fnBuildSearchRow(
oSettings,
_fnGetRowData( oSettings, aiIndex[i], 'filter', aiFilterColumns )
);
}
}
}
@@ -302,33 +313,16 @@ function _fnBuildSearchArray ( oSettings, iMaster )
*/
function _fnBuildSearchRow( oSettings, aData )
{
var sSearch = '';
if ( oSettings.__nTmpFilter === undefined )
{
oSettings.__nTmpFilter = document.createElement('div');
}
var nTmp = oSettings.__nTmpFilter;
for ( var j=0, jLen=oSettings.aoColumns.length ; j<jLen ; j++ )
{
if ( oSettings.aoColumns[j].bSearchable )
{
var sData = aData[j];
sSearch += _fnDataToSearch( sData, oSettings.aoColumns[j].sType )+' ';
}
}
var sSearch = aData.join(' ');
/* If it looks like there is an HTML entity in the string, attempt to decode it */
if ( sSearch.indexOf('&') !== -1 )
{
nTmp.innerHTML = sSearch;
sSearch = nTmp.textContent ? nTmp.textContent : nTmp.innerText;
/* IE and Opera appear to put an newline where there is a <br> tag - remove it */
sSearch = sSearch.replace(/\n/g," ").replace(/\r/g,"");
sSearch = $('<div>').html(sSearch).text();
}
return sSearch;
// Strip newline characters
return sSearch.replace( /[\n\r]/g, " " );
}
/**
@@ -336,7 +330,7 @@ function _fnBuildSearchRow( oSettings, aData )
* @param {string} sSearch string to search for
* @param {bool} bRegex treat as a regular expression or not
* @param {bool} bSmart perform smart filtering or not
* @param {bool} bCaseInsensitive Do case insenstive matching or not
* @param {bool} bCaseInsensitive Do case insensitive matching or not
* @returns {RegExp} constructed object
* @memberof DataTable#oApi
*/
@@ -391,14 +385,14 @@ function _fnDataToSearch ( sData, sType )
/**
* scape a string stuch that it can be used in a regular expression
* scape a string such that it can be used in a regular expression
* @param {string} sVal string to escape
* @returns {string} escaped string
* @memberof DataTable#oApi
*/
function _fnEscapeRegex ( sVal )
{
var acEscape = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^' ];
var acEscape = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ];
var reReplace = new RegExp( '(\\' + acEscape.join('|\\') + ')', 'g' );
return sVal.replace(reReplace, '\\$1');
}

View File

@@ -93,7 +93,7 @@ function _fnFeatureHtmlLength ( oSettings )
/**
* Rcalculate the end point based on the start point
* Recalculate the end point based on the start point
* @param {object} oSettings dataTables settings object
* @memberof DataTable#oApi
*/

View File

@@ -75,7 +75,7 @@ function _fnPageChange ( oSettings, mAction )
oSettings._iDisplayStart - oSettings._iDisplayLength :
0;
/* Correct for underrun */
/* Correct for under-run */
if ( oSettings._iDisplayStart < 0 )
{
oSettings._iDisplayStart = 0;

View File

@@ -108,7 +108,7 @@ function _fnFeatureHtmlTable ( oSettings )
/*
* Sizing
*/
/* When xscrolling add the width and a scroller to move the header with the body */
/* When x-scrolling add the width and a scroller to move the header with the body */
if ( oSettings.oScroll.sX !== "" )
{
nScrollHead.style.width = _fnStringToCss( oSettings.oScroll.sX );
@@ -194,7 +194,7 @@ function _fnScrollDraw ( o )
iWidth, aApplied=[], iSanityWidth,
nScrollFootInner = (o.nTFoot !== null) ? o.nScrollFoot.getElementsByTagName('div')[0] : null,
nScrollFootTable = (o.nTFoot !== null) ? nScrollFootInner.getElementsByTagName('table')[0] : null,
ie67 = $.browser.msie && $.browser.version <= 7;
ie67 = o.oBrowser.bScrollOversize;
/*
* 1. Re-create the table inside the scrolling div
@@ -219,7 +219,7 @@ function _fnScrollDraw ( o )
/* Remove old sizing and apply the calculated column widths
* Get the unique column headers in the newly created (cloned) header. We want to apply the
* calclated sizes to this header
* calculated sizes to this header
*/
if ( o.oScroll.sX === "" )
{
@@ -453,7 +453,7 @@ function _fnScrollDraw ( o )
nScrollFootInner.style.paddingRight = bScrolling ? o.oScroll.iBarWidth+"px" : "0px";
}
/* Adjust the position of the header incase we loose the y-scrollbar */
/* Adjust the position of the header in case we loose the y-scrollbar */
$(nScrollBody).scroll();
/* If sorting or filtering has occurred, jump the scrolling back to the top */

View File

@@ -284,7 +284,7 @@ function _fnScrollingWidthAdjust ( oSettings, n )
* Get the widest node
* @param {object} oSettings dataTables settings object
* @param {int} iCol column of interest
* @returns {string} max strlens for each column
* @returns {string} max string length for each column
* @memberof DataTable#oApi
*/
function _fnGetWidestNode( oSettings, iCol )
@@ -309,7 +309,7 @@ function _fnGetWidestNode( oSettings, iCol )
* Get the maximum strlen for each data column
* @param {object} oSettings dataTables settings object
* @param {int} iCol column of interest
* @returns {string} max strlens for each column
* @returns {string} max string length for each column
* @memberof DataTable#oApi
*/
function _fnGetMaxLenString( oSettings, iCol )

View File

@@ -26,7 +26,7 @@ function _fnSort ( oSettings, bApplyClasses )
oSettings.aaSortingFixed.concat( oSettings.aaSorting ) :
oSettings.aaSorting.slice();
/* If there is a sorting data type, and a fuction belonging to it, then we need to
/* If there is a sorting data type, and a function belonging to it, then we need to
* get the data from the developer's function and apply it for this column
*/
for ( i=0 ; i<aaSort.length ; i++ )
@@ -208,17 +208,17 @@ function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback )
* twice - once for when bProcessing is enabled, and another time for when it is
* disabled, as we need to perform slightly different actions.
* Basically the issue here is that the Javascript engine in modern browsers don't
* appear to allow the rendering engine to update the display while it is still excuting
* appear to allow the rendering engine to update the display while it is still executing
* it's thread (well - it does but only after long intervals). This means that the
* 'processing' display doesn't appear for a table sort. To break the js thread up a bit
* I force an execution break by using setTimeout - but this breaks the expected
* thread continuation for the end-developer's point of view (their code would execute
* too early), so we on;y do it when we absolutely have to.
* too early), so we only do it when we absolutely have to.
*/
var fnInnerSorting = function () {
var iColumn, iNextSort;
/* If the shift key is pressed then we are multipe column sorting */
/* If the shift key is pressed then we are multiple column sorting */
if ( e.shiftKey )
{
/* Are we already doing some kind of sort on this column? */
@@ -391,10 +391,10 @@ function _fnSortingClasses( oSettings )
* Apply the required classes to the table body
* Note that this is given as a feature switch since it can significantly slow down a sort
* on large data sets (adding and removing of classes is always slow at the best of times..)
* Further to this, note that this code is admitadly fairly ugly. It could be made a lot
* simpiler using jQuery selectors and add/removeClass, but that is significantly slower
* Further to this, note that this code is admittedly fairly ugly. It could be made a lot
* simpler using jQuery selectors and add/removeClass, but that is significantly slower
* (on the order of 5 times slower) - hence the direct DOM manipulation here.
* Note that for defered drawing we do use jQuery - the reason being that taking the first
* Note that for deferred drawing we do use jQuery - the reason being that taking the first
* row found to see if the whole column needs processed can miss classes since the first
* column might be new.
*/

View File

@@ -80,7 +80,7 @@ function _fnLoadState ( oSettings, oInit )
$.extend( true, oSettings.aoPreSearchCols, oData.aoSearchCols );
/* Column visibility state
* Pass back visibiliy settings to the init handler, but to do not here override
* Pass back visibility settings to the init handler, but to do not here override
* the init object that the user might have passed in
*/
oInit.saved_aoColumns = [];

View File

@@ -166,17 +166,21 @@ function _fnMap( oRet, oSrc, sName, sMappedName )
*/
function _fnExtend( oOut, oExtender )
{
var val;
for ( var prop in oExtender )
{
if ( oExtender.hasOwnProperty(prop) )
{
if ( typeof oInit[prop] === 'object' && $.isArray(oExtender[prop]) === false )
val = oExtender[prop];
if ( typeof oInit[prop] === 'object' && val !== null && $.isArray(val) === false )
{
$.extend( true, oOut[prop], oExtender[prop] );
$.extend( true, oOut[prop], val );
}
else
{
oOut[prop] = oExtender[prop];
oOut[prop] = val;
}
}
}
@@ -187,11 +191,11 @@ function _fnExtend( oOut, oExtender )
/**
* Bind an event handers to allow a click or return key to activate the callback.
* This is good for accessability since a return on the keyboard will have the
* This is good for accessibility since a return on the keyboard will have the
* same effect as a click, if the element has focus.
* @param {element} n Element to bind the action to
* @param {object} oData Data object to pass to the triggered function
* @param {function) fn Callback function for when the event is triggered
* @param {function} fn Callback function for when the event is triggered
* @memberof DataTable#oApi
*/
function _fnBindAction( n, oData, fn )
@@ -216,9 +220,9 @@ function _fnBindAction( n, oData, fn )
* Register a callback function. Easily allows a callback function to be added to
* an array store of callback functions that can then all be called together.
* @param {object} oSettings dataTables settings object
* @param {string} sStore Name of the array storeage for the callbacks in oSettings
* @param {string} sStore Name of the array storage for the callbacks in oSettings
* @param {function} fn Function to be called back
* @param {string) sName Identifying name for the callback (i.e. a label)
* @param {string} sName Identifying name for the callback (i.e. a label)
* @memberof DataTable#oApi
*/
function _fnCallbackReg( oSettings, sStore, fn, sName )
@@ -238,10 +242,10 @@ function _fnCallbackReg( oSettings, sStore, fn, sName )
* array store is done backwards! Further note that you do not want to fire off triggers
* in time sensitive applications (for example cell creation) as its slow.
* @param {object} oSettings dataTables settings object
* @param {string} sStore Name of the array storeage for the callbacks in oSettings
* @param {string} sStore Name of the array storage for the callbacks in oSettings
* @param {string} sTrigger Name of the jQuery custom event to trigger. If null no trigger
* is fired
* @param {array) aArgs Array of arguments to pass to the callback function / trigger
* @param {array} aArgs Array of arguments to pass to the callback function / trigger
* @memberof DataTable#oApi
*/
function _fnCallbackFire( oSettings, sStore, sTrigger, aArgs )
@@ -266,7 +270,7 @@ function _fnCallbackFire( oSettings, sStore, sTrigger, aArgs )
/**
* JSON stringify. If JSON.stringify it provided by the browser, json2.js or any other
* library, then we use that as it is fast, safe and accurate. If the function isn't
* available then we need to built it ourselves - the insperation for this function comes
* available then we need to built it ourselves - the inspiration for this function comes
* from Craig Buckler ( http://www.sitepoint.com/javascript-json-serialization/ ). It is
* not perfect and absolutely should not be used as a replacement to json2.js - but it does
* do what we need, without requiring a dependency for DataTables.
@@ -314,3 +318,28 @@ var _fnJsonString = (window.JSON) ? JSON.stringify : function( o )
return (bArr ? "[" : "{") + json + (bArr ? "]" : "}");
};
/**
* From some browsers (specifically IE6/7) we need special handling to work around browser
* bugs - this function is used to detect when these workarounds are needed.
* @param {object} oSettings dataTables settings object
* @memberof DataTable#oApi
*/
function _fnBrowserDetect( oSettings )
{
/* IE6/7 will oversize a width 100% element inside a scrolling element, to include the
* width of the scrollbar, while other browsers ensure the inner element is contained
* without forcing scrolling
*/
var n = $(
'<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden">'+
'<div style="position:absolute; top:1px; left:1px; width:100px; height:50px; overflow:scroll;">'+
'<div id="DT_BrowserTest" style="width:100%; height:10px;"></div>'+
'</div>'+
'</div>')[0];
document.body.appendChild( n );
oSettings.oBrowser.bScrollOversize = $('#DT_BrowserTest', n)[0].offsetWidth === 100 ? true : false;
document.body.removeChild( n );
}

View File

@@ -59,7 +59,9 @@ $.extend( DataTable.ext.oStdClasses, {
"sScrollFootInner": "dataTables_scrollFootInner",
/* Misc */
"sFooterTH": ""
"sFooterTH": "",
"sJUIHeader": "",
"sJUIFooter": ""
} );
@@ -103,6 +105,8 @@ $.extend( DataTable.ext.oJUIClasses, DataTable.ext.oStdClasses, {
"sScrollFoot": "dataTables_scrollFoot ui-state-default",
/* Misc */
"sFooterTH": "ui-state-default"
"sFooterTH": "ui-state-default",
"sJUIHeader": "fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix",
"sJUIFooter": "fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"
} );

View File

@@ -228,12 +228,12 @@ $.extend( DataTable.ext.oPagination, {
continue;
}
/* Build up the dynamic list forst - html and listeners */
/* Build up the dynamic list first - html and listeners */
$('span:eq(0)', an[i])
.html( sList )
.children('a').each( fnBind );
/* Update the premanent botton's classes */
/* Update the permanent button's classes */
anButtons = an[i].getElementsByTagName('a');
anStatic = [
anButtons[0], anButtons[1],

View File

@@ -53,7 +53,7 @@ DataTable.models.oColumn = {
* and filtering use the rendered value (true - default), or you can have
* the sorting and filtering us the original value (false).
*
* *NOTE* It is it is advisable now to use mDataProp as a function and make
* *NOTE* It is it is advisable now to use mData as a function and make
* use of the 'type' that it gives, allowing (potentially) different data to
* be used for sorting, filtering, display and type detection.
* @type boolean
@@ -93,7 +93,7 @@ DataTable.models.oColumn = {
/**
* Function to get data from a cell in a column. You should <b>never</b>
* access data directly through _aData internally in DataTables - always use
* the method attached to this property. It allows mDataProp to function as
* the method attached to this property. It allows mData to function as
* required. This function is automatically assigned by the column
* initialisation method
* @type function
@@ -113,7 +113,7 @@ DataTable.models.oColumn = {
* @param {object} o Object with the following parameters:
* @param {int} o.iDataRow The row in aoData
* @param {int} o.iDataColumn The column in question
* @param {array o.aData The data for the row in question
* @param {array} o.aData The data for the row in question
* @param {object} o.oSettings The settings object for this DataTables instance
* @returns {string} The string you which to use in the display
* @default null
@@ -123,7 +123,7 @@ DataTable.models.oColumn = {
/**
* Function to set data for a cell in the column. You should <b>never</b>
* set the data directly to _aData internally in DataTables - always use
* this method. It allows mDataProp to function as required. This function
* this method. It allows mData to function as required. This function
* is automatically assigned by the column initialisation method
* @type function
* @param {array|object} oData The data array/object for the array
@@ -140,7 +140,17 @@ DataTable.models.oColumn = {
* @type function|int|string|null
* @default null
*/
"mDataProp": null,
"mData": null,
/**
* Partner property to mData which is used (only when defined) to get
* the data - i.e. it is basically the same as mData, but without the
* 'set' option, and also the data fed to it is the result from mData.
* This is the rendering method to match the data method of mData.
* @type function|int|string|null
* @default null
*/
"mRender": null,
/**
* Unique header TH/TD element for this column - this is what the sorting
@@ -181,7 +191,7 @@ DataTable.models.oColumn = {
/**
* Allows a default value to be given for a column's data, and will be used
* whenever a null data source is encountered (this can be because mDataProp
* whenever a null data source is encountered (this can be because mData
* is set to null, or because the data source itself is null).
* @type string
* @default null

View File

@@ -15,7 +15,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "aDataSort": [ 0, 1 ], "aTargets": [ 0 ] },
@@ -27,7 +27,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "aDataSort": [ 0, 1 ] },
@@ -52,7 +52,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "asSorting": [ "asc" ], "aTargets": [ 1 ] },
@@ -64,7 +64,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* null,
@@ -87,7 +87,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "bSearchable": false, "aTargets": [ 0 ] }
@@ -96,7 +96,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "bSearchable": false },
@@ -118,7 +118,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "bSortable": false, "aTargets": [ 0 ] }
@@ -127,7 +127,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "bSortable": false },
@@ -146,16 +146,16 @@ DataTable.defaults.columns = {
* (before rendering) for sorting and filtering (the default is to used the
* rendered data that the user can see). This may be useful for dates etc.
*
* *NOTE* It is it is advisable now to use mDataProp as a function and make
* use of the 'type' that it gives, allowing (potentially) different data to
* be used for sorting, filtering, display and type detection.
* *NOTE* This property is now deprecated, and it is suggested that you use
* mData and / or mRender to render data for the DataTable.
* @type boolean
* @default true
* @dtopt Columns
* @deprecated
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* {
@@ -171,7 +171,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* {
@@ -199,7 +199,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "bVisible": false, "aTargets": [ 0 ] }
@@ -208,7 +208,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "bVisible": false },
@@ -236,7 +236,7 @@ DataTable.defaults.columns = {
* @dtopt Columns
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [ {
* "aTargets": [3],
@@ -268,7 +268,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* {
@@ -283,7 +283,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "fnRender": function ( o, val ) {
@@ -310,7 +310,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "iDataSort": 1, "aTargets": [ 0 ] }
@@ -320,7 +320,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "iDataSort": 1 },
@@ -335,15 +335,24 @@ DataTable.defaults.columns = {
"iDataSort": -1,
/**
* This parameter has been replaced by mData in DataTables to ensure naming
* consistency. mDataProp can still be used, as there is backwards compatibility
* in DataTables for this option, but it is strongly recommended that you use
* mData in preference to mDataProp.
* @name DataTable.defaults.columns.mDataProp
*/
/**
* This property can be used to read data from any JSON data source property,
* including deeply nested objects / properties. mDataProp can be given in a
* including deeply nested objects / properties. mData can be given in a
* number of different ways which effect its behaviour:
* <ul>
* <li>integer - treated as an array index for the data source. This is the
* default that DataTables uses (incrementally increased for each column).</li>
* <li>string - read an object property from the data source. Note that you can
* use Javascript dotted notation to read deep properties/arrays from the
* use Javascript dotted notation to read deep properties / arrays from the
* data source.</li>
* <li>null - the sDefaultContent option will be used for the cell (null
* by default, so you will need to specify the default content you want -
@@ -364,34 +373,38 @@ DataTable.defaults.columns = {
* of call, but otherwise the return is what will be used for the data
* requested.</li>
* </ul>
*
* Note that prior to DataTables 1.9.2 mData was called mDataProp. The name change
* reflects the flexibility of this property and is consistent with the naming of
* mRender. If 'mDataProp' is given, then it will still be used by DataTables, as
* it automatically maps the old name to the new if required.
* @type string|int|function|null
* @default null <i>Use automatically calculated column index</i>
* @dtopt Columns
*
* @example
* // Read table data from objects
* $(document).ready(function() {
* $(document).ready( function() {
* var oTable = $('#example').dataTable( {
* "sAjaxSource": "sources/deep.txt",
* "aoColumns": [
* { "mDataProp": "engine" },
* { "mDataProp": "browser" },
* { "mDataProp": "platform.inner" },
* { "mDataProp": "platform.details.0" },
* { "mDataProp": "platform.details.1" }
* { "mData": "engine" },
* { "mData": "browser" },
* { "mData": "platform.inner" },
* { "mData": "platform.details.0" },
* { "mData": "platform.details.1" }
* ]
* } );
* } );
*
* @example
* // Using mDataProp as a function to provide different information for
* // Using mData as a function to provide different information for
* // sorting, filtering and display. In this case, currency (price)
* $(document).ready(function() {
* $(document).ready( function() {
* var oTable = $('#example').dataTable( {
* "aoColumnDefs": [
* {
* "aoColumnDefs": [ {
* "aTargets": [ 0 ],
* "mDataProp": function ( source, type, val ) {
* "mData": function ( source, type, val ) {
* if (type === 'set') {
* source.price = val;
* // Store the computed dislay and filter values for efficiency
@@ -408,11 +421,80 @@ DataTable.defaults.columns = {
* // 'sort', 'type' and undefined all just use the integer
* return source.price;
* }
* } ]
* } );
* } );
*/
"mData": null,
/**
* This property is the rendering partner to mData and it is suggested that
* when you want to manipulate data for display (including filtering, sorting etc)
* but not altering the underlying data for the table, use this property. mData
* can actually do everything this property can and more, but this parameter is
* easier to use since there is no 'set' option. Like mData is can be given
* in a number of different ways to effect its behaviour, with the addition of
* supporting array syntax for easy outputting of arrays (including arrays of
* objects):
* <ul>
* <li>integer - treated as an array index for the data source. This is the
* default that DataTables uses (incrementally increased for each column).</li>
* <li>string - read an object property from the data source. Note that you can
* use Javascript dotted notation to read deep properties / arrays from the
* data source and also array brackets to indicate that the data reader should
* loop over the data source array. When characters are given between the array
* brackets, these characters are used to join the data source array together.
* For example: "accounts[, ].name" would result in a comma separated list with
* the 'name' value from the 'accounts' array of objects.</li>
* <li>function - the function given will be executed whenever DataTables
* needs to set or get the data for a cell in the column. The function
* takes three parameters:
* <ul>
* <li>{array|object} The data source for the row (based on mData)</li>
* <li>{string} The type call data requested - this will be 'filter', 'display',
* 'type' or 'sort'.</li>
* <li>{array|object} The full data source for the row (not based on mData)</li>
* </ul>
* The return value from the function is what will be used for the data
* requested.</li>
* </ul>
* @type string|int|function|null
* @default null <i>Use mData</i>
* @dtopt Columns
*
* @example
* // Create a comma separated list from an array of objects
* $(document).ready( function() {
* var oTable = $('#example').dataTable( {
* "sAjaxSource": "sources/deep.txt",
* "aoColumns": [
* { "mData": "engine" },
* { "mData": "browser" },
* {
* "mData": "platform",
* "mRender": "[, ].name"
* }
* ]
* } );
* } );
*
* @example
* // Use as a function to create a link from the data source
* $(document).ready( function() {
* var oTable = $('#example').dataTable( {
* "aoColumnDefs": [
* {
* "aTargets": [ 0 ],
* "mData": "download_link",
* "mRender": function ( data, type, full ) {
* return '<a href="'+data+'">Download</a>';
* }
* ]
* } );
* } );
*/
"mDataProp": null,
"mRender": null,
/**
@@ -425,13 +507,12 @@ DataTable.defaults.columns = {
*
* @example
* // Make the first column use TH cells
* $(document).ready(function() {
* $(document).ready( function() {
* var oTable = $('#example').dataTable( {
* "aoColumnDefs": [
* {
* "aoColumnDefs": [ {
* "aTargets": [ 0 ],
* "sCellType": "th"
* ]
* } ]
* } );
* } );
*/
@@ -446,7 +527,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "sClass": "my_class", "aTargets": [ 0 ] }
@@ -456,7 +537,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "sClass": "my_class" },
@@ -487,7 +568,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* null,
@@ -505,7 +586,7 @@ DataTable.defaults.columns = {
/**
* Allows a default value to be given for a column's data, and will be used
* whenever a null data source is encountered (this can be because mDataProp
* whenever a null data source is encountered (this can be because mData
* is set to null, or because the data source itself is null).
* @type string
* @default null
@@ -513,11 +594,11 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* {
* "mDataProp": null,
* "mData": null,
* "sDefaultContent": "Edit",
* "aTargets": [ -1 ]
* }
@@ -527,14 +608,14 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* null,
* null,
* null,
* {
* "mDataProp": null,
* "mData": null,
* "sDefaultContent": "Edit"
* }
* ]
@@ -557,7 +638,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "sName": "engine", "aTargets": [ 0 ] },
@@ -571,7 +652,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "sName": "engine" },
@@ -588,7 +669,7 @@ DataTable.defaults.columns = {
/**
* Defines a data source type for the sorting which can be used to read
* realtime information from the table (updating the internally cached
* real-time information from the table (updating the internally cached
* version) prior to sorting. This allows sorting to occur on user editable
* elements such as form inputs.
* @type string
@@ -597,7 +678,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "sSortDataType": "dom-text", "aTargets": [ 2, 3 ] },
@@ -610,7 +691,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* null,
@@ -635,7 +716,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "sTitle": "My column title", "aTargets": [ 0 ] }
@@ -645,7 +726,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "sTitle": "My column title" },
@@ -674,7 +755,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "sType": "html", "aTargets": [ 0 ] }
@@ -684,7 +765,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "sType": "html" },
@@ -701,7 +782,7 @@ DataTable.defaults.columns = {
/**
* Defining the width of the column, this parameter may take any CSS value
* (3em, 20px etc). DataTables applys 'smart' widths to columns which have not
* (3em, 20px etc). DataTables apples 'smart' widths to columns which have not
* been given a specific width through this interface ensuring that the table
* remains readable.
* @type string
@@ -710,7 +791,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "sWidth": "20%", "aTargets": [ 0 ] }
@@ -720,7 +801,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "sWidth": "20%" },

View File

@@ -34,7 +34,7 @@ DataTable.defaults = {
* } );
*
* @example
* // Using an array of objects as a data source (mDataProp)
* // Using an array of objects as a data source (mData)
* $(document).ready( function () {
* $('#example').dataTable( {
* "aaData": [
@@ -54,11 +54,11 @@ DataTable.defaults = {
* }
* ],
* "aoColumns": [
* { "sTitle": "Engine", "mDataProp": "engine" },
* { "sTitle": "Browser", "mDataProp": "browser" },
* { "sTitle": "Platform", "mDataProp": "platform" },
* { "sTitle": "Version", "mDataProp": "version" },
* { "sTitle": "Grade", "mDataProp": "grade" }
* { "sTitle": "Engine", "mData": "engine" },
* { "sTitle": "Browser", "mData": "browser" },
* { "sTitle": "Platform", "mData": "platform" },
* { "sTitle": "Version", "mData": "version" },
* { "sTitle": "Grade", "mData": "grade" }
* ]
* } );
* } );
@@ -127,7 +127,7 @@ DataTable.defaults = {
* @dtopt Option
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
* } );
@@ -137,7 +137,7 @@ DataTable.defaults = {
* // Setting the default display length as well as length menu
* // This is likely to be wanted if you remove the '10' option which
* // is the iDisplayLength default.
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "iDisplayLength": 25,
* "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]]
@@ -209,7 +209,7 @@ DataTable.defaults = {
* array may be of any length, and DataTables will apply each class
* sequentially, looping when required.
* @type array
* @default null <i>Will take the values determinted by the oClasses.sStripe*
* @default null <i>Will take the values determined by the oClasses.sStripe*
* options</i>
* @dtopt Option
*
@@ -252,7 +252,7 @@ DataTable.defaults = {
* @dtopt Features
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* var oTable = $('#example').dataTable( {
* "sAjaxSource": "sources/arrays.txt",
* "bDeferRender": true
@@ -272,7 +272,7 @@ DataTable.defaults = {
* @dtopt Options
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "sScrollY": "200px",
* "bPaginate": false
@@ -411,7 +411,7 @@ DataTable.defaults = {
* @dtopt Options
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* initTable();
* tableActions();
* } );
@@ -443,7 +443,7 @@ DataTable.defaults = {
* @dtopt Options
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bScrollAutoCss": false,
* "sScrollY": "200px"
@@ -465,7 +465,7 @@ DataTable.defaults = {
* @dtopt Options
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "sScrollY": "200",
* "bScrollCollapse": true
@@ -487,7 +487,7 @@ DataTable.defaults = {
* @dtopt Features
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bScrollInfinite": true,
* "bScrollCollapse": true,
@@ -544,7 +544,7 @@ DataTable.defaults = {
* @dtopt Options
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bSortCellsTop": true
* } );
@@ -631,7 +631,7 @@ DataTable.defaults = {
* @dtopt Callbacks
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "fnCreatedRow": function( nRow, aData, iDataIndex ) {
* // Bold the grade for all 'A' grade browsers
@@ -704,7 +704,7 @@ DataTable.defaults = {
* @dtopt Callbacks
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "fnFormatNumber": function ( iIn ) {
* if ( iIn &lt; 1000 ) {
@@ -863,7 +863,7 @@ DataTable.defaults = {
* @dtopt Callbacks
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
* // Bold the grade for all 'A' grade browsers
@@ -896,13 +896,13 @@ DataTable.defaults = {
*
* @example
* // POST data to server
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bProcessing": true,
* "bServerSide": true,
* "sAjaxSource": "xhr.php",
* "fnServerData": function ( sSource, aoData, fnCallback ) {
* $.ajax( {
* "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
* oSettings.jqXHR = $.ajax( {
* "dataType": 'json',
* "type": "POST",
* "url": sSource,
@@ -918,7 +918,11 @@ DataTable.defaults = {
"url": sUrl,
"data": aoData,
"success": function (json) {
$(oSettings.oInstance).trigger('xhr', oSettings);
if ( json.sError ) {
oSettings.oApi._fnLog( oSettings, 0, json.sError );
}
$(oSettings.oInstance).trigger('xhr', [oSettings, json]);
fnCallback( json );
},
"dataType": "json",
@@ -952,7 +956,7 @@ DataTable.defaults = {
* @dtopt Server-side
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bProcessing": true,
* "bServerSide": true,
@@ -977,10 +981,10 @@ DataTable.defaults = {
* @dtopt Callbacks
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bStateSave": true,
* "fnStateLoad": function (oSettings, oData) {
* "fnStateLoad": function (oSettings) {
* var o;
*
* // Send an Ajax request to the server to get the data. Note that
@@ -1027,21 +1031,23 @@ DataTable.defaults = {
*
* @example
* // Remove a saved filter, so filtering is never loaded
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bStateSave": true,
* "fnStateLoadParams": function (oSettings, oData) {
* oData.oSearch.sSearch = "";
* }
* } );
* } );
*
* @example
* // Disallow state loading by returning false
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bStateSave": true,
* "fnStateLoadParams": function (oSettings, oData) {
* return false;
* }
* } );
* } );
*/
@@ -1058,11 +1064,12 @@ DataTable.defaults = {
*
* @example
* // Show an alert with the filtering value that was saved
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bStateSave": true,
* "fnStateLoaded": function (oSettings, oData) {
* alert( 'Saved filter was: '+oData.oSearch.sSearch );
* }
* } );
* } );
*/
@@ -1080,7 +1087,7 @@ DataTable.defaults = {
* @dtopt Callbacks
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bStateSave": true,
* "fnStateSave": function (oSettings, oData) {
@@ -1120,11 +1127,12 @@ DataTable.defaults = {
*
* @example
* // Remove a saved filter, so filtering is never saved
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bStateSave": true,
* "fnStateSaveParams": function (oSettings, oData) {
* oData.oSearch.sSearch = "";
* }
* } );
* } );
*/
@@ -1141,7 +1149,7 @@ DataTable.defaults = {
* @example
* $(document).ready( function() {
* $('#example').dataTable( {
* "iCookieDuration": 60*60*24 // 1 day
* "iCookieDuration": 60*60*24; // 1 day
* } );
* } )
*/
@@ -1166,7 +1174,7 @@ DataTable.defaults = {
*
* @example
* // 57 records available in the table, no filtering applied
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bServerSide": true,
* "sAjaxSource": "scripts/server_processing.php",
@@ -1176,7 +1184,7 @@ DataTable.defaults = {
*
* @example
* // 57 records after filtering, 100 without filtering (an initial filter applied)
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bServerSide": true,
* "sAjaxSource": "scripts/server_processing.php",
@@ -1237,7 +1245,7 @@ DataTable.defaults = {
* @dtopt Options
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bScrollInfinite": true,
* "bScrollCollapse": true,
@@ -1261,7 +1269,7 @@ DataTable.defaults = {
* @dtopt Options
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "iTabIndex": 1
* } );
@@ -1293,7 +1301,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "oAria": {
@@ -1314,7 +1322,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "oAria": {
@@ -1341,7 +1349,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "oPaginate": {
@@ -1362,7 +1370,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "oPaginate": {
@@ -1383,7 +1391,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "oPaginate": {
@@ -1404,7 +1412,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "oPaginate": {
@@ -1427,7 +1435,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sEmptyTable": "No data available in table"
@@ -1448,7 +1456,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sInfo": "Got a total of _TOTAL_ entries to show (_START_ to _END_)"
@@ -1467,7 +1475,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sInfoEmpty": "No entries to show"
@@ -1487,7 +1495,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sInfoFiltered": " - filtering from _MAX_ records"
@@ -1508,7 +1516,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sInfoPostFix": "All records shown are derived from real information."
@@ -1529,7 +1537,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sInfoThousands": "'"
@@ -1551,7 +1559,7 @@ DataTable.defaults = {
*
* @example
* // Language change only
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sLengthMenu": "Display _MENU_ records"
@@ -1561,7 +1569,7 @@ DataTable.defaults = {
*
* @example
* // Language and options change
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sLengthMenu": 'Display <select>'+
@@ -1609,7 +1617,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sProcessing": "DataTables is currently busy"
@@ -1632,7 +1640,7 @@ DataTable.defaults = {
*
* @example
* // Input text box will be appended at the end automatically
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sSearch": "Filter records:"
@@ -1642,7 +1650,7 @@ DataTable.defaults = {
*
* @example
* // Specify where the filter should appear
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sSearch": "Apply filter _INPUT_ to table"
@@ -1665,7 +1673,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sUrl": "http://www.sprymedia.co.uk/dataTables/lang.txt"
@@ -1685,7 +1693,7 @@ DataTable.defaults = {
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "sZeroRecords": "No records to display"
@@ -1731,7 +1739,7 @@ DataTable.defaults = {
*
* @example
* // Get data from { "data": [...] }
* $(document).ready(function() {
* $(document).ready( function() {
* var oTable = $('#example').dataTable( {
* "sAjaxSource": "sources/data.txt",
* "sAjaxDataProp": "data"
@@ -1740,7 +1748,7 @@ DataTable.defaults = {
*
* @example
* // Get data from { "data": { "inner": [...] } }
* $(document).ready(function() {
* $(document).ready( function() {
* var oTable = $('#example').dataTable( {
* "sAjaxSource": "sources/data.txt",
* "sAjaxDataProp": "data.inner"
@@ -1778,7 +1786,7 @@ DataTable.defaults = {
* @dtopt Options
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "sCookiePrefix": "my_datatable_",
* } );
@@ -1830,9 +1838,9 @@ DataTable.defaults = {
* @dtopt Options
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "sDom": '&lt;"top"i&gt;rt&lt;"bottom"flp&gt;&lt;"clear"&lgt;'
* "sDom": '&lt;"top"i&gt;rt&lt;"bottom"flp&gt;&lt;"clear"&gt;'
* } );
* } );
*/
@@ -1868,7 +1876,7 @@ DataTable.defaults = {
* @dtopt Features
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "sScrollX": "100%",
* "bScrollCollapse": true
@@ -1890,7 +1898,7 @@ DataTable.defaults = {
* @dtopt Options
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "sScrollX": "100%",
* "sScrollXInner": "110%"
@@ -1912,7 +1920,7 @@ DataTable.defaults = {
* @dtopt Features
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "sScrollY": "200px",
* "bPaginate": false
@@ -1931,7 +1939,7 @@ DataTable.defaults = {
* @dtopt Server-side
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bServerSide": true,
* "sAjaxSource": "scripts/post.php",

View File

@@ -92,8 +92,8 @@ DataTable.models.ext = {
* </il>
* </ul>
*
* Note that as of v1.9, it is typically preferable to use <i>mDataProp</i> to prepare data for
* the different uses that DataTables can put the data to. Specifically <i>mDataProp</i> when
* Note that as of v1.9, it is typically preferable to use <i>mData</i> to prepare data for
* the different uses that DataTables can put the data to. Specifically <i>mData</i> when
* used as a function will give you a 'type' (sorting, filtering etc) that you can use to
* prepare the data as required for the different types. As such, this method is deprecated.
* @type array
@@ -258,8 +258,8 @@ DataTable.models.ext = {
* </il>
* </ul>
*
* Note that as of v1.9, it is typically preferable to use <i>mDataProp</i> to prepare data for
* the different uses that DataTables can put the data to. Specifically <i>mDataProp</i> when
* Note that as of v1.9, it is typically preferable to use <i>mData</i> to prepare data for
* the different uses that DataTables can put the data to. Specifically <i>mData</i> when
* used as a function will give you a 'type' (sorting, filtering etc) that you can use to
* prepare the data as required for the different types. As such, this method is deprecated.
* @type object

View File

@@ -18,7 +18,7 @@ DataTable.models.oRow = {
/**
* Data object from the original data source for the row. This is either
* an array if using the traditional form of DataTables, or an object if
* using mDataProp options. The exact type will depend on the passed in
* using mData options. The exact type will depend on the passed in
* data from the data source, or will be an array if using DOM a data
* source.
* @type array|object

View File

@@ -223,11 +223,25 @@ DataTable.models.oSettings = {
* Information callback function. See
* {@link DataTable.defaults.fnInfoCallback}
* @type function
* @default
* @default null
*/
"fnInfoCallback": null
},
/**
* Browser support parameters
* @namespace
*/
"oBrowser": {
/**
* Indicate if the browser incorrectly calculates width:100% inside a
* scrolling element (IE6/7)
* @type boolean
* @default false
*/
"bScrollOversize": false
},
/**
* Array referencing the nodes which are used for the features. The
* parameters of this object match what is allowed by sDom - i.e.

View File

@@ -0,0 +1,103 @@
// DATA_TEMPLATE: empty_table
oTest.fnStart( "5396 - fnUpdate with 2D arrays for a single row" );
$(document).ready( function () {
$('#example thead tr').append( '<th>6</th>' );
$('#example thead tr').append( '<th>7</th>' );
$('#example thead tr').append( '<th>8</th>' );
$('#example thead tr').append( '<th>9</th>' );
$('#example thead tr').append( '<th>10</th>' );
var aDataSet = [
[
"1",
"홍길동",
"1154315",
"etc1",
[
[ "test1@daum.net", "2011-03-04" ],
[ "test1@naver.com", "2009-07-06" ],
[ "test4@naver.com", ",hide" ],
[ "test5?@naver.com", "" ]
],
"2011-03-04",
"show"
],
[
"2",
"홍길순",
"2154315",
"etc2",
[
[ "test2@daum.net", "2009-09-26" ],
[ "test2@naver.com", "2009-05-21,hide" ],
[ "lsb@naver.com", "2010-03-05" ],
[ "lsb3@naver.com", ",hide" ],
[ "sooboklee9@daum.net", "2010-03-05" ]
],
"2010-03-05",
"show"
]
]
var oTable = $('#example').dataTable({
"aaData": aDataSet,
"aoColumns": [
{ "mData": "0"},
{ "mData": "1"},
{ "mData": "2"},
{ "mData": "3"},
{ "mData": "4.0.0"},
{ "mData": "4.0.1"},
{ "mData": "4.1.0"},
{ "mData": "4.1.1"},
{ "mData": "5"},
{ "mData": "6"}
]
});
oTest.fnTest(
"Initialisation",
null,
function () {
return $('#example tbody tr:eq(0) td:eq(0)').html() == '1';
}
);
oTest.fnTest(
"Update row",
function () {
$('#example').dataTable().fnUpdate( [
"0",
"홍길순",
"2154315",
"etc2",
[
[ "test2@daum.net", "2009-09-26" ],
[ "test2@naver.com", "2009-05-21,hide" ],
[ "lsb@naver.com", "2010-03-05" ],
[ "lsb3@naver.com", ",hide" ],
[ "sooboklee9@daum.net", "2010-03-05" ]
],
"2010-03-05",
"show"
], 1 );
},
function () {
return $('#example tbody tr:eq(0) td:eq(0)').html() == '0';
}
);
oTest.fnTest(
"Original row preserved",
null,
function () {
return $('#example tbody tr:eq(1) td:eq(0)').html() == '1';
}
);
oTest.fnComplete();
} );

View File

@@ -0,0 +1,399 @@
// DATA_TEMPLATE: dom_data
oTest.fnStart( "Check behaviour of the data get functions that DataTables uses" );
$(document).ready( function () {
// Slightly unusual test set this one, in that we don't really care about the DOM
// but want to test the internal data handling functions but we do need a table to
// get at the functions!
var table = $('#example').dataTable();
var fn, test;
// Object property access
oTest.fnTest(
"Single object, single property",
function () {
fn = table.oApi._fnGetObjectDataFn('test');
test = fn( { "test": true } );
},
function () { return test }
);
oTest.fnTest(
"Single property from object",
function () {
fn = table.oApi._fnGetObjectDataFn('test');
test = fn( { "test": true, "test2": false } );
},
function () { return test }
);
oTest.fnTest(
"Single property from object - different property",
function () {
fn = table.oApi._fnGetObjectDataFn('test2');
test = fn( { "test": true, "test2": false } );
},
function () { return test===false }
);
oTest.fnTest(
"Undefined property from object",
function () {
fn = table.oApi._fnGetObjectDataFn('test3');
test = fn( { "test": true, "test2": false } );
},
function () { return test===undefined }
);
// Array index access
oTest.fnTest(
"Array access - index 0",
function () {
fn = table.oApi._fnGetObjectDataFn(0);
test = fn( [true, false, false, false] );
},
function () { return test }
);
oTest.fnTest(
"Array access - index 1",
function () {
fn = table.oApi._fnGetObjectDataFn(2);
test = fn( [false, false, true, false] );
},
function () { return test }
);
oTest.fnTest(
"Array access - undefined",
function () {
fn = table.oApi._fnGetObjectDataFn(7);
test = fn( [false, false, true, false] );
},
function () { return test===undefined }
);
// null source
oTest.fnTest(
"null source",
function () {
fn = table.oApi._fnGetObjectDataFn( null );
test = fn( [false, false, true, false] );
},
function () { return test===null }
);
// nested objects
oTest.fnTest(
"Nested object property",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a.b' );
test = fn( {
"a":{
"b": true,
"c": false,
"d": 1
}
} );
},
function () { return test }
);
oTest.fnTest(
"Nested object property - different prop",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a.d' );
test = fn( {
"a":{
"b": true,
"c": false,
"d": 1
}
} );
},
function () { return test===1 }
);
oTest.fnTest(
"Nested object property - undefined prop",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a.z' );
test = fn( {
"a":{
"b": true,
"c": false,
"d": 1
}
} );
},
function () { return test===undefined }
);
// Nested array
oTest.fnTest(
"Nested array index property",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a.0' );
test = fn( {
"a": [
true,
false,
1
]
} );
},
function () { return test }
);
oTest.fnTest(
"Nested array index property - different index",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a.2' );
test = fn( {
"a": [
true,
false,
1
]
} );
},
function () { return test===1 }
);
oTest.fnTest(
"Nested array index property - undefined index",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a.10' );
test = fn( {
"a": [
true,
false,
1
]
} );
},
function () { return test===undefined }
);
// Nested array object property
oTest.fnTest(
"Nested array index object property",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a.0.m' );
test = fn( {
"a": [
{ "m": true, "n": 1 },
{ "m": false, "n": 2 },
{ "m": false, "n": 3 }
]
} );
},
function () { return test }
);
oTest.fnTest(
"Nested array index object property - different index",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a.2.n' );
test = fn( {
"a": [
{ "m": true, "n": 1 },
{ "m": false, "n": 2 },
{ "m": false, "n": 3 }
]
} );
},
function () { return test===3 }
);
oTest.fnTest(
"Nested array index object property - undefined index",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a.0.z' );
test = fn( {
"a": [
{ "m": true, "n": 1 },
{ "m": false, "n": 2 },
{ "m": false, "n": 3 }
]
} );
},
function () { return test===undefined }
);
// Array notation - no join
oTest.fnTest(
"Array notation - no join - property",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a[].n' );
test = fn( {
"a": [
{ "m": true, "n": 1 },
{ "m": false, "n": 2 },
{ "m": false, "n": 3 }
]
} );
},
function () {
return test.length===3 && test[0]===1
&& test[1]===2 && test[2]===3;
}
);
oTest.fnTest(
"Array notation - no join - property (2)",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a[].m' );
test = fn( {
"a": [
{ "m": true, "n": 1 },
{ "m": false, "n": 2 }
]
} );
},
function () {
return test.length===2 && test[0]===true
&& test[1]===false;
}
);
oTest.fnTest(
"Array notation - no join - undefined property",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a[].z' );
test = fn( {
"a": [
{ "m": true, "n": 1 },
{ "m": false, "n": 2 }
]
} );
},
function () {
return test.length===2 && test[0]===undefined
&& test[1]===undefined;
}
);
// Array notation - join
oTest.fnTest(
"Array notation - space join - property",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a[ ].n' );
test = fn( {
"a": [
{ "m": true, "n": 1 },
{ "m": false, "n": 2 },
{ "m": false, "n": 3 }
]
} );
},
function () { return test === '1 2 3'; }
);
oTest.fnTest(
"Array notation - space join - property (2)",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a[ ].m' );
test = fn( {
"a": [
{ "m": true, "n": 1 },
{ "m": false, "n": 2 }
]
} );
},
function () { return test === 'true false'; }
);
oTest.fnTest(
"Array notation - sapce join - undefined property",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a[ ].z' );
test = fn( {
"a": [
{ "m": true, "n": 1 },
{ "m": false, "n": 2 }
]
} );
},
function () { return test === ' '; }
);
oTest.fnTest(
"Array notation - string join - property",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a[qwerty].n' );
test = fn( {
"a": [
{ "m": true, "n": 1 },
{ "m": false, "n": 2 },
{ "m": false, "n": 3 }
]
} );
},
function () { return test === '1qwerty2qwerty3'; }
);
oTest.fnTest(
"Array notation - string join - property (2)",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a[qwerty].m' );
test = fn( {
"a": [
{ "m": true, "n": 1 },
{ "m": false, "n": 2 }
]
} );
},
function () { return test === 'trueqwertyfalse'; }
);
// Array alone join
oTest.fnTest(
"Flat array join",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a[ ]' );
test = fn( {
"a": [
true,
false,
1
]
} );
},
function () { return test==="true false 1"; }
);
oTest.fnTest(
"Flat array string join",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a[qwerty]' );
test = fn( {
"a": [
true,
false,
1
]
} );
},
function () { return test==="trueqwertyfalseqwerty1"; }
);
oTest.fnTest(
"Flat array no join",
function () {
fn = table.oApi._fnGetObjectDataFn( 'a[]' );
test = fn( {
"a": [
true,
false,
1
]
} );
},
function () { return test.length===3 && test[0]===true &&
test[1]===false && test[2]===1; }
);
oTest.fnComplete();
} );

View File

@@ -0,0 +1,190 @@
// DATA_TEMPLATE: dom_data
oTest.fnStart( "Check behaviour of the data set functions that DataTables uses" );
$(document).ready( function () {
// Slightly unusual test set this one, in that we don't really care about the DOM
// but want to test the internal data handling functions but we do need a table to
// get at the functions!
var table = $('#example').dataTable();
var fn, test, o;
// Object property access
oTest.fnTest(
"Create property",
function () {
fn = table.oApi._fnSetObjectDataFn('test');
o = {};
fn( o, true );
},
function () { return o.test }
);
oTest.fnTest(
"Single property doesn't kill other properties",
function () {
fn = table.oApi._fnSetObjectDataFn('test');
o = {
"test2": false
};
fn( o, true );
},
function () { return o.test && o.test2===false; }
);
oTest.fnTest(
"Single property overwrite old property",
function () {
fn = table.oApi._fnSetObjectDataFn('test');
o = {
"test": false,
"test2": false
};
fn( o, true );
},
function () { return o.test && o.test2===false; }
);
// Nested
oTest.fnTest(
"Create nested property",
function () {
fn = table.oApi._fnSetObjectDataFn('test.inner');
o = {
"test": {}
};
fn( o, true );
},
function () { return o.test.inner }
);
oTest.fnTest(
"Deep create nested property",
function () {
fn = table.oApi._fnSetObjectDataFn('test.inner');
o = {};
fn( o, true );
},
function () { return o.test.inner }
);
oTest.fnTest(
"Nested property doesn't kill other properties",
function () {
fn = table.oApi._fnSetObjectDataFn('test.inner');
o = {
"test": {
"test2": false
}
};
fn( o, true );
},
function () { return o.test.inner && o.test.test2===false; }
);
oTest.fnTest(
"Single property overwrite old property",
function () {
fn = table.oApi._fnSetObjectDataFn('nested.test');
o = {
"nested": {
"test": false,
"test2": false
}
};
fn( o, true );
},
function () { return o.nested.test && o.nested.test2===false; }
);
// Set arrays / objects
oTest.fnTest(
"Create object",
function () {
fn = table.oApi._fnSetObjectDataFn('test');
o = {};
fn( o, {"a":true, "b":false} );
},
function () { return o.test.a && o.test.b===false }
);
oTest.fnTest(
"Create nested object",
function () {
fn = table.oApi._fnSetObjectDataFn('nested.test');
o = {};
fn( o, {"a":true, "b":false} );
},
function () { return o.nested.test.a && o.nested.test.b===false }
);
oTest.fnTest(
"Create array",
function () {
fn = table.oApi._fnSetObjectDataFn('test');
o = {};
fn( o, [1,2,3] );
},
function () { return o.test[0]===1 && o.test[2]===3 }
);
oTest.fnTest(
"Create nested array",
function () {
fn = table.oApi._fnSetObjectDataFn('nested.test');
o = {};
fn( o, [1,2,3] );
},
function () { return o.nested.test[0]===1 && o.nested.test[2]===3 }
);
// Array notation
oTest.fnTest(
"Create array of objects",
function () {
fn = table.oApi._fnSetObjectDataFn('test[].a');
o = {};
fn( o, [1,2,3] );
},
function () { return o.test.length===3 && o.test[0].a===1 && o.test[1].a===2; }
);
oTest.fnTest(
"Create array of nested objects",
function () {
fn = table.oApi._fnSetObjectDataFn('test[].a.b');
o = {};
fn( o, [1,2,3] );
},
function () { return o.test.length===3 && o.test[0].a.b===1 && o.test[1].a.b===2; }
);
oTest.fnTest(
"Create array",
function () {
fn = table.oApi._fnSetObjectDataFn('test[]');
o = {};
fn( o, [1,2,3] );
},
function () { return o.test.length===3 && o.test[0]===1 && o.test[1]===2; }
);
oTest.fnComplete();
} );

View File

@@ -0,0 +1,76 @@
// DATA_TEMPLATE: empty_table
oTest.fnStart( "39 - nested null values" );
$(document).ready( function () {
var test = false;
$.fn.dataTable.ext.sErrMode = "throw";
oTest.fnTest(
"No default content throws an error",
function () {
try {
$('#example').dataTable( {
"aaData": [
{ "a": "0", "b": {"c": 0} },
{ "a": "1", "b": {"c": 3} },
{ "a": "2", "b": null }
],
"aoColumns": [
{ "mDataProp": "a" },
{ "mDataProp": "b" },
{ "mDataProp": "b.c" }
]
} );
}
catch(err) {
test = true;
}
},
function () { return test; }
);
oTest.fnTest(
"Table renders",
function () {
oSession.fnRestore();
$('#example').dataTable( {
"aaData": [
{ "a": "0", "b": {"c": 0} },
{ "a": "1", "b": {"c": 3} },
{ "a": "2", "b": null }
],
"aoColumns": [
{ "mDataProp": "a" },
{ "mDataProp": "b" },
{ "mDataProp": "b.c", "sDefaultContent": "allan" }
]
} );
},
function () { return $('#example tbody td:eq(0)').html() === "0"; }
);
oTest.fnTest(
"Default content applied",
function () {
oSession.fnRestore();
$('#example').dataTable( {
"aaData": [
{ "a": "0", "b": {"c": 0} },
{ "a": "1", "b": {"c": 3} },
{ "a": "2", "b": null }
],
"aoColumns": [
{ "mDataProp": "a" },
{ "mDataProp": "b" },
{ "mDataProp": "b.c", "sDefaultContent": "allan" }
]
} );
},
function () { return $('#example tbody td:eq(8)').html() === "allan"; }
);
oTest.fnComplete();
} );

View File

@@ -22,11 +22,11 @@ oTest.fnTest(
$(document).ready( function () {
var oInit = {
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaData": [
{

View File

@@ -24,9 +24,9 @@ $(document).ready( function () {
"aoColumns": [
null,
null,
{ "mDataProp": 2 },
{ "mDataProp": "3.version" },
{ "mDataProp": "3.grade" }
{ "mData": 2 },
{ "mData": "3.version" },
{ "mData": "3.grade" }
],
"aaData": [
[

View File

@@ -22,11 +22,11 @@ oTest.fnTest(
$(document).ready( function () {
var oInit = {
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform.inner" },
{ "mDataProp": "platform.details.0" },
{ "mDataProp": "platform.details.1" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform.inner" },
{ "mData": "platform.details.0" },
{ "mData": "platform.details.1" }
],
"aaData": [
{

View File

@@ -0,0 +1,847 @@
// DATA_TEMPLATE: empty_table
oTest.fnStart( "Sanity checks for DataTables with data from JS - Object data source" );
oTest.fnTest(
"jQuery.dataTable function",
null,
function () { return typeof jQuery().dataTable == "function"; }
);
oTest.fnTest(
"jQuery.dataTableSettings storage array",
null,
function () { return typeof jQuery().dataTableSettings == "object"; }
);
oTest.fnTest(
"jQuery.dataTableExt plugin object",
null,
function () { return typeof jQuery().dataTableExt == "object"; }
);
$(document).ready( function () {
var oInit = {
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
],
"aaData": [
{
"engine": "Trident",
"browser": "Internet Explorer 4.0",
"platform": "Win 95+",
"version": "4",
"grade": "X"
},
{
"engine": "Trident",
"browser": "Internet Explorer 5.0",
"platform": "Win 95+",
"version": "5",
"grade": "C"
},
{
"engine": "Trident",
"browser": "Internet Explorer 5.5",
"platform": "Win 95+",
"version": "5.5",
"grade": "A"
},
{
"engine": "Trident",
"browser": "Internet Explorer 6",
"platform": "Win 98+",
"version": "6",
"grade": "A"
},
{
"engine": "Trident",
"browser": "Internet Explorer 7",
"platform": "Win XP SP2+",
"version": "7",
"grade": "A"
},
{
"engine": "Trident",
"browser": "AOL browser (AOL desktop)",
"platform": "Win XP",
"version": "6",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Firefox 1.0",
"platform": "Win 98+ / OSX.2+",
"version": "1.7",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Firefox 1.5",
"platform": "Win 98+ / OSX.2+",
"version": "1.8",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Firefox 2.0",
"platform": "Win 98+ / OSX.2+",
"version": "1.8",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Firefox 3.0",
"platform": "Win 2k+ / OSX.3+",
"version": "1.9",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Camino 1.0",
"platform": "OSX.2+",
"version": "1.8",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Camino 1.5",
"platform": "OSX.3+",
"version": "1.8",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Netscape 7.2",
"platform": "Win 95+ / Mac OS 8.6-9.2",
"version": "1.7",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Netscape Browser 8",
"platform": "Win 98SE+",
"version": "1.7",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Netscape Navigator 9",
"platform": "Win 98+ / OSX.2+",
"version": "1.8",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Mozilla 1.0",
"platform": "Win 95+ / OSX.1+",
"version": "1",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Mozilla 1.1",
"platform": "Win 95+ / OSX.1+",
"version": "1.1",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Mozilla 1.2",
"platform": "Win 95+ / OSX.1+",
"version": "1.2",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Mozilla 1.3",
"platform": "Win 95+ / OSX.1+",
"version": "1.3",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Mozilla 1.4",
"platform": "Win 95+ / OSX.1+",
"version": "1.4",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Mozilla 1.5",
"platform": "Win 95+ / OSX.1+",
"version": "1.5",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Mozilla 1.6",
"platform": "Win 95+ / OSX.1+",
"version": "1.6",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Mozilla 1.7",
"platform": "Win 98+ / OSX.1+",
"version": "1.7",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Mozilla 1.8",
"platform": "Win 98+ / OSX.1+",
"version": "1.8",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Seamonkey 1.1",
"platform": "Win 98+ / OSX.2+",
"version": "1.8",
"grade": "A"
},
{
"engine": "Gecko",
"browser": "Epiphany 2.20",
"platform": "Gnome",
"version": "1.8",
"grade": "A"
},
{
"engine": "Webkit",
"browser": "Safari 1.2",
"platform": "OSX.3",
"version": "125.5",
"grade": "A"
},
{
"engine": "Webkit",
"browser": "Safari 1.3",
"platform": "OSX.3",
"version": "312.8",
"grade": "A"
},
{
"engine": "Webkit",
"browser": "Safari 2.0",
"platform": "OSX.4+",
"version": "419.3",
"grade": "A"
},
{
"engine": "Webkit",
"browser": "Safari 3.0",
"platform": "OSX.4+",
"version": "522.1",
"grade": "A"
},
{
"engine": "Webkit",
"browser": "OmniWeb 5.5",
"platform": "OSX.4+",
"version": "420",
"grade": "A"
},
{
"engine": "Webkit",
"browser": "iPod Touch / iPhone",
"platform": "iPod",
"version": "420.1",
"grade": "A"
},
{
"engine": "Webkit",
"browser": "S60",
"platform": "S60",
"version": "413",
"grade": "A"
},
{
"engine": "Presto",
"browser": "Opera 7.0",
"platform": "Win 95+ / OSX.1+",
"version": "-",
"grade": "A"
},
{
"engine": "Presto",
"browser": "Opera 7.5",
"platform": "Win 95+ / OSX.2+",
"version": "-",
"grade": "A"
},
{
"engine": "Presto",
"browser": "Opera 8.0",
"platform": "Win 95+ / OSX.2+",
"version": "-",
"grade": "A"
},
{
"engine": "Presto",
"browser": "Opera 8.5",
"platform": "Win 95+ / OSX.2+",
"version": "-",
"grade": "A"
},
{
"engine": "Presto",
"browser": "Opera 9.0",
"platform": "Win 95+ / OSX.3+",
"version": "-",
"grade": "A"
},
{
"engine": "Presto",
"browser": "Opera 9.2",
"platform": "Win 88+ / OSX.3+",
"version": "-",
"grade": "A"
},
{
"engine": "Presto",
"browser": "Opera 9.5",
"platform": "Win 88+ / OSX.3+",
"version": "-",
"grade": "A"
},
{
"engine": "Presto",
"browser": "Opera for Wii",
"platform": "Wii",
"version": "-",
"grade": "A"
},
{
"engine": "Presto",
"browser": "Nokia N800",
"platform": "N800",
"version": "-",
"grade": "A"
},
{
"engine": "Presto",
"browser": "Nintendo DS browser",
"platform": "Nintendo DS",
"version": "8.5",
"grade": "C/A<sup>1</sup>"
},
{
"engine": "KHTML",
"browser": "Konqureror 3.1",
"platform": "KDE 3.1",
"version": "3.1",
"grade": "C"
},
{
"engine": "KHTML",
"browser": "Konqureror 3.3",
"platform": "KDE 3.3",
"version": "3.3",
"grade": "A"
},
{
"engine": "KHTML",
"browser": "Konqureror 3.5",
"platform": "KDE 3.5",
"version": "3.5",
"grade": "A"
},
{
"engine": "Tasman",
"browser": "Internet Explorer 4.5",
"platform": "Mac OS 8-9",
"version": "-",
"grade": "X"
},
{
"engine": "Tasman",
"browser": "Internet Explorer 5.1",
"platform": "Mac OS 7.6-9",
"version": "1",
"grade": "C"
},
{
"engine": "Tasman",
"browser": "Internet Explorer 5.2",
"platform": "Mac OS 8-X",
"version": "1",
"grade": "C"
},
{
"engine": "Misc",
"browser": "NetFront 3.1",
"platform": "Embedded devices",
"version": "-",
"grade": "C"
},
{
"engine": "Misc",
"browser": "NetFront 3.4",
"platform": "Embedded devices",
"version": "-",
"grade": "A"
},
{
"engine": "Misc",
"browser": "Dillo 0.8",
"platform": "Embedded devices",
"version": "-",
"grade": "X"
},
{
"engine": "Misc",
"browser": "Links",
"platform": "Text only",
"version": "-",
"grade": "X"
},
{
"engine": "Misc",
"browser": "Lynx",
"platform": "Text only",
"version": "-",
"grade": "X"
},
{
"engine": "Misc",
"browser": "IE Mobile",
"platform": "Windows Mobile 6",
"version": "-",
"grade": "C"
},
{
"engine": "Misc",
"browser": "PSP browser",
"platform": "PSP",
"version": "-",
"grade": "C"
},
{
"engine": "Other browsers",
"browser": "All others",
"platform": "-",
"version": "-",
"grade": "U"
}
]
};
$('#example').dataTable( oInit );
/* Basic checks */
oTest.fnWaitTest(
"Length changing div exists",
null,
function () { return document.getElementById('example_length') != null; }
);
oTest.fnTest(
"Filtering div exists",
null,
function () { return document.getElementById('example_filter') != null; }
);
oTest.fnTest(
"Information div exists",
null,
function () { return document.getElementById('example_info') != null; }
);
oTest.fnTest(
"Pagination div exists",
null,
function () { return document.getElementById('example_paginate') != null; }
);
oTest.fnTest(
"Processing div is off by default",
null,
function () { return document.getElementById('example_processing') == null; }
);
oTest.fnWaitTest(
"10 rows shown on the first page",
null,
function () { return $('#example tbody tr').length == 10; }
);
oTest.fnTest(
"Initial sort occured",
null,
function () { return $('#example tbody td:eq(0)').html() == "Gecko"; }
);
/* Need to use the WaitTest for sorting due to the setTimeout datatables uses */
oTest.fnTest(
"Sorting (first click) on second column",
function () { $('#example thead th:eq(1)').click(); },
function () { return $('#example tbody td:eq(1)').html() == "All others"; }
);
oTest.fnTest(
"Sorting (second click) on second column",
function () { $('#example thead th:eq(1)').click(); },
function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; }
);
oTest.fnTest(
"Sorting (third click) on second column",
function () { $('#example thead th:eq(1)').click(); },
function () { return $('#example tbody td:eq(1)').html() == "All others"; }
);
oTest.fnTest(
"Sorting (first click) on numeric column",
function () { $('#example thead th:eq(3)').click(); },
function () { return $('#example tbody td:eq(3)').html() == "-"; }
);
oTest.fnTest(
"Sorting (second click) on numeric column",
function () { $('#example thead th:eq(3)').click(); },
function () { return $('#example tbody td:eq(3)').html() == "522.1"; }
);
oTest.fnTest(
"Sorting multi-column (first click)",
function () {
$('#example thead th:eq(0)').click();
oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); },
function () { var b =
$('#example tbody td:eq(0)').html() == "Gecko" &&
$('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; }
);
oTest.fnTest(
"Sorting multi-column - sorting second column only",
function () {
$('#example thead th:eq(1)').click(); },
function () { return $('#example tbody td:eq(1)').html() == "All others"; }
);
/* Basic paging */
oTest.fnTest(
"Paging to second page",
function () { $('#example_next').click(); },
function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; }
);
oTest.fnTest(
"Paging to first page",
function () { $('#example_previous').click(); },
function () { return $('#example tbody td:eq(1)').html() == "All others"; }
);
oTest.fnTest(
"Attempting to page back beyond the first page",
function () { $('#example_previous').click(); },
function () { return $('#example tbody td:eq(1)').html() == "All others"; }
);
/* Changing length */
oTest.fnTest(
"Changing table length to 25 records",
function () { $("select[name=example_length]").val('25').change(); },
function () { return $('#example tbody tr').length == 25; }
);
oTest.fnTest(
"Changing table length to 50 records",
function () { $("select[name=example_length]").val('50').change(); },
function () { return $('#example tbody tr').length == 50; }
);
oTest.fnTest(
"Changing table length to 100 records",
function () { $("select[name=example_length]").val('100').change(); },
function () { return $('#example tbody tr').length == 57; }
);
oTest.fnTest(
"Changing table length to 10 records",
function () { $("select[name=example_length]").val('10').change(); },
function () { return $('#example tbody tr').length == 10; }
);
/*
* Information element
*/
oTest.fnTest(
"Information on zero config",
null,
function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; }
);
oTest.fnTest(
"Information on second page",
function () { $('#example_next').click(); },
function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 57 entries"; }
);
oTest.fnTest(
"Information on third page",
function () { $('#example_next').click(); },
function () { return document.getElementById('example_info').innerHTML == "Showing 21 to 30 of 57 entries"; }
);
oTest.fnTest(
"Information on last page",
function () {
$('#example_next').click();
$('#example_next').click();
$('#example_next').click();
},
function () { return document.getElementById('example_info').innerHTML == "Showing 51 to 57 of 57 entries"; }
);
oTest.fnTest(
"Information back on first page",
function () {
$('#example_previous').click();
$('#example_previous').click();
$('#example_previous').click();
$('#example_previous').click();
$('#example_previous').click();
},
function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; }
);
oTest.fnTest(
"Information with 25 records",
function () { $("select[name=example_length]").val('25').change(); },
function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 25 of 57 entries"; }
);
oTest.fnTest(
"Information with 25 records - second page",
function () { $('#example_next').click(); },
function () { return document.getElementById('example_info').innerHTML == "Showing 26 to 50 of 57 entries"; }
);
oTest.fnTest(
"Information with 100 records - first page",
function () {
$('#example_previous').click();
$("select[name=example_length]").val('100').change();
},
function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 57 of 57 entries"; }
);
oTest.fnTest(
"Information back to 10 records",
function () {
$('#example_previous').click();
$("select[name=example_length]").val('10').change();
},
function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; }
);
oTest.fnTest(
"Information with filter 'Win'",
function () { $('#example_filter input').val("Win").keyup(); },
function () { return document.getElementById('example_info').innerHTML ==
"Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Information with filter 'Win' second page",
function () { $('#example_next').click(); },
function () { return document.getElementById('example_info').innerHTML ==
"Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Information with filter 'Win' last page",
function () {
$('#example_next').click();
$('#example_next').click();
},
function () { return document.getElementById('example_info').innerHTML ==
"Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Information with filter 'Win' back to first page",
function () {
$('#example_previous').click();
$('#example_previous').click();
$('#example_previous').click();
},
function () { return document.getElementById('example_info').innerHTML ==
"Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Information with filter 'Win' second page - second time",
function () {
$('#example_next').click();
},
function () { return document.getElementById('example_info').innerHTML ==
"Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Information with filter increased to 'Win 98'",
function () { $('#example_filter input').val("Win 98").keyup(); },
function () { return document.getElementById('example_info').innerHTML ==
"Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Information with filter decreased to 'Win'",
function () { $('#example_filter input').val("Win").keyup(); },
function () { return document.getElementById('example_info').innerHTML ==
"Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Information with filter 'Win' second page - third time",
function () {
$('#example_next').click();
},
function () { return document.getElementById('example_info').innerHTML ==
"Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Information with filter removed",
function () { $('#example_filter input').val("").keyup(); },
function () { return document.getElementById('example_info').innerHTML ==
"Showing 1 to 10 of 57 entries"; }
);
/*
* Filtering
*/
oTest.fnWaitTest(
"Filter 'W' - rows",
function () {
/* Reset the table such that the old sorting doesn't mess things up */
oSession.fnRestore();
$('#example').dataTable( oInit );
$('#example_filter input').val("W").keyup(); },
function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Gecko"; }
);
oTest.fnTest(
"Filter 'W' - info",
null,
function () { return document.getElementById('example_info').innerHTML ==
"Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Filter 'Wi'",
function () { $('#example_filter input').val("Wi").keyup(); },
function () { return document.getElementById('example_info').innerHTML ==
"Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Filter 'Win'",
function () { $('#example_filter input').val("Win").keyup(); },
function () { return document.getElementById('example_info').innerHTML ==
"Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Filter 'Win' - sorting column 1",
function () { $('#example thead th:eq(1)').click(); },
function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "AOL browser (AOL desktop)"; }
);
oTest.fnTest(
"Filter 'Win' - sorting column 1 info",
null,
function () { return document.getElementById('example_info').innerHTML ==
"Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Filter 'Win' - sorting column 1 reverse",
function () { $('#example thead th:eq(1)').click(); },
function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Seamonkey 1.1"; }
);
oTest.fnTest(
"Filter 'Win XP' - maintaing reverse sorting col 1",
function () { $('#example_filter input').val("Win XP").keyup(); },
function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Internet Explorer 7"; }
);
oTest.fnTest(
"Filter 'Win XP' - sorting col 3",
function () { $('#example thead th:eq(3)').click(); },
function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == "4"; }
);
oTest.fnTest(
"Filter 'Win XP' - sorting col 3 - reversed",
function () { $('#example thead th:eq(3)').click(); },
function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == "7"; }
);
oTest.fnTest(
"Filter 'Win' - sorting col 3 - reversed info",
null,
function () { return document.getElementById('example_info').innerHTML ==
"Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Filter 'nothinghere'",
function () { $('#example_filter input').val("nothinghere").keyup(); },
function () { return $('#example tbody tr:eq(0) td:eq(0)').html() ==
"No matching records found"; }
);
oTest.fnTest(
"Filter 'nothinghere' - info",
null,
function () { return document.getElementById('example_info').innerHTML ==
"Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Filter back to blank and 1st column sorting",
function () {
$('#example_filter input').val("").keyup();
$('#example thead th:eq(0)').click();
},
function () { return document.getElementById('example_info').innerHTML ==
"Showing 1 to 10 of 57 entries"; }
);
oTest.fnTest(
"Prefixing a filter entry",
function () {
$('#example_filter input').val("Win").keyup();
$('#example_filter input').val("GeckoWin").keyup();
},
function () { return document.getElementById('example_info').innerHTML ==
"Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; }
);
oTest.fnTest(
"Prefixing a filter entry with space",
function () {
$('#example_filter input').val("Gecko Win").keyup();
},
function () { return document.getElementById('example_info').innerHTML ==
"Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; }
);
oTest.fnComplete();
} );

View File

@@ -26,7 +26,7 @@ $(document).ready( function () {
null,
null,
null,
{ "mDataProp": null }
{ "mData": null }
],
"aaData": gaaData
};

View File

@@ -22,11 +22,11 @@ oTest.fnTest(
$(document).ready( function () {
var oInit = {
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaData": [
{

View File

@@ -22,11 +22,11 @@ oTest.fnTest(
$(document).ready( function () {
var oInit = {
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "details.0" },
{ "mDataProp": "details.1" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "details.0" },
{ "mData": "details.1" }
],
"aaData": [
{

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -46,11 +46,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['1','asc']]
} );
@@ -66,11 +66,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['1','desc']]
} );
@@ -86,11 +86,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['1','asc']]
} );
@@ -106,11 +106,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['1','desc']]
} );
@@ -126,11 +126,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['0','asc'], ['1','asc']]
} );
@@ -145,11 +145,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['0','asc'], ['1','desc']]
} );
@@ -164,11 +164,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['0','desc'], ['1','asc']]
} );
@@ -183,11 +183,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['0','desc'], ['1','desc']]
} );
@@ -203,11 +203,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['0','asc'], ['3','asc']]
} );
@@ -222,11 +222,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['0','asc'], ['3','desc']]
} );
@@ -241,11 +241,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['0','desc'], ['3','asc']]
} );
@@ -260,11 +260,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['0','desc'], ['3','desc']]
} );
@@ -279,11 +279,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSorting": [['0','asc'], ['3','asc'], ['1','asc']]
} );

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -31,11 +31,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSortingFixed": [['0','asc']],
"fnInitComplete": function () {
@@ -62,11 +62,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"aaSortingFixed": [['3','asc']]
} );

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -33,11 +33,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser", "bSearchable": false },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser", "bSearchable": false },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
oSettings = oTable.fnSettings();
@@ -59,11 +59,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine", "bSearchable": false },
{ "mDataProp": "browser", "bSearchable": false },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine", "bSearchable": false },
{ "mData": "browser", "bSearchable": false },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
oSettings = oTable.fnSettings();

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -28,11 +28,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser", "bSortable": false },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser", "bSortable": false },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
$('#example thead th:eq(1)').click();
@@ -62,11 +62,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser", "bSortable": false },
{ "mDataProp": "platform" },
{ "mDataProp": "version", "bSortable": false },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser", "bSortable": false },
{ "mData": "platform" },
{ "mData": "version", "bSortable": false },
{ "mData": "grade" }
]
} );
},

View File

@@ -12,9 +12,9 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mData": "engine" },
{
"mDataProp": "browser",
"mData": "browser",
"fnRender": function (a) {
if ( mTmp == 0 ) {
mTmp++;
@@ -23,9 +23,9 @@ $(document).ready( function () {
return a.aData['browser'];
}
},
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -44,9 +44,9 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mData": "engine" },
{
"mDataProp": "browser",
"mData": "browser",
"bUseRendered": false,
"fnRender": function (a) {
if ( mTmp == 0 ) {
@@ -57,9 +57,9 @@ $(document).ready( function () {
}
}
},
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
$('#example thead th:eq(1)').click();
@@ -80,7 +80,7 @@ $(document).ready( function () {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{
"mDataProp": "engine",
"mData": "engine",
"fnRender": function (a) {
if ( mTmp == 0 ) {
mTmp++;
@@ -91,7 +91,7 @@ $(document).ready( function () {
}
},
{
"mDataProp": "browser",
"mData": "browser",
"bUseRendered": false,
"fnRender": function (a) {
if ( mTmp2 == 0 ) {
@@ -103,7 +103,7 @@ $(document).ready( function () {
}
},
{
"mDataProp": "platform",
"mData": "platform",
"fnRender": function (a) {
if ( mTmp3 == 0 ) {
mTmp3++;
@@ -113,8 +113,8 @@ $(document).ready( function () {
}
}
},
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "version" },
{ "mData": "grade" }
]
} );
},

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -28,11 +28,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser", "bVisible": false },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser", "bVisible": false },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
},
@@ -83,11 +83,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser", "bVisible": false },
{ "mDataProp": "platform", "bVisible": false },
{ "mDataProp": "version" },
{ "mDataProp": "grade", "bVisible": false }
{ "mData": "engine" },
{ "mData": "browser", "bVisible": false },
{ "mData": "platform", "bVisible": false },
{ "mData": "version" },
{ "mData": "grade", "bVisible": false }
]
} );
},

View File

@@ -7,17 +7,17 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mData": "engine" },
{
"mDataProp": "browser",
"mData": "browser",
"fnRender": function (a) {
mTmp++;
return a.aData['browser'];
}
},
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -36,22 +36,22 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mData": "engine" },
{
"fnRender": function (a) {
if ( arguments.length != 2 || typeof a.iDataRow=='undefined' ||
typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ||
typeof a.mDataProp=='undefined' )
typeof a.mData=='undefined' )
{
mTmp = false;
}
return a.aData['browser'];
},
"mDataProp": "browser"
"mData": "browser"
},
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
},
@@ -66,9 +66,9 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mData": "engine" },
{
"mDataProp": "browser",
"mData": "browser",
"fnRender": function (a) {
if ( a.iDataColumn != 1 )
{
@@ -77,9 +77,9 @@ $(document).ready( function () {
return a.aData['browser'];
}
},
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
},
@@ -94,9 +94,9 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mData": "engine" },
{
"mDataProp": "browser",
"mData": "browser",
"fnRender": function (a) {
if ( a.aData.length != 5 )
{
@@ -105,9 +105,9 @@ $(document).ready( function () {
return a.aData['browser'];
}
},
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
},
@@ -121,16 +121,16 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mData": "engine" },
{
"mDataProp": "browser",
"mData": "browser",
"fnRender": function (a) {
return 'unittest';
}
},
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
},
@@ -144,21 +144,21 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mData": "engine" },
{ "mData": "browser" },
{
"mDataProp": "platform",
"mData": "platform",
"fnRender": function (a) {
return 'unittest1';
}
},
{
"mDataProp": "version",
"mData": "version",
"fnRender": function (a) {
return 'unittest2';
}
},
{ "mDataProp": "grade" }
{ "mData": "grade" }
]
} );
},

View File

@@ -8,11 +8,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser", "iDataSort": 4 },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser", "iDataSort": 4 },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -50,11 +50,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser", "iDataSort": 4 },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade", "iDataSort": 1 }
{ "mData": "engine" },
{ "mData": "browser", "iDataSort": 4 },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade", "iDataSort": 1 }
]
} );
},

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -28,11 +28,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform", "sClass": 'unittest' },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform", "sClass": 'unittest' },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
},
@@ -89,11 +89,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine", "sClass": 'unittest2' },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version", "sClass": 'unittest1' },
{ "mDataProp": "grade" }
{ "mData": "engine", "sClass": 'unittest2' },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version", "sClass": 'unittest1' },
{ "mData": "grade" }
]
} );
},

View File

@@ -8,11 +8,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version", "sName": 'unit test' },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version", "sName": 'unit test' },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -37,11 +37,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser", "sTitle": 'unit test' },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser", "sTitle": 'unit test' },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
},
@@ -64,11 +64,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser", "sTitle": 'unit test 1' },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade", "sTitle": 'unit test 2' }
{ "mData": "engine" },
{ "mData": "browser", "sTitle": 'unit test 1' },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade", "sTitle": 'unit test 2' }
]
} );
},

View File

@@ -12,11 +12,11 @@ $(document).ready( function () {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"bAutoWidth": false,
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser", "sWidth": '40%' },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser", "sWidth": '40%' },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -35,11 +35,11 @@ $(document).ready( function () {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"bAutoWidth": false,
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform", "sWidth": '20%' },
{ "mDataProp": "version", "sWidth": '30%' },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform", "sWidth": '20%' },
{ "mData": "version", "sWidth": '30%' },
{ "mData": "grade" }
]
} );
},
@@ -59,11 +59,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version", "sWidth": '40%' },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version", "sWidth": '40%' },
{ "mData": "grade" }
]
} );
},

View File

@@ -8,11 +8,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -39,11 +39,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"aoSearchCols": [
null,
@@ -64,11 +64,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"aoSearchCols": [
null,
@@ -89,11 +89,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"aoSearchCols": [
{ "sSearch": ".*ML", "bEscapeRegex": false },
@@ -114,11 +114,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"aoSearchCols": [
{ "sSearch": ".*ML", "bEscapeRegex": false },
@@ -139,11 +139,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"aoSearchCols": [
{ "sSearch": ".*ML", "bEscapeRegex": false },

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
@@ -44,11 +44,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"asStripeClasses": []
} );
@@ -74,11 +74,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"asStripeClasses": [ 'test1', 'test2' ]
} );
@@ -100,11 +100,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"asStripeClasses": [ 'test1', 'test2', 'test3', 'test4' ]
} );

View File

@@ -12,11 +12,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -93,11 +93,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bAutoWidth": false
} );
@@ -145,11 +145,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bAutoWidth": true
} );

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
@@ -28,11 +28,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bFilter": false
} );
@@ -48,11 +48,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bFilter": true
} );

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
@@ -28,11 +28,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bInfo": false
} );
@@ -48,11 +48,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bInfo": true
} );

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
@@ -51,11 +51,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bLengthChange": false
} );
@@ -78,11 +78,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bLengthChange": true
} );

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
@@ -35,11 +35,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bPaginate": false
} );
@@ -62,11 +62,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bPaginate": true
} );

View File

@@ -12,11 +12,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -54,11 +54,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bProcessing": true
} );
@@ -99,11 +99,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bProcessing": false
} );

View File

@@ -8,11 +8,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
@@ -70,11 +70,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bSort": false
} );
@@ -102,11 +102,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bSort": true
} );

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
@@ -94,11 +94,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bSortClasses": false
} );
@@ -136,11 +136,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bSortClasses": true
} );

View File

@@ -8,11 +8,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -35,11 +35,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnDrawCallback": function ( ) {
mPass = arguments.length;
@@ -62,11 +62,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnDrawCallback": function ( oSettings ) {
mPass = oSettings;
@@ -91,11 +91,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnDrawCallback": function ( ) {
mPass++;

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -33,11 +33,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnHeaderCallback": function ( ) {
mPass = arguments.length;
@@ -62,11 +62,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnHeaderCallback": function ( nHead, aasData, iStart, iEnd, aiDisplay ) {
mPass++;
@@ -93,11 +93,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnHeaderCallback": function ( nHead, aasData, iStart, iEnd, aiDisplay ) {
nHead.getElementsByTagName('th')[0].innerHTML = "Displaying "+(iEnd-iStart)+" records";
@@ -117,11 +117,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnHeaderCallback": function ( nHead, aasData, iStart, iEnd, aiDisplay ) {
if ( iStart != 0 )
@@ -144,11 +144,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnHeaderCallback": function ( nHead, aasData, iStart, iEnd, aiDisplay ) {
if ( iStart == 10 )
@@ -174,11 +174,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnHeaderCallback": function ( nHead, aasData, iStart, iEnd, aiDisplay ) {
if ( iEnd == 20 )
@@ -204,11 +204,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnHeaderCallback": function ( nHead, aasData, iStart, iEnd, aiDisplay ) {
if ( aiDisplay.length == 57 )
@@ -230,11 +230,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnHeaderCallback": function ( nHead, aasData, iStart, iEnd, aiDisplay ) {
if ( aiDisplay.length == 9 )

View File

@@ -8,11 +8,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -34,11 +34,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnInitComplete": function ( ) {
mPass = arguments.length;
@@ -57,11 +57,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnInitComplete": function ( oSettings ) {
mPass = oSettings;
@@ -81,11 +81,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnInitComplete": function ( ) {
mPass++;
@@ -115,11 +115,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnInitComplete": function ( ) {
mPass = $('#example tbody tr').length;

View File

@@ -8,11 +8,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -34,11 +34,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnRowCallback": function ( nTr ) {
mPass = arguments.length;
@@ -59,11 +59,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnRowCallback": function ( nTr, asData, iDrawIndex, iDataIndex ) {
mPass++;
@@ -81,11 +81,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnRowCallback": function ( nTr, asData, iDrawIndex, iDataIndex ) {
$(nTr).addClass('unit_test');
@@ -105,11 +105,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnRowCallback": function ( nTr, asData, iDrawIndex, iDataIndex ) {
if ( asData.length != 5 )
@@ -131,11 +131,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnRowCallback": function ( nTr, asData, iDrawIndex, iDataIndex ) {
if ( iCount != iDrawIndex )

View File

@@ -10,11 +10,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnServerData": function () {
mPass = arguments.length;
@@ -31,11 +31,11 @@ $(document).ready( function () {
"bDestroy": true,
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnServerData": function (sUrl, aoData, fnCallback, oSettings) {
mPass = sUrl == "../../../examples/ajax/sources/objects.txt";
@@ -52,11 +52,11 @@ $(document).ready( function () {
"bDestroy": true,
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnServerData": function (sUrl, aoData, fnCallback, oSettings) {
mPass = aoData.length==0;
@@ -73,11 +73,11 @@ $(document).ready( function () {
"bDestroy": true,
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"fnServerData": function (sUrl, aoData, fnCallback, oSettings) {
mPass = typeof fnCallback == 'function';

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
@@ -34,11 +34,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"iDisplayLength": 25
} );
@@ -60,11 +60,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"iDisplayLength": 100
} );
@@ -86,11 +86,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"iDisplayLength": 23
} );

View File

@@ -8,11 +8,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"sPaginationType": "full_numbers"
} );
@@ -52,11 +52,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"sPaginationType": "full_numbers",
"oLanguage": {

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -35,11 +35,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sInfo": "unit test"
@@ -63,11 +63,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sInfo": "unit _START_ test"
@@ -84,11 +84,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sInfo": "unit _END_ test"
@@ -105,11 +105,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sInfo": "unit _END_ test"
@@ -126,11 +126,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sInfo": "unit _START_ _END_ test"
@@ -147,11 +147,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sInfo": "unit _START_ _END_ _TOTAL_ test"

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -40,11 +40,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sInfoEmpty": "unit test"
@@ -75,11 +75,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sInfoEmpty": "unit _START_ _END_ _TOTAL_ test"

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -35,11 +35,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sInfoPostFix": "unit test"
@@ -64,11 +64,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sInfoPostFix": "unit _START_ _END_ _TOTAL_ test"
@@ -86,11 +86,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sInfoPostFix": "unit test"

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -53,11 +53,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sLengthMenu": "unit test"
@@ -84,11 +84,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sLengthMenu": "unit _MENU_ test"
@@ -113,11 +113,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sLengthMenu": "_MENU_"

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
],
"bProcessing": true
} );
@@ -36,11 +36,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"bProcessing": true,
"oLanguage": {

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -42,11 +42,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sSearch": "unit test"
@@ -71,11 +71,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sSearch": ""

View File

@@ -10,11 +10,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -33,11 +33,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sUrl": "../../../examples/examples_support/de_DE.txt"

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -36,11 +36,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oLanguage": {
"sZeroRecords": "unit test"

View File

@@ -6,11 +6,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -35,11 +35,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oSearch": {
"sSearch": "Mozilla"
@@ -64,11 +64,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oSearch": {
"sSearch": "DS",
@@ -86,11 +86,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oSearch": {
"sSearch": "Opera",
@@ -108,11 +108,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oSearch": {
"sSearch": "1.*",
@@ -130,11 +130,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"oSearch": {
"sSearch": "1.*",

View File

@@ -8,11 +8,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();

View File

@@ -8,11 +8,11 @@ $(document).ready( function () {
var oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mDataProp": "engine" },
{ "mDataProp": "browser" },
{ "mDataProp": "platform" },
{ "mDataProp": "version" },
{ "mDataProp": "grade" }
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
var oSettings = oTable.fnSettings();
@@ -53,11 +53,11 @@ $(document).ready( function () {
oTable = $('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"sDom": '<"wrapper"flipt>'
} );
@@ -110,11 +110,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"sDom": '<lf<t>ip>'
} );
@@ -167,11 +167,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"sDom": 'frtip'
} );
@@ -203,11 +203,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"sDom": 'lrtip'
} );
@@ -241,11 +241,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"sDom": 'lfrtp'
} );
@@ -277,11 +277,11 @@ $(document).ready( function () {
$('#example').dataTable( {
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumnDefs": [
{ "mDataProp": "engine", "aTargets": [0] },
{ "mDataProp": "browser", "aTargets": [1] },
{ "mDataProp": "platform", "aTargets": [2] },
{ "mDataProp": "version", "aTargets": [3] },
{ "mDataProp": "grade", "aTargets": [4] }
{ "mData": "engine", "aTargets": [0] },
{ "mData": "browser", "aTargets": [1] },
{ "mData": "platform", "aTargets": [2] },
{ "mData": "version", "aTargets": [3] },
{ "mData": "grade", "aTargets": [4] }
],
"sDom": 'lfrti'
} );

Some files were not shown because too many files have changed in this diff Show More