annotate DataTables-1.9.4/media/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sName.js @ 9:7300ed4c1481 draft default tip

Uploaded
author saskia-hiltemann
date Mon, 04 Sep 2017 10:49:00 -0400
parents ac5f9272033b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1 // DATA_TEMPLATE: empty_table
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
2 oTest.fnStart( "aoColumns.sName" );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
3
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
4 /* This has no effect at all in DOM methods - so we just check that it has applied the name */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
5
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
6 $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 /* Check the default */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8 var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10 "bDeferRender": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12 null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13 null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15 { "sName": 'unit test' },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16 null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17 ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 var oSettings = oTable.fnSettings();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21 oTest.fnWaitTest(
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22 "Names are stored in the columns object",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23 null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24 function () { return oSettings.aoColumns[3].sName =="unit test"; }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 oTest.fnComplete();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29 } );