| 1 |
// DATA_TEMPLATE: empty_table |
| 2 |
/* |
| 3 |
* NOTE: There are some differences in this zero config script for server-side |
| 4 |
* processing compared to the other data sources. The main reason for this is the |
| 5 |
* difference in how the server-side processing does it's filtering. Also the |
| 6 |
* sorting state is always reset on each draw. |
| 7 |
*/ |
| 8 |
oTest.fnStart( "Info element with display all" ); |
| 9 |
|
| 10 |
$(document).ready( function () { |
| 11 |
var oTable = $('#example').dataTable( { |
| 12 |
"bServerSide": true, |
| 13 |
"sAjaxSource": "../../../examples/server_side/scripts/server_processing.php" |
| 14 |
} ); |
| 15 |
|
| 16 |
oTable.fnSettings()._iDisplayLength = -1; |
| 17 |
oTable.oApi._fnCalculateEnd( oTable.fnSettings() ); |
| 18 |
oTable.fnDraw(); |
| 19 |
|
| 20 |
|
| 21 |
/* Basic checks */ |
| 22 |
oTest.fnWaitTest( |
| 23 |
"Check length is correct when -1 length given", |
| 24 |
null, |
| 25 |
function () { |
| 26 |
return document.getElementById('example_info').innerHTML == |
| 27 |
"Showing 1 to 57 of 57 entries"; |
| 28 |
} |
| 29 |
); |
| 30 |
|
| 31 |
oTest.fnComplete(); |
| 32 |
} ); |