/[projects]/misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/4_server-side/aoColumns.bUseRendered.js
ViewVC logotype

Contents of /misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/4_server-side/aoColumns.bUseRendered.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2125 - (show annotations) (download) (as text)
Wed Mar 12 19:30:05 2014 UTC (10 years, 2 months ago) by torben
File MIME type: application/javascript
File size: 1039 byte(s)
initial import
1 // DATA_TEMPLATE: empty_table
2 oTest.fnStart( "aoColumns.bUseRendered" );
3
4 /* bUseRendered is used to alter sorting data, if false then the original data is used for
5 * sorting rather than the rendered data
6 */
7
8 $(document).ready( function () {
9 /* Check the default */
10 var mTmp = 0;
11
12 var oTable = $('#example').dataTable( {
13 "bServerSide": true,
14 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php",
15 "aoColumns": [
16 null,
17 { "fnRender": function (a) {
18 if ( mTmp == 0 ) {
19 mTmp++;
20 return "aaa";
21 } else
22 return a.aData[a.iDataColumn];
23 } },
24 null,
25 null,
26 null
27 ]
28 } );
29 var oSettings = oTable.fnSettings();
30
31 oTest.fnWaitTest(
32 "Default for bUseRendered is true - rendered data is used for sorting",
33 function () { $('#example thead th:eq(1)').click(); },
34 function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'aaa'; }
35 );
36
37 /* Limited to what we can do here as the sorting is done on the server side. So stop here. */
38
39
40
41
42 oTest.fnComplete();
43 } );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20