Compare commits

...

111 Commits
1.9.2 ... 1_9

Author SHA1 Message Date
Allan Jardine
ca12924904 Merge pull request #265 from TonyaSolaris/1_9
Updated dependencies to work with jQuery 2
2014-01-22 00:57:10 -08:00
TonyaSolaris
79238d337b Updated dependencies to work with jQuery 2 2014-01-21 16:04:36 -08:00
Allan Jardine
36ba2549ad Fix: JSON error in component.json 2012-10-26 08:11:00 +01:00
Allan Jardine
6c41618c71 Update: jQuery 1.8.2 2012-09-23 14:18:58 +01:00
Allan Jardine
822c62d05d DataTables 1.9.4 2012-09-23 14:16:14 +01:00
Allan Jardine
26d2926390 Fix: Ie9 throws an error when document.activeElement is used inside a frame or iframe... So need to wrap the test up in a try/catch. Nasty. 2012-09-23 13:12:39 +01:00
Allan Jardine
bd6bb74967 Fix: Header TD elements need an outline of none to stop of focus flicker (matching TH elements which already have this) 2012-09-19 07:27:52 +01:00
Allan Jardine
b4cd9f11c6 Fix: A header made of only TD elements wasn't being correctly detected - 11705 2012-09-19 07:27:11 +01:00
Allan Jardine
77a8cb5946 Update: jQuery to 1.8.1 2012-09-19 07:26:21 +01:00
Allan Jardine
d1142e1450 Fix: If the user is currently focused on the filtering input element, don't overwrite the value that is already shown as this will effect the cursor position. 2012-09-16 12:00:36 +01:00
Allan Jardine
a19e1dee12 Dev: Use className for the newly created TR - slightly faster than addClass which isn't needed here 2012-09-16 11:19:53 +01:00
Allan Jardine
55adb2f3d5 New: component.json file for Bower ( http://twitter.github.com/bower/ ) support. Both component.json and package.json are generated with the correct version number in them. 2012-09-15 10:52:19 +01:00
Allan Jardine
e25b377ee8 Fix: State saving deletion of cookies was somewhat broken. It would delete cookies out of order, which is not what we want. Rewrite how the 'overage' of cookies (4K limit) is handled 2012-09-13 18:13:32 +01:00
Allan Jardine
a43714bfba Fix - docs: sNext and sPrevious referened to full_numbers pagination type, but they can be used for any pagination control: 9192 2012-09-12 07:47:29 +01:00
Allan Jardine
66e92ab655 Fix - docs: Documentation error for fnGetPosition - missing one of the return indexes - 11708 2012-09-11 10:09:03 +01:00
Allan Jardine
ca96ed55d5 Fix: Remove irrelevent and broken bSortable check for the column options - fix issue #101 2012-09-11 07:04:41 +01:00
Allan Jardine
0a3793b4bb Dev: Tidy up the way that the header and footer elements are 'got'. Based on pull request #92. 2012-09-09 18:43:57 +01:00
Allan Jardine
df614240cf Update: Fully deprecate fnRender - it will be removed from the next major version of DataTables and it is strongly adviced that you do not use it! 2012-09-09 12:26:57 +01:00
Allan Jardine
f6401f062a Update: Examples - remove all reference of fnRender, instead granting preference to mRender. 2012-09-09 12:05:37 +01:00
Allan Jardine
880de42c6e Dev: Remove debug from last commit... 2012-09-09 12:05:20 +01:00
Allan Jardine
555aacfc6d Fix: mRender and mData now work in the same way for DOM sourced tables as they do for JS sourced table data. Generally we wouldn't really expect them to be used as much for DOM sourced tables (if you want your table formatted differently, you'd just create the HTML differently!), but it can sometimes be useful to use these options. This also brings mRender to full 'pace' ready to be used in complete preference to fnRender (alongside the other methods for cell rendeirng such an fnCellCreated etc). 2012-09-09 11:57:02 +01:00
Allan Jardine
898357fc84 Merge pull request #98 from timtucker/patch-14
Update media/src/core/core.sort.js
2012-09-04 09:38:03 -07:00
Allan Jardine
30f936d8ff Merge pull request #97 from timtucker/patch-13
Update media/src/core/core.info.js
2012-09-04 09:30:58 -07:00
Allan Jardine
6d11218a7f Merge pull request #96 from timtucker/patch-12
Update media/src/core/core.info.js
2012-09-04 09:30:06 -07:00
Allan Jardine
bb08308dfe Merge pull request #95 from timtucker/patch-11
Update media/src/core/core.sizing.js
2012-09-04 09:29:15 -07:00
Allan Jardine
3ffa14ea8a Merge pull request #94 from timtucker/patch-10
Update media/src/core/core.sizing.js
2012-09-04 09:28:07 -07:00
Allan Jardine
4603ad13d4 Merge pull request #93 from timtucker/patch-9
Update media/src/core/core.scrolling.js
2012-09-04 09:27:25 -07:00
Allan Jardine
95381359ed Merge pull request #91 from timtucker/patch-7
Update media/src/core/core.scrolling.js
2012-09-04 09:24:50 -07:00
Allan Jardine
fcf49ef66e Merge pull request #99 from timtucker/patch-15
Update media/src/DataTables.js
2012-09-04 09:19:57 -07:00
Tim Tucker
a66bec8368 Update media/src/DataTables.js
Simplify by not passing in undefined to the outer closure
2012-09-04 13:03:20 -03:00
Tim Tucker
89be8f4083 Update media/src/core/core.sort.js
Speed things up by applying classes only when needed
2012-09-04 11:05:53 -03:00
Tim Tucker
cb2495b440 Update media/src/core/core.sort.js
Use var to keep track of # of classes found (length on sparse array doesn't work properly)
2012-09-03 19:36:18 -03:00
Tim Tucker
6bce847a3b Update media/src/core/core.sort.js
Further refinement - stop once all sorting classes have been seen
2012-09-03 19:12:03 -03:00
Tim Tucker
2afa5e4360 Update media/src/core/core.sort.js
Combined method for removing classes
2012-09-03 18:21:01 -03:00
Tim Tucker
e6e4205b02 Update media/src/core/core.sort.js
Forgot parameter to lastIndexOf
2012-09-03 16:54:30 -03:00
Tim Tucker
6a5c4cf261 Update media/src/core/core.sort.js
Use simpler dom-based method for deferred render
2012-09-03 16:53:00 -03:00
Tim Tucker
24fc23f63d Update media/src/core/core.sort.js
Simplify and improve performance
- Only check once for the presence of any sorting class instead of checking for the 3 individual classes
- Use lastIndexOf(str, 0) instead of indexOf

http://jsperf.com/rep-reg-string/4
2012-09-03 16:29:28 -03:00
Tim Tucker
af5c3d8178 Update media/src/core/core.info.js
Simplify check for filtering / empty record set
2012-09-03 14:02:38 -03:00
Tim Tucker
3485f6530a Update media/src/core/core.info.js
Use greedy match regex for replacements

Otherwise, you could have:
"_START_ of _TOTAL_, showing _START_ to _END_"
replaced as:
"1 of 5, showing _START_ to 3"
2012-09-03 13:52:30 -03:00
Tim Tucker
ef1c0890df Update media/src/core/core.sizing.js
Use document.body rather than document.getElementsByTagName
(Makes things consistent with the rest of the codebase and should be faster)

http://jsperf.com/document-body-vs-document-getelementsbytagname-body-0
2012-09-03 13:34:10 -03:00
Tim Tucker
4cbb9f3196 Update media/src/core/core.sizing.js
Define nWrapper earlier to avoid calling dom to get the parentNode multiple times in the initial loop
2012-09-03 13:11:11 -03:00
Tim Tucker
f5a772c594 Update media/src/core/core.scrolling.js
Use o.nScrollHead / o.nScrollFoot rather than traversing through the dom again to get the parentNodes for nScrollHeadInner / nScroolFootInner
2012-09-03 13:02:05 -03:00
Tim Tucker
70cea14422 Update media/src/core/core.scrolling.js
Only pass in what's needed to _fnApplyToChildren (don't need to be passing in both the sizer and node to size in most cases).
2012-09-03 12:38:09 -03:00
Allan Jardine
59dc2aed9c Dev: Fix a couple of issues that were introduced in pull request #85 - 1. Mix of spaces and tabs :-). 2. documentation generation was broken due to the use of another closure, 3. minification was broken as window, document, undefined were been aliased and 4. jshint was throwing errors. This addresses those issues, primarily by shifting the closures around. 2012-09-02 10:33:49 +01:00
Allan Jardine
e69e3c6c1c Dev update: Commit built changes from Tim Tucker from last few merges 2012-09-02 09:49:17 +01:00
Allan Jardine
93b0c9ede7 Examples: update - bind the 'xhr' event to the table without calling DataTables - no need for that call to be made. 2012-09-02 09:48:45 +01:00
Allan Jardine
9c82abe79d Merge pull request #89 from timtucker/patch-6
Use hasChildNodes() rather than childNodes.length
2012-09-02 01:40:10 -07:00
Allan Jardine
a950fb0642 Merge pull request #88 from timtucker/patch-5
Update media/src/core/core.data.js
2012-09-02 01:38:58 -07:00
Allan Jardine
1fdfb65457 Merge pull request #87 from timtucker/patch-4
Allow adding / removing an arbitrary number of stripes
2012-09-02 01:37:58 -07:00
Allan Jardine
dd2f084794 Merge pull request #86 from timtucker/patch-3
Improve dom iteration performance in _fnApplyToChildren
2012-09-02 01:34:13 -07:00
Tim Tucker
30eb6f0426 Update media/src/ext/ext.paging.js
Cache node
2012-08-31 18:48:15 -03:00
Tim Tucker
55b8e6fd04 Update media/src/ext/ext.paging.js
Use a different approach that caches nodes
(may actually minify better as well)
2012-08-31 18:43:38 -03:00
Tim Tucker
0c0fef65c1 Update media/src/ext/ext.paging.js
Replace childNodes.length check with hasChildNodes() in one more place
2012-08-31 18:35:00 -03:00
Tim Tucker
d8d7759613 Update media/src/ext/ext.paging.js
Use hasChildNodes() rather than childNodes.length

See the following jsperf test for the difference in performance:
http://jsperf.com/haschildnodes-vs-childnodes-length
2012-08-31 18:32:01 -03:00
Tim Tucker
dd616424b9 Update media/src/core/core.support.js
Use firstChild / nextSibling rather than childNodes
2012-08-31 18:25:23 -03:00
Tim Tucker
1001a332fb Update media/src/core/core.data.js
_fnGatherData: Use firstChild / nextSibling to iterate rather than childNodes
2012-08-31 18:12:39 -03:00
Tim Tucker
845eaaab67 Update media/src/api/api.methods.js
Properly select every nth row for adding classes
2012-08-31 17:45:15 -03:00
Tim Tucker
82fad5ca50 Update media/src/api/api.methods.js
Allow for adding / removing an arbitrary number of stripe rows
2012-08-31 17:37:11 -03:00
Tim Tucker
75ce320838 Update media/src/core/core.constructor.js
Allow for adding / removing an arbitrary number of stripe rows
2012-08-31 17:31:00 -03:00
Tim Tucker
ce59c7403f Update media/src/core/core.scrolling.js
Tweaks to improve performance
Cache nodes
Restructure to use nextSibling rather than childNodes
(small increase in file size, but may be a slight decrease in minified size)
2012-08-31 16:25:35 -03:00
Allan Jardine
0d47107906 Merge pull request #84 from timtucker/master
Update to docs
2012-08-31 09:46:34 -07:00
Tim Tucker
3cc96cf58f Update media/src/core/core.draw.js
Cache row
Avoid array access to childNodes
Move unique calculation outside of loop
Declare all vars at head of function
Cache a[i] in fnShiftCol
2012-08-31 13:38:51 -03:00
Allan Jardine
25f4602b3c Merge pull request #85 from timtucker/patch-2
Update media/src/DataTables.js
2012-08-31 09:30:07 -07:00
Tim Tucker
37485da480 Update media/src/DataTables.js
Combine closures
2012-08-31 13:08:09 -03:00
Tim Tucker
66de941632 Update media/src/DataTables.js
Wrap with globals to ease minification
Fix check for preventing multiple instantiation
Change formatting
2012-08-31 12:39:28 -03:00
Tim Tucker
87b4055b7a Update media/src/DataTables.js
Add support for AMD-based module loaders (such as requirejs).
Should have no effect when loading normally.
2012-08-31 11:15:19 -03:00
Tim Tucker
6fa5559dc3 Update media/src/core/core.sizing.js
Doc update -- getWidestNode returns node, not string
2012-08-31 11:00:48 -03:00
Tim Tucker
08619a3a21 Update media/js/jquery.dataTables.js
Update doc to reflect that _fnGetWidestNode returns a node, not a string.
2012-08-31 10:48:55 -03:00
Allan Jardine
6855be79f5 Examples: Add <code> CSS markup for examples. 2012-08-30 19:32:31 +01:00
Allan Jardine
c2af41140b Performance: Large improvement in scrolling performance due to rearranging the way that column widths are read and applied to the target table. Rather than merging reading and writing together, we now seperate the reading and writing phases, allowing the browser's rendering engine to optimise the reflow. Props to jlabanca for this modification - 11541 2012-08-30 07:29:50 +01:00
Allan Jardine
9f8d2a632b Moving on to 1.9.4 development 2012-08-22 16:41:52 +01:00
Allan Jardine
34096537c2 Fix: Firefox Windows (not Mac) had an error when calculating if scrolling oversizing was needed or not (_fnBrowserDetect). The result was that the table did not fill the space when y-scrolling was enabled and Firefox Windows was used. Fix is to remove the height on the DT_BrowserTest parent as suggested by randomuser - 11406 2012-08-22 16:39:36 +01:00
Allan Jardine
93774f4d7d Merge branch 'master' of github.com:DataTables/DataTables 2012-08-22 16:39:25 +01:00
Allan Jardine
3c358417e0 Update: Updating to jQuery 1.8.0 2012-08-22 16:38:36 +01:00
Allan Jardine
e83488ab56 Merge pull request #83 from kycook/patch2
Only restore hidden columns if table is not being removed from DOM
2012-08-22 00:58:20 -07:00
Patrick Cook
05201c21c4 Modified destroy method to only restore hidden columns if the table is not
being removed from DOM
2012-08-21 12:43:13 -07:00
Allan Jardine
d62ac092a6 Merge pull request #82 from kycook/patch1
Added fix for memory leak because of potential circular reference
2012-08-16 00:27:29 -07:00
Patrick Cook
854612a399 Added fix for memory leak because of potential circular reference 2012-08-15 23:31:14 -07:00
Allan Jardine
bec8dc3651 Merge pull request #81 from kycook/master
Fixed memory leak
2012-08-15 07:17:03 -07:00
Patrick Cook
f6ffbc7e28 Memory clean up of _that variable 2012-08-15 07:08:48 -07:00
Allan Jardine
6a8ca62b07 Merge pull request #79 from iBiryukov/patch-2
Small Typo Fix
2012-08-10 10:53:47 -07:00
iBiryukov
e15342225c Small Typo Fix 2012-08-10 19:46:06 +02:00
Allan Jardine
0585beb0c9 Merge pull request #76 from nnguyen/false_args_in_fnDestroy
Update to use false value in bRemove arg in fnDestroy
2012-08-09 23:47:44 -07:00
Nguyen Nguyen
5ac94e2512 Move to the right place (src, not the generated file) 2012-08-10 01:36:55 -05:00
Nguyen Nguyen
f29bd9ffbf Update to use false value in bRemove arg in fnDestroy 2012-08-09 18:10:07 -05:00
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
97 changed files with 4289 additions and 2154 deletions

11
component.json Executable file
View File

@@ -0,0 +1,11 @@
{
"name": "DataTables",
"version": "1.9.4",
"main": [
"./media/js/jquery.dataTables.js",
"./media/css/jquery.dataTables.css"
],
"dependencies": {
"jquery": ">=1.7.0"
}
}

View File

@@ -16,8 +16,11 @@
$('#example').dataTable( {
"aoColumnDefs": [
{
"fnRender": function ( oObj, sVal ) {
return sVal +' '+ oObj.aData[3];
// `data` refers to the data for the cell (defined by `mData`, which
// defaults to the column being worked with, in this case is the first
// Using `row[0]` is equivalent.
"mRender": function ( data, type, row ) {
return data +' '+ row[3];
},
"aTargets": [ 0 ]
},
@@ -35,7 +38,8 @@
</div>
<h1>Preamble</h1>
<p>You may specify a function for each column to render the available data in a specific manner which will be called when the table is drawn. In this example I've appended the rendering engine version to the rendering engine name in the first column, and hidden the version column.</p>
<p>Each column has an optional rendering control called <a href="http://datatables.net/ref#mRender">mRender</a> which can be used to process the content of each cell before the data is used. <code>mRender</code> has a wide array of options available to it for rendering different types of data (sorting, filtering, display etc), but it can be used very simply to manipulate the content of a cell, as shown here.</p>
<p>This example shows the rendering engine version combined with the rendering engine name in the first column, hiding the version column. This technique can be useful for adding links, assigning colours based on content rules and any other form of text manipulation you require.</p>
<h1>Live example</h1>
<div id="demo">
@@ -469,8 +473,11 @@
$('#example').dataTable( {
"aoColumnDefs": [
{
"fnRender": function ( oObj, sVal ) {
return sVal +' '+ oObj.aData[3];
// `data` refers to the data for the cell (defined by `mData`, which
// defaults to the column being worked with, in this case is the first
// Using `row[0]` is equivalent.
"mRender": function ( data, type, row ) {
return data +' '+ row[3];
},
"aTargets": [ 0 ]
},

View File

@@ -36,7 +36,7 @@
</div>
<h1>Preamble</h1>
<p>The following example shows how a callback function can be used to format a particular row at draw time. For each row that is generated for display, the <b>fnRowCallback()</b> function is called. It is passed the row node which can then be modified. In this case a trivial example of making the 'grade' column bold if the grade is 'A' is shown (note that this could also be performed using the <b>fnRender()</b> function, but this is just for example).</p>
<p>The following example shows how a callback function can be used to format a particular row at draw time. For each row that is generated for display, the <b>fnRowCallback()</b> function is called. It is passed the row node which can then be modified. In this case a trivial example of making the 'grade' column bold if the grade is 'A' is shown (note that this could also be performed using <a href="http://datatables.net/ref#mData">mData</a> as a function, but this is just for example of fnRowCallback!).</p>
<h1>Live example</h1>
<div id="demo">

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

@@ -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

@@ -82,17 +82,7 @@
{ "sTitle": "Browser" },
{ "sTitle": "Platform" },
{ "sTitle": "Version", "sClass": "center" },
{
"sTitle": "Grade",
"sClass": "center",
"fnRender": function(obj) {
var sReturn = obj.aData[ obj.iDataColumn ];
if ( sReturn == "A" ) {
sReturn = "<b>A</b>";
}
return sReturn;
}
}
{ "sTitle": "Grade", "sClass": "center" }
]
} );
} );
@@ -136,17 +126,7 @@
{ "sTitle": "Browser" },
{ "sTitle": "Platform" },
{ "sTitle": "Version", "sClass": "center" },
{
"sTitle": "Grade",
"sClass": "center",
"fnRender": function(obj) {
var sReturn = obj.aData[ obj.iDataColumn ];
if ( sReturn == "A" ) {
sReturn = "&lt;b&gt;A&lt;/b&gt;";
}
return sReturn;
}
}
{ "sTitle": "Grade", "sClass": "center" }
]
} );
} );</pre>

View File

@@ -2534,6 +2534,8 @@ var dtOptions = [
'fnStateSaveCallback',
'bDeferRender',
'mDataProp',
'mData',
'mRender',
'iDeferLoading',
'bSortCellsTop',
'sDefaultContent',
@@ -2642,6 +2644,8 @@ var dtLinks = [
'fnStateSaveCallback',
'bDeferRender',
'mDataProp',
'mData',
'mRender',
'iDeferLoading',
'bSortCellsTop',
'sDefaultContent',
@@ -2694,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').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

@@ -104,4 +104,19 @@
height: 100px;
width: 100%;
overflow: auto;
}
}
#dt_example code {
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
padding: 2px 4px !important;
white-space: nowrap;
font-size: 0.9em;
color: #D14;
background-color: #F7F7F9;
border: 1px solid #E1E1E8;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}

View File

@@ -201,7 +201,8 @@ table.display td.center {
background: url('../images/sort_desc_disabled.png') no-repeat center right;
}
th:active {
table.display thead th:active,
table.display thead td:active {
outline: none;
}

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

@@ -201,7 +201,8 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
.sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; }
.sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; }
table.dataTable th:active {
table.dataTable thead th:active,
table.dataTable thead td:active {
outline: none;
}

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

6
media/js/jquery.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
/**
* @summary DataTables
* @description Paginate, search and sort HTML tables
* @version 1.9.2
* @version 1.9.4
* @file jquery.dataTables.js
* @author Allan Jardine (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
@@ -21,9 +21,28 @@
*/
/*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,define,_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) {
(/** @lends <global> */function( window, document, undefined ) {
(function( factory ) {
"use strict";
// Define as an AMD module if possible
if ( typeof define === 'function' && define.amd )
{
define( ['jquery'], factory );
}
/* Define using browser globals otherwise
* Prevent multiple instantiations if the script is loaded twice
*/
else if ( jQuery && !jQuery.fn.dataTable )
{
factory( jQuery );
}
}
(/** @lends <global> */function( $ ) {
"use strict";
/**
* DataTables is a plug-in for the jQuery Javascript library. It is a
* highly flexible tool, based upon the foundations of progressive
@@ -78,9 +97,11 @@
require('api.internal.js');
var _that = this;
return this.each(function() {
this.each(function() {
require('core.constructor.js');
} );
_that = null;
return this;
};
require('api.static.js');
@@ -93,7 +114,7 @@
* @type string
* @default Version number
*/
DataTable.version = "1.9.2";
DataTable.version = "1.9.4";
/**
* Private data store, containing all of the settings objects that are created for the
@@ -245,6 +266,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
*/
/**
@@ -256,4 +278,7 @@
* @param {event} e jQuery event object
* @param {object} o DataTables settings object {@link DataTable.models.oSettings}
*/
}(jQuery, window, document, undefined));
}));
}(window, document));

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

@@ -1,5 +1,3 @@
/**
* Perform a jQuery selector action on the table's TR elements (from the tbody) and
* return the resulting jQuery object.
@@ -131,11 +129,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
@@ -199,8 +197,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
@@ -474,20 +472,23 @@ this.fnDestroy = function ( bRemove )
var nBody = oSettings.nTBody;
var i, iLen;
bRemove = (bRemove===undefined) ? false : true;
bRemove = (bRemove===undefined) ? false : bRemove;
/* Flag to note that the table is currently being destroyed - no action should be taken */
oSettings.bDestroying = true;
/* Fire off the destroy callbacks for plug-ins etc */
_fnCallbackFire( oSettings, "aoDestroyCallback", "destroy", [oSettings] );
/* Restore hidden columns */
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
/* If the table is not being removed, restore the hidden columns */
if ( !bRemove )
{
if ( oSettings.aoColumns[i].bVisible === false )
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
{
this.fnSetColumnVis( i, true );
if ( oSettings.aoColumns[i].bVisible === false )
{
this.fnSetColumnVis( i, true );
}
}
}
@@ -563,12 +564,19 @@ this.fnDestroy = function ( bRemove )
oSettings.nTable.style.width = _fnStringToCss(oSettings.sDestroyWidth);
}
/* If the were originally odd/even type classes - then we add them back here. Note
* this is not fool proof (for example if not all rows as odd/even classes - but
/* If the were originally stripe classes - then we add them back here. Note
* this is not fool proof (for example if not all rows had stripe classes - but
* it's a good effort without getting carried away
*/
$(nBody).children('tr:even').addClass( oSettings.asDestroyStripes[0] );
$(nBody).children('tr:odd').addClass( oSettings.asDestroyStripes[1] );
iLen = oSettings.asDestroyStripes.length;
if (iLen)
{
var anRows = $(nBody).children('tr');
for ( i=0 ; i<iLen ; i++ )
{
anRows.filter(':nth-child(' + iLen + 'n + ' + i + ')').addClass( oSettings.asDestroyStripes[i] );
}
}
/* Remove the settings object from the settings array */
for ( i=0, iLen=DataTable.settings.length ; i<iLen ; i++ )
@@ -581,6 +589,7 @@ this.fnDestroy = function ( bRemove )
/* End it all */
oSettings = null;
oInit = null;
};
@@ -674,7 +683,17 @@ this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseIns
var n = oSettings.aanFeatures.f;
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
{
$(n[i]._DT_Input).val( sInput );
// IE9 throws an 'unknown error' if document.activeElement is used
// inside an iframe or frame...
try {
if ( n[i]._DT_Input != document.activeElement )
{
$(n[i]._DT_Input).val( sInput );
}
}
catch ( e ) {
$(n[i]._DT_Input).val( sInput );
}
}
}
}
@@ -794,7 +813,8 @@ this.fnGetNodes = function( iRow )
* and column index including hidden columns
* @param {node} nNode this can either be a TR, TD or TH in the table's body
* @returns {int} If nNode is given as a TR, then a single index is returned, or
* if given as a cell, an array of [row index, column index (visible)] is given.
* if given as a cell, an array of [row index, column index (visible),
* column index (all)] is given.
* @dtopt API
*
* @example
@@ -1168,7 +1188,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
*
@@ -1186,30 +1206,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
{
@@ -1238,8 +1254,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 )
@@ -101,11 +118,10 @@ function _fnColumnOptions( oSettings, iCol, oOptions )
oCol.sSortingClass = oSettings.oClasses.sSortableNone;
oCol.sSortingClassJUI = "";
}
else if ( oCol.bSortable ||
($.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1) )
else if ( $.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1 )
{
oCol.sSortingClass = oSettings.oClasses.sSortable;
oCol.sSortingClassJUI = oSettings.oClasses.sSortJUI;
oCol.sSortingClass = oSettings.oClasses.sSortable;
oCol.sSortingClassJUI = oSettings.oClasses.sSortJUI;
}
else if ( $.inArray('asc', oCol.asSorting) != -1 && $.inArray('desc', oCol.asSorting) == -1 )
{
@@ -128,7 +144,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 +168,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 +186,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

@@ -1,4 +1,3 @@
var i=0, iLen, j, jLen, k, kLen;
var sId = this.getAttribute( 'id' );
var bInitHandedOff = false;
@@ -240,42 +239,29 @@ if ( oInit.asStripeClasses === null )
}
/* Remove row stripe classes if they are already on the table row */
var bStripeRemove = false;
var anRows = $(this).children('tbody').children('tr');
for ( i=0, iLen=oSettings.asStripeClasses.length ; i<iLen ; i++ )
iLen=oSettings.asStripeClasses.length;
oSettings.asDestroyStripes = [];
if (iLen)
{
if ( anRows.filter(":lt(2)").hasClass( oSettings.asStripeClasses[i]) )
var bStripeRemove = false;
var anRows = $(this).children('tbody').children('tr:lt(' + iLen + ')');
for ( i=0 ; i<iLen ; i++ )
{
bStripeRemove = true;
break;
}
}
if ( bStripeRemove )
{
/* Store the classes which we are about to remove so they can be readded on destroy */
oSettings.asDestroyStripes = [ '', '' ];
if ( $(anRows[0]).hasClass(oSettings.oClasses.sStripeOdd) )
{
oSettings.asDestroyStripes[0] += oSettings.oClasses.sStripeOdd+" ";
}
if ( $(anRows[0]).hasClass(oSettings.oClasses.sStripeEven) )
{
oSettings.asDestroyStripes[0] += oSettings.oClasses.sStripeEven;
}
if ( $(anRows[1]).hasClass(oSettings.oClasses.sStripeOdd) )
{
oSettings.asDestroyStripes[1] += oSettings.oClasses.sStripeOdd+" ";
}
if ( $(anRows[1]).hasClass(oSettings.oClasses.sStripeEven) )
{
oSettings.asDestroyStripes[1] += oSettings.oClasses.sStripeEven;
if ( anRows.hasClass( oSettings.asStripeClasses[i] ) )
{
bStripeRemove = true;
/* Store the classes which we are about to remove so they can be re-added on destroy */
oSettings.asDestroyStripes.push( oSettings.asStripeClasses[i] );
}
}
anRows.removeClass( oSettings.asStripeClasses.join(' ') );
if ( bStripeRemove )
{
anRows.removeClass( oSettings.asStripeClasses.join(' ') );
}
}
/*
* Columns
* See if we should load columns automatically or use defined ones
@@ -371,6 +357,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

@@ -1,5 +1,3 @@
/**
* Add a data array to the table, creating DOM node etc. This is the parallel to
* _fnGatherData, but for adding rows from a Javascript source, rather than a
@@ -30,8 +28,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) );
}
@@ -64,7 +62,7 @@ function _fnAddData ( oSettings, aDataSupplied )
/* Add to the display array */
oSettings.aiDisplayMaster.push( iRow );
/* Create the DOM imformation */
/* Create the DOM information */
if ( !oSettings.oFeatures.bDeferRender )
{
_fnCreateTr( oSettings, iRow );
@@ -82,7 +80,7 @@ function _fnAddData ( oSettings, aDataSupplied )
function _fnGatherData( oSettings )
{
var iLoop, i, iLen, j, jLen, jInner,
nTds, nTrs, nTd, aLocalData, iThisIndex,
nTds, nTrs, nTd, nTr, aLocalData, iThisIndex,
iRow, iRows, iColumn, iColumns, sNodeName,
oCol, oData;
@@ -93,31 +91,32 @@ function _fnGatherData( oSettings )
*/
if ( oSettings.bDeferLoading || oSettings.sAjaxSource === null )
{
nTrs = oSettings.nTBody.childNodes;
for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
nTr = oSettings.nTBody.firstChild;
while ( nTr )
{
if ( nTrs[i].nodeName.toUpperCase() == "TR" )
if ( nTr.nodeName.toUpperCase() == "TR" )
{
iThisIndex = oSettings.aoData.length;
nTrs[i]._DT_RowIndex = iThisIndex;
nTr._DT_RowIndex = iThisIndex;
oSettings.aoData.push( $.extend( true, {}, DataTable.models.oRow, {
"nTr": nTrs[i]
"nTr": nTr
} ) );
oSettings.aiDisplayMaster.push( iThisIndex );
nTds = nTrs[i].childNodes;
nTd = nTr.firstChild;
jInner = 0;
for ( j=0, jLen=nTds.length ; j<jLen ; j++ )
while ( nTd )
{
sNodeName = nTds[j].nodeName.toUpperCase();
sNodeName = nTd.nodeName.toUpperCase();
if ( sNodeName == "TD" || sNodeName == "TH" )
{
_fnSetCellData( oSettings, iThisIndex, jInner, $.trim(nTds[j].innerHTML) );
_fnSetCellData( oSettings, iThisIndex, jInner, $.trim(nTd.innerHTML) );
jInner++;
}
nTd = nTd.nextSibling;
}
}
nTr = nTr.nextSibling;
}
}
@@ -129,14 +128,15 @@ function _fnGatherData( oSettings )
nTds = [];
for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
{
for ( j=0, jLen=nTrs[i].childNodes.length ; j<jLen ; j++ )
nTd = nTrs[i].firstChild;
while ( nTd )
{
nTd = nTrs[i].childNodes[j];
sNodeName = nTd.nodeName.toUpperCase();
if ( sNodeName == "TD" || sNodeName == "TH" )
{
nTds.push( nTd );
}
nTd = nTd.nextSibling;
}
}
@@ -186,8 +186,16 @@ function _fnGatherData( oSettings )
}
}
if ( typeof oCol.mDataProp === 'function' )
if ( oCol.mRender )
{
// mRender has been defined, so we need to get the value and set it
nCell.innerHTML = _fnGetCellData( oSettings, iRow, iColumn, 'display' );
}
else if ( oCol.mData !== iColumn )
{
// If mData is not the same as the column number, then we need to
// get the dev set value. If it is the column, no point in wasting
// time setting the value that is already there!
nCell.innerHTML = _fnGetCellData( oSettings, iRow, iColumn, 'display' );
}
@@ -198,7 +206,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 +217,7 @@ function _fnGatherData( oSettings )
nCell.className += ' '+oCol.sClass;
}
/* Column visability */
/* Column visibility */
if ( !bVisible )
{
oData._anHidden[iColumn] = nCell;
@@ -283,15 +291,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 +326,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 +369,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 +390,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,22 +486,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++ )
{
// 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] ] === undefined )
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
@@ -541,6 +629,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,4 +1,3 @@
/**
* Create a new TR element (and it's TD children) for a row
* @param {object} oSettings dataTables settings object
@@ -27,7 +26,7 @@ function _fnCreateTr ( oSettings, iRow )
if ( oData._aData.DT_RowClass )
{
$(oData.nTr).addClass( oData._aData.DT_RowClass );
oData.nTr.className = oData._aData.DT_RowClass;
}
/* Process each column */
@@ -39,7 +38,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' );
@@ -80,7 +79,7 @@ function _fnCreateTr ( oSettings, iRow )
function _fnBuildHead( oSettings )
{
var i, nTh, iLen, j, jLen;
var iThs = oSettings.nTHead.getElementsByTagName('th').length;
var iThs = $('th, td', oSettings.nTHead).length;
var iCorrector = 0;
var jqChildren;
@@ -379,7 +378,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] );
@@ -691,10 +690,12 @@ function _fnAddOptionsHtml ( oSettings )
function _fnDetectHeader ( aLayout, nThead )
{
var nTrs = $(nThead).children('tr');
var nCell;
var i, j, k, l, iLen, jLen, iColShifted;
var nTr, nCell;
var i, k, l, iLen, jLen, iColShifted, iColumn, iColspan, iRowspan;
var bUnique;
var fnShiftCol = function ( a, i, j ) {
while ( a[i][j] ) {
var k = a[i];
while ( k[j] ) {
j++;
}
return j;
@@ -711,19 +712,18 @@ function _fnDetectHeader ( aLayout, nThead )
/* Calculate a layout array */
for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
{
var iColumn = 0;
nTr = nTrs[i];
iColumn = 0;
/* For every cell in the row... */
for ( j=0, jLen=nTrs[i].childNodes.length ; j<jLen ; j++ )
{
nCell = nTrs[i].childNodes[j];
nCell = nTr.firstChild;
while ( nCell ) {
if ( nCell.nodeName.toUpperCase() == "TD" ||
nCell.nodeName.toUpperCase() == "TH" )
{
/* Get the col and rowspan attributes from the DOM and sanitise them */
var iColspan = nCell.getAttribute('colspan') * 1;
var iRowspan = nCell.getAttribute('rowspan') * 1;
iColspan = nCell.getAttribute('colspan') * 1;
iRowspan = nCell.getAttribute('rowspan') * 1;
iColspan = (!iColspan || iColspan===0 || iColspan===1) ? 1 : iColspan;
iRowspan = (!iRowspan || iRowspan===0 || iRowspan===1) ? 1 : iRowspan;
@@ -732,6 +732,9 @@ function _fnDetectHeader ( aLayout, nThead )
*/
iColShifted = fnShiftCol( aLayout, i, iColumn );
/* Cache calculation for unique columns */
bUnique = iColspan === 1 ? true : false;
/* If there is col / rowspan, copy the information into the layout grid */
for ( l=0 ; l<iColspan ; l++ )
{
@@ -739,12 +742,13 @@ function _fnDetectHeader ( aLayout, nThead )
{
aLayout[i+k][iColShifted+l] = {
"cell": nCell,
"unique": iColspan == 1 ? true : false
"unique": bUnique
};
aLayout[i+k].nTr = nTrs[i];
aLayout[i+k].nTr = nTr;
}
}
}
nCell = nCell.nextSibling;
}
}
}
@@ -755,7 +759,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,7 +385,7 @@ 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

View File

@@ -1,5 +1,4 @@
/**
* Generate the node required for the info display
* @param {object} oSettings dataTables settings object
@@ -50,25 +49,20 @@ function _fnUpdateInfo ( oSettings )
iTotal = oSettings.fnRecordsDisplay(),
sOut;
if ( iTotal === 0 && iTotal == iMax )
if ( iTotal === 0 )
{
/* Empty record set */
sOut = oLang.sInfoEmpty;
}
else if ( iTotal === 0 )
{
/* Empty record set after filtering */
sOut = oLang.sInfoEmpty +' '+ oLang.sInfoFiltered;
}
else if ( iTotal == iMax )
{
else {
/* Normal record set */
sOut = oLang.sInfo;
}
else
if ( iTotal != iMax )
{
/* Record set after filtering */
sOut = oLang.sInfo +' '+ oLang.sInfoFiltered;
sOut += ' ' + oLang.sInfoFiltered;
}
// Convert the macros
@@ -109,9 +103,9 @@ function _fnInfoMacros ( oSettings, str )
}
return str.
replace('_START_', sStart).
replace('_END_', sEnd).
replace('_TOTAL_', sTotal).
replace('_MAX_', sMax);
replace(/_START_/g, sStart).
replace(/_END_/g, sEnd).
replace(/_TOTAL_/g, sTotal).
replace(/_MAX_/g, sMax);
}

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

@@ -1,5 +1,3 @@
/**
* Add any control elements for the table - specifically scrolling
* @param {object} oSettings dataTables settings object
@@ -108,7 +106,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 );
@@ -191,10 +189,18 @@ function _fnScrollDraw ( o )
nScrollBody = o.nTable.parentNode,
i, iLen, j, jLen, anHeadToSize, anHeadSizers, anFootSizers, anFootToSize, oStyle, iVis,
nTheadSize, nTfootSize,
iWidth, aApplied=[], iSanityWidth,
iWidth, aApplied=[], aAppliedFooter=[], 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,
zeroOut = function(nSizer) {
oStyle = nSizer.style;
oStyle.paddingTop = "0";
oStyle.paddingBottom = "0";
oStyle.borderTopWidth = "0";
oStyle.borderBottomWidth = "0";
oStyle.height = 0;
};
/*
* 1. Re-create the table inside the scrolling div
@@ -206,11 +212,15 @@ function _fnScrollDraw ( o )
/* Clone the current header and footer elements and then place it into the inner table */
nTheadSize = $(o.nTHead).clone()[0];
o.nTable.insertBefore( nTheadSize, o.nTable.childNodes[0] );
anHeadToSize = o.nTHead.getElementsByTagName('tr');
anHeadSizers = nTheadSize.getElementsByTagName('tr');
if ( o.nTFoot !== null )
{
nTfootSize = $(o.nTFoot).clone()[0];
o.nTable.insertBefore( nTfootSize, o.nTable.childNodes[1] );
anFootToSize = o.nTFoot.getElementsByTagName('tr');
anFootSizers = nTfootSize.getElementsByTagName('tr');
}
/*
@@ -219,7 +229,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 === "" )
{
@@ -238,7 +248,7 @@ function _fnScrollDraw ( o )
{
_fnApplyToChildren( function(n) {
n.style.width = "";
}, nTfootSize.getElementsByTagName('tr') );
}, anFootSizers );
}
// If scroll collapse is enabled, when we put the headers back into the body for sizing, we
@@ -300,41 +310,38 @@ function _fnScrollDraw ( o )
/* We want the hidden header to have zero height, so remove padding and borders. Then
* set the width based on the real headers
*/
anHeadToSize = o.nTHead.getElementsByTagName('tr');
anHeadSizers = nTheadSize.getElementsByTagName('tr');
_fnApplyToChildren( function(nSizer, nToSize) {
oStyle = nSizer.style;
oStyle.paddingTop = "0";
oStyle.paddingBottom = "0";
oStyle.borderTopWidth = "0";
oStyle.borderBottomWidth = "0";
oStyle.height = 0;
iWidth = $(nSizer).width();
nToSize.style.width = _fnStringToCss( iWidth );
aApplied.push( iWidth );
}, anHeadSizers, anHeadToSize );
// Apply all styles in one pass. Invalidates layout only once because we don't read any
// DOM properties.
_fnApplyToChildren( zeroOut, anHeadSizers );
// Read all widths in next pass. Forces layout only once because we do not change
// any DOM properties.
_fnApplyToChildren( function(nSizer) {
aApplied.push( _fnStringToCss( $(nSizer).width() ) );
}, anHeadSizers );
// Apply all widths in final pass. Invalidates layout only once because we do not
// read any DOM properties.
_fnApplyToChildren( function(nToSize, i) {
nToSize.style.width = aApplied[i];
}, anHeadToSize );
$(anHeadSizers).height(0);
/* Same again with the footer if we have one */
if ( o.nTFoot !== null )
{
/* Clone the current footer and then place it into the body table as a "hidden header" */
anFootSizers = nTfootSize.getElementsByTagName('tr');
anFootToSize = o.nTFoot.getElementsByTagName('tr');
_fnApplyToChildren( function(nSizer, nToSize) {
oStyle = nSizer.style;
oStyle.paddingTop = "0";
oStyle.paddingBottom = "0";
oStyle.borderTopWidth = "0";
oStyle.borderBottomWidth = "0";
oStyle.height = 0;
iWidth = $(nSizer).width();
nToSize.style.width = _fnStringToCss( iWidth );
aApplied.push( iWidth );
}, anFootSizers, anFootToSize );
_fnApplyToChildren( zeroOut, anFootSizers );
_fnApplyToChildren( function(nSizer) {
aAppliedFooter.push( _fnStringToCss( $(nSizer).width() ) );
}, anFootSizers );
_fnApplyToChildren( function(nToSize, i) {
nToSize.style.width = aAppliedFooter[i];
}, anFootToSize );
$(anFootSizers).height(0);
}
@@ -345,16 +352,16 @@ function _fnScrollDraw ( o )
/* "Hide" the header and footer that we used for the sizing. We want to also fix their width
* to what they currently are
*/
_fnApplyToChildren( function(nSizer) {
_fnApplyToChildren( function(nSizer, i) {
nSizer.innerHTML = "";
nSizer.style.width = _fnStringToCss( aApplied.shift() );
nSizer.style.width = aApplied[i];
}, anHeadSizers );
if ( o.nTFoot !== null )
{
_fnApplyToChildren( function(nSizer) {
_fnApplyToChildren( function(nSizer, i) {
nSizer.innerHTML = "";
nSizer.style.width = _fnStringToCss( aApplied.shift() );
nSizer.style.width = aAppliedFooter[i];
}, anFootSizers );
}
@@ -377,11 +384,11 @@ function _fnScrollDraw ( o )
/* Apply the calculated minimum width to the table wrappers */
nScrollBody.style.width = _fnStringToCss( iCorrection );
nScrollHeadInner.parentNode.style.width = _fnStringToCss( iCorrection );
o.nScrollHead.style.width = _fnStringToCss( iCorrection );
if ( o.nTFoot !== null )
{
nScrollFootInner.parentNode.style.width = _fnStringToCss( iCorrection );
o.nScrollFoot.style.width = _fnStringToCss( iCorrection );
}
/* And give the user a warning that we've stopped the table getting too small */
@@ -400,11 +407,11 @@ function _fnScrollDraw ( o )
else
{
nScrollBody.style.width = _fnStringToCss( '100%' );
nScrollHeadInner.parentNode.style.width = _fnStringToCss( '100%' );
o.nScrollHead.style.width = _fnStringToCss( '100%' );
if ( o.nTFoot !== null )
{
nScrollFootInner.parentNode.style.width = _fnStringToCss( '100%' );
o.nScrollFoot.style.width = _fnStringToCss( '100%' );
}
}
@@ -453,7 +460,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 */
@@ -474,22 +481,31 @@ function _fnScrollDraw ( o )
*/
function _fnApplyToChildren( fn, an1, an2 )
{
for ( var i=0, iLen=an1.length ; i<iLen ; i++ )
var index=0, i=0, iLen=an1.length;
var nNode1, nNode2;
while ( i < iLen )
{
for ( var j=0, jLen=an1[i].childNodes.length ; j<jLen ; j++ )
nNode1 = an1[i].firstChild;
nNode2 = an2 ? an2[i].firstChild : null;
while ( nNode1 )
{
if ( an1[i].childNodes[j].nodeType == 1 )
if ( nNode1.nodeType === 1 )
{
if ( an2 )
{
fn( an1[i].childNodes[j], an2[i].childNodes[j] );
fn( nNode1, nNode2, index );
}
else
{
fn( an1[i].childNodes[j] );
fn( nNode1, index );
}
index++;
}
nNode1 = nNode1.nextSibling;
nNode2 = an2 ? nNode2.nextSibling : null;
}
i++;
}
}

View File

@@ -1,5 +1,3 @@
/**
* Convert a CSS unit width to pixels (e.g. 2em)
* @param {string} sWidth width to be converted
@@ -16,7 +14,7 @@ function _fnConvertToWidth ( sWidth, nParent )
if ( !nParent )
{
nParent = document.getElementsByTagName('body')[0];
nParent = document.body;
}
var iWidth;
@@ -46,6 +44,7 @@ function _fnCalculateColumnWidths ( oSettings )
var i, iIndex, iCorrector, iWidth;
var oHeaders = $('th', oSettings.nTHead);
var widthAttr = oSettings.nTable.getAttribute('width');
var nWrapper = oSettings.nTable.parentNode;
/* Convert any user input sizes into pixel sizes */
for ( i=0 ; i<iColums ; i++ )
@@ -57,7 +56,7 @@ function _fnCalculateColumnWidths ( oSettings )
if ( oSettings.aoColumns[i].sWidth !== null )
{
iTmpWidth = _fnConvertToWidth( oSettings.aoColumns[i].sWidthOrig,
oSettings.nTable.parentNode );
nWrapper );
if ( iTmpWidth !== null )
{
oSettings.aoColumns[i].sWidth = _fnStringToCss( iTmpWidth );
@@ -157,7 +156,6 @@ function _fnCalculateColumnWidths ( oSettings )
}
/* Build the table and 'display' it */
var nWrapper = oSettings.nTable.parentNode;
nWrapper.appendChild( nCalcTmp );
/* When scrolling (X or Y) we want to set the width of the table as appropriate. However,
@@ -284,7 +282,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 {node} widest table node
* @memberof DataTable#oApi
*/
function _fnGetWidestNode( oSettings, iCol )
@@ -309,7 +307,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

@@ -1,5 +1,3 @@
/**
* Change the order of the table
* @param {object} oSettings dataTables settings object
@@ -26,7 +24,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 +206,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 +389,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.
*/
@@ -403,58 +401,51 @@ function _fnSortingClasses( oSettings )
if ( oSettings.oFeatures.bSort && oSettings.oFeatures.bSortClasses )
{
var nTds = _fnGetTdNodes( oSettings );
/* Remove the old classes */
if ( oSettings.oFeatures.bDeferRender )
{
$(nTds).removeClass(sClass+'1 '+sClass+'2 '+sClass+'3');
}
else if ( nTds.length >= iColumns )
{
for ( i=0 ; i<iColumns ; i++ )
{
if ( nTds[i].className.indexOf(sClass+"1") != -1 )
{
for ( j=0, jLen=(nTds.length/iColumns) ; j<jLen ; j++ )
{
nTds[(iColumns*j)+i].className =
$.trim( nTds[(iColumns*j)+i].className.replace( sClass+"1", "" ) );
}
}
else if ( nTds[i].className.indexOf(sClass+"2") != -1 )
{
for ( j=0, jLen=(nTds.length/iColumns) ; j<jLen ; j++ )
{
nTds[(iColumns*j)+i].className =
$.trim( nTds[(iColumns*j)+i].className.replace( sClass+"2", "" ) );
}
}
else if ( nTds[i].className.indexOf(sClass+"3") != -1 )
{
for ( j=0, jLen=(nTds.length/iColumns) ; j<jLen ; j++ )
{
nTds[(iColumns*j)+i].className =
$.trim( nTds[(iColumns*j)+i].className.replace( " "+sClass+"3", "" ) );
}
}
}
}
/* Add the new classes to the table */
var iClass = 1, iTargetCol;
for ( i=0 ; i<aaSort.length ; i++ )
/* Determine what the sorting class for each column should be */
var iClass, iTargetCol;
var asClasses = [];
for (i = 0; i < iColumns; i++)
{
asClasses.push("");
}
for (i = 0, iClass = 1; i < aaSort.length; i++)
{
iTargetCol = parseInt( aaSort[i][0], 10 );
for ( j=0, jLen=(nTds.length/iColumns) ; j<jLen ; j++ )
{
nTds[(iColumns*j)+iTargetCol].className += " "+sClass+iClass;
}
asClasses[iTargetCol] = sClass + iClass;
if ( iClass < 3 )
{
iClass++;
}
}
/* Make changes to the classes for each cell as needed */
var reClass = new RegExp(sClass + "[123]");
var sTmpClass, sCurrentClass, sNewClass;
for ( i=0, iLen=nTds.length; i<iLen; i++ )
{
/* Determine which column we're looking at */
iTargetCol = i % iColumns;
/* What is the full list of classes now */
sCurrentClass = nTds[i].className;
/* What sorting class should be applied? */
sNewClass = asClasses[iTargetCol];
/* What would the new full list be if we did a replacement? */
sTmpClass = sCurrentClass.replace(reClass, sNewClass);
if ( sTmpClass != sCurrentClass )
{
/* We changed something */
nTds[i].className = $.trim( sTmpClass );
}
else if ( sNewClass.length > 0 && sCurrentClass.indexOf(sNewClass) == -1 )
{
/* We need to add a class */
nTds[i].className = sCurrentClass + " " + sNewClass;
}
}
}
}

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 = [];
@@ -132,35 +132,50 @@ function _fnCreateCookie ( sName, sValue, iSecs, sBaseName, fnCallback )
}
/* Are we going to go over the cookie limit of 4KiB? If so, try to delete a cookies
* belonging to DataTables. This is FAR from bullet proof
* belonging to DataTables.
*/
var sOldName="", iOldTime=9999999999999;
var iLength = _fnReadCookie( sNameFile )!==null ? document.cookie.length :
sFullCookie.length + document.cookie.length;
var
aCookies =document.cookie.split(';'),
iNewCookieLen = sFullCookie.split(';')[0].length,
aOldCookies = [];
if ( iLength+10 > 4096 ) /* Magic 10 for padding */
if ( iNewCookieLen+document.cookie.length+10 > 4096 ) /* Magic 10 for padding */
{
var aCookies =document.cookie.split(';');
for ( var i=0, iLen=aCookies.length ; i<iLen ; i++ )
{
if ( aCookies[i].indexOf( sBaseName ) != -1 )
{
/* It's a DataTables cookie, so eval it and check the time stamp */
var aSplitCookie = aCookies[i].split('=');
try { oData = eval( '('+decodeURIComponent(aSplitCookie[1])+')' ); }
catch( e ) { continue; }
if ( oData.iCreate && oData.iCreate < iOldTime )
{
sOldName = aSplitCookie[0];
iOldTime = oData.iCreate;
try {
oData = eval( '('+decodeURIComponent(aSplitCookie[1])+')' );
if ( oData && oData.iCreate )
{
aOldCookies.push( {
"name": aSplitCookie[0],
"time": oData.iCreate
} );
}
}
catch( e ) {}
}
}
if ( sOldName !== "" )
{
document.cookie = sOldName+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+
// Make sure we delete the oldest ones first
aOldCookies.sort( function (a, b) {
return b.time - a.time;
} );
// Eliminate as many old DataTables cookies as we need to
while ( iNewCookieLen + document.cookie.length + 10 > 4096 ) {
if ( aOldCookies.length === 0 ) {
// Deleted all DT cookies and still not enough space. Can't state save
return;
}
var old = aOldCookies.pop();
document.cookie = old.name+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+
aParts.join('/') + "/";
}
}

View File

@@ -1,5 +1,4 @@
/**
* Return the settings object for a particular table
* @param {node} nTable table we are using as a dataTable
@@ -53,7 +52,7 @@ function _fnGetTdNodes ( oSettings, iIndividualRow )
{
var anReturn = [];
var iCorrector;
var anTds;
var anTds, nTd;
var iRow, iRows=oSettings.aoData.length,
iColumn, iColumns, oData, sNodeName, iStart=0, iEnd=iRows;
@@ -71,13 +70,15 @@ function _fnGetTdNodes ( oSettings, iIndividualRow )
{
/* get the TD child nodes - taking into account text etc nodes */
anTds = [];
for ( iColumn=0, iColumns=oData.nTr.childNodes.length ; iColumn<iColumns ; iColumn++ )
nTd = oData.nTr.firstChild;
while ( nTd )
{
sNodeName = oData.nTr.childNodes[iColumn].nodeName.toLowerCase();
sNodeName = nTd.nodeName.toLowerCase();
if ( sNodeName == 'td' || sNodeName == 'th' )
{
anTds.push( oData.nTr.childNodes[iColumn] );
anTds.push( nTd );
}
nTd = nTd.nextSibling;
}
iCorrector = 0;
@@ -166,17 +167,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,7 +192,7 @@ 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
@@ -216,7 +221,7 @@ 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)
* @memberof DataTable#oApi
@@ -238,7 +243,7 @@ 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
@@ -266,7 +271,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 +319,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; 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

@@ -1,4 +1,3 @@
/*
* Variable: oPagination
* Purpose:
@@ -73,17 +72,22 @@ $.extend( DataTable.ext.oPagination, {
var oClasses = oSettings.oClasses;
var an = oSettings.aanFeatures.p;
var nNode;
/* Loop over each instance of the pager */
for ( var i=0, iLen=an.length ; i<iLen ; i++ )
{
if ( an[i].childNodes.length !== 0 )
nNode = an[i].firstChild;
if ( nNode )
{
an[i].childNodes[0].className = ( oSettings._iDisplayStart === 0 ) ?
oClasses.sPagePrevDisabled : oClasses.sPagePrevEnabled;
an[i].childNodes[1].className = ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() ) ?
oClasses.sPageNextDisabled : oClasses.sPageNextEnabled;
/* Previous page */
nNode.className = ( oSettings._iDisplayStart === 0 ) ?
oClasses.sPagePrevDisabled : oClasses.sPagePrevEnabled;
/* Next page */
nNode = nNode.nextSibling;
nNode.className = ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() ) ?
oClasses.sPageNextDisabled : oClasses.sPageNextEnabled;
}
}
}
@@ -172,7 +176,7 @@ $.extend( DataTable.ext.oPagination, {
var sList = "";
var iStartButton, iEndButton, i, iLen;
var oClasses = oSettings.oClasses;
var anButtons, anStatic, nPaginateList;
var anButtons, anStatic, nPaginateList, nNode;
var an = oSettings.aanFeatures.p;
var fnBind = function (j) {
oSettings.oApi._fnBindAction( this, {"page": j+iStartButton-1}, function(e) {
@@ -223,18 +227,19 @@ $.extend( DataTable.ext.oPagination, {
/* Loop over each instance of the pager */
for ( i=0, iLen=an.length ; i<iLen ; i++ )
{
if ( an[i].childNodes.length === 0 )
nNode = an[i];
if ( !nNode.hasChildNodes() )
{
continue;
}
/* Build up the dynamic list forst - html and listeners */
$('span:eq(0)', an[i])
/* Build up the dynamic list first - html and listeners */
$('span:eq(0)', nNode)
.html( sList )
.children('a').each( fnBind );
/* Update the premanent botton's classes */
anButtons = an[i].getElementsByTagName('a');
/* Update the permanent button's classes */
anButtons = nNode.getElementsByTagName('a');
anStatic = [
anButtons[0], anButtons[1],
anButtons[anButtons.length-2], anButtons[anButtons.length-1]

View File

@@ -48,14 +48,14 @@ DataTable.models.oColumn = {
"bSortable": null,
/**
* When using fnRender, you have two options for what to do with the data,
* and this property serves as the switch. Firstly, you can have the sorting
* 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
* use of the 'type' that it gives, allowing (potentially) different data to
* be used for sorting, filtering, display and type detection.
* <code>Deprecated</code> When using fnRender, you have two options for what
* to do with the data, and this property serves as the switch. Firstly, you
* can have the sorting and filtering use the rendered value (true - default),
* or you can have the sorting and filtering us the original value (false).
*
* Please note that this option has now been deprecated and will be removed
* in the next version of DataTables. Please use mRender / mData rather than
* fnRender.
* @type boolean
* @deprecated
*/
@@ -78,9 +78,9 @@ DataTable.models.oColumn = {
/**
* Developer definable function that is called whenever a cell is created (Ajax source,
* etc) or processed for input (DOM source). This can be used as a compliment to fnRender
* etc) or processed for input (DOM source). This can be used as a compliment to mRender
* allowing you to modify the DOM element (add background colour for example) when the
* element is available (since it is not when fnRender is called).
* element is available.
* @type function
* @param {element} nTd The TD node that has been created
* @param {*} sData The Data for the cell
@@ -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
@@ -107,8 +107,12 @@ DataTable.models.oColumn = {
"fnGetData": null,
/**
* Custom display function that will be called for the display of each cell
* in this column.
* <code>Deprecated</code> Custom display function that will be called for the
* display of each cell in this column.
*
* Please note that this option has now been deprecated and will be removed
* in the next version of DataTables. Please use mRender / mData rather than
* fnRender.
* @type function
* @param {object} o Object with the following parameters:
* @param {int} o.iDataRow The row in aoData
@@ -117,13 +121,14 @@ DataTable.models.oColumn = {
* @param {object} o.oSettings The settings object for this DataTables instance
* @returns {string} The string you which to use in the display
* @default null
* @deprecated
*/
"fnRender": null,
/**
* 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 +145,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 +196,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 },
@@ -142,51 +142,18 @@ DataTable.defaults.columns = {
/**
* When using fnRender() for a column, you may wish to use the original data
* (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.
* <code>Deprecated</code> When using fnRender() for a column, you may wish
* to use the original data (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.
* Please note that this option has now been deprecated and will be removed
* in the next version of DataTables. Please use mRender / mData rather than
* fnRender.
* @type boolean
* @default true
* @dtopt Columns
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* {
* "fnRender": function ( oObj ) {
* return oObj.aData[0] +' '+ oObj.aData[3];
* },
* "bUseRendered": false,
* "aTargets": [ 0 ]
* }
* ]
* } );
* } );
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $('#example').dataTable( {
* "aoColumns": [
* {
* "fnRender": function ( oObj ) {
* return oObj.aData[0] +' '+ oObj.aData[3];
* },
* "bUseRendered": false
* },
* null,
* null,
* null,
* null
* ]
* } );
* } );
* @deprecated
*/
"bUseRendered": true,
@@ -199,7 +166,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "bVisible": false, "aTargets": [ 0 ] }
@@ -208,7 +175,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "bVisible": false },
@@ -224,9 +191,9 @@ DataTable.defaults.columns = {
/**
* Developer definable function that is called whenever a cell is created (Ajax source,
* etc) or processed for input (DOM source). This can be used as a compliment to fnRender
* etc) or processed for input (DOM source). This can be used as a compliment to mRender
* allowing you to modify the DOM element (add background colour for example) when the
* element is available (since it is not when fnRender is called).
* element is available.
* @type function
* @param {element} nTd The TD node that has been created
* @param {*} sData The Data for the cell
@@ -236,7 +203,7 @@ DataTable.defaults.columns = {
* @dtopt Columns
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [ {
* "aTargets": [3],
@@ -253,8 +220,12 @@ DataTable.defaults.columns = {
/**
* Custom display function that will be called for the display of each cell in
* this column.
* <code>Deprecated</code> Custom display function that will be called for the
* display of each cell in this column.
*
* Please note that this option has now been deprecated and will be removed
* in the next version of DataTables. Please use mRender / mData rather than
* fnRender.
* @type function
* @param {object} o Object with the following parameters:
* @param {int} o.iDataRow The row in aoData
@@ -265,37 +236,7 @@ DataTable.defaults.columns = {
* @param {*} val The current cell value
* @returns {string} The string you which to use in the display
* @dtopt Columns
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* {
* "fnRender": function ( o, val ) {
* return o.aData[0] +' '+ o.aData[3];
* },
* "aTargets": [ 0 ]
* }
* ]
* } );
* } );
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "fnRender": function ( o, val ) {
* return o.aData[0] +' '+ o.aData[3];
* } },
* null,
* null,
* null,
* null
* ]
* } );
* } );
* @deprecated
*/
"fnRender": null,
@@ -310,7 +251,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "iDataSort": 1, "aTargets": [ 0 ] }
@@ -320,7 +261,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "iDataSort": 1 },
@@ -335,15 +276,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 +314,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 +362,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 +448,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 +468,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "sClass": "my_class", "aTargets": [ 0 ] }
@@ -456,7 +478,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "sClass": "my_class" },
@@ -487,7 +509,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* null,
@@ -505,7 +527,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 +535,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 +549,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 +579,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "sName": "engine", "aTargets": [ 0 ] },
@@ -571,7 +593,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "sName": "engine" },
@@ -588,7 +610,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 +619,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "sSortDataType": "dom-text", "aTargets": [ 2, 3 ] },
@@ -610,7 +632,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* null,
@@ -635,7 +657,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "sTitle": "My column title", "aTargets": [ 0 ] }
@@ -645,7 +667,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "sTitle": "My column title" },
@@ -674,7 +696,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "sType": "html", "aTargets": [ 0 ] }
@@ -684,7 +706,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumns
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "sType": "html" },
@@ -701,7 +723,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 +732,7 @@ DataTable.defaults.columns = {
*
* @example
* // Using aoColumnDefs
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* { "sWidth": "20%", "aTargets": [ 0 ] }
@@ -720,7 +742,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,7 +896,7 @@ DataTable.defaults = {
*
* @example
* // POST data to server
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bProcessing": true,
* "bServerSide": true,
@@ -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,7 +981,7 @@ DataTable.defaults = {
* @dtopt Callbacks
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "bStateSave": true,
* "fnStateLoad": function (oSettings) {
@@ -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": {
@@ -1376,14 +1384,14 @@ DataTable.defaults = {
/**
* Text to use when using the 'full_numbers' type of pagination for the
* button to take the user to the next page.
* Text to use for the 'next' pagination button (to take the user to the
* next page).
* @type string
* @default Next
* @dtopt Language
*
* @example
* $(document).ready(function() {
* $(document).ready( function() {
* $('#example').dataTable( {
* "oLanguage": {
* "oPaginate": {
@@ -1397,14 +1405,14 @@ DataTable.defaults = {
/**
* Text to use when using the 'full_numbers' type of pagination for the
* button to take the user to the previous page.
* Text to use for the 'previous' pagination button (to take the user to
* the previous page).
* @type string
* @default Previous
* @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,7 +1838,7 @@ 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"&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'
} );

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();
@@ -69,11 +69,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",
"fnInitComplete": function () {

66
package.json Normal file → Executable file
View File

@@ -1,34 +1,34 @@
{
"name": "DataTables",
"version": "1.9.2",
"title": "DataTables",
"author": {
"name": "Allan Jardine",
"url": "http://sprymedia.co.uk"
},
"licenses": [
{
"type": "BSD",
"url": "http://datatables.net/license_bsd"
},
{
"type": "GPLv2",
"url": "http://datatables.net/license_gpl2"
}
],
"dependencies": {
"jquery": "1.3 - 1.7"
},
"description": "DataTables enhances HTML tables with the ability to sort, filter and page the data in the table very easily. It provides a comprehensive API and set of configuration options, allowing you to consume data from virtually any data source.",
"keywords": [
"DataTables",
"DataTable",
"table",
"grid",
"filter",
"sort",
"page",
"internationalisable"
],
"homepage": "http://datatables.net"
}
"name": "DataTables",
"version": "1.9.4",
"title": "DataTables",
"author": {
"name": "Allan Jardine",
"url": "http://sprymedia.co.uk"
},
"licenses": [
{
"type": "BSD",
"url": "http://datatables.net/license_bsd"
},
{
"type": "GPLv2",
"url": "http://datatables.net/license_gpl2"
}
],
"dependencies": {
"jquery": ">=1.7"
},
"description": "DataTables enhances HTML tables with the ability to sort, filter and page the data in the table very easily. It provides a comprehensive API and set of configuration options, allowing you to consume data from virtually any data source.",
"keywords": [
"DataTables",
"DataTable",
"table",
"grid",
"filter",
"sort",
"page",
"internationalisable"
],
"homepage": "http://datatables.net"
}

View File

@@ -99,6 +99,65 @@ if [ "$CMD" != "debug" ]; then
fi
fi
# Back to DataTables root dir
cd ../..
#
# Packaging files
#
cat <<EOF > package.json
{
"name": "DataTables",
"version": "${VERSION}",
"title": "DataTables",
"author": {
"name": "Allan Jardine",
"url": "http://sprymedia.co.uk"
},
"licenses": [
{
"type": "BSD",
"url": "http://datatables.net/license_bsd"
},
{
"type": "GPLv2",
"url": "http://datatables.net/license_gpl2"
}
],
"dependencies": {
"jquery": "1.4 - 1.8"
},
"description": "DataTables enhances HTML tables with the ability to sort, filter and page the data in the table very easily. It provides a comprehensive API and set of configuration options, allowing you to consume data from virtually any data source.",
"keywords": [
"DataTables",
"DataTable",
"table",
"grid",
"filter",
"sort",
"page",
"internationalisable"
],
"homepage": "http://datatables.net"
}
EOF
cat <<EOF > component.json
{
"name": "DataTables",
"version": "${VERSION}",
"main": [
"./media/js/jquery.dataTables.js",
"./media/css/jquery.dataTables.css",
],
"dependencies": {
"jquery": "~1.8.0"
}
}
EOF
echo " Done\n"