Sha256: c64600b61167e81f0539801aefaef86d7196d9f568f7f27e77b2b6a3a500ec53

Contents?: true

Size: 1.59 KB

Versions: 28

Compression:

Stored size: 1.59 KB

Contents

// DATA_TEMPLATE: empty_table
oTest.fnStart( "oLanguage.sLoadingRecords" );

$(document).ready( function () {
	var tmp = false;
	oTest.fnTest( 
		"Default loading text is 'Loading...'",
		function () {
			$('#example').dataTable( {
				"sAjaxSource": "../../../examples/ajax/sources/arrays.txt"
			} );
			tmp = $('#example tbody tr td')[0].innerHTML == "Loading...";
		},
		function () { return tmp; }
	);
	
	oTest.fnTest(
		"Text can be overriden",
		function () {
			oSession.fnRestore();
			$('#example').dataTable( {
				"oLanguage": {
					"sLoadingRecords": "unitest"
				},
				"sAjaxSource": "../../../examples/ajax/sources/arrays.txt"
			} );
			tmp = $('#example tbody tr td')[0].innerHTML == "unitest";
		},
		function () { return tmp; }
	);
	
	oTest.fnTest(
		"When sZeroRecords is given but sLoadingRecords is not, sZeroRecords is used",
		function () {
			oSession.fnRestore();
			$('#example').dataTable( {
				"oLanguage": {
					"sZeroRecords": "unitest_sZeroRecords"
				},
				"sAjaxSource": "../../../examples/ajax/sources/arrays.txt"
			} );
			tmp = $('#example tbody tr td')[0].innerHTML == "unitest_sZeroRecords";
		},
		function () { return tmp; }
	);
	
	oTest.fnTest(
		"sLoadingRecords and sZeroRecords both given",
		function () {
			oSession.fnRestore();
			$('#example').dataTable( {
				"oLanguage": {
					"sZeroRecords": "unitest_sZeroRecords2",
					"sLoadingRecords": "unitest2"
				},
				"sAjaxSource": "../../../examples/ajax/sources/arrays.txt"
			} );
			tmp = $('#example tbody tr td')[0].innerHTML == "unitest2";
		},
		function () { return tmp; }
	);
	
	
	oTest.fnComplete();
} );

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
classiccms-0.7.5 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.7.4 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.7.3 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.7.2 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.7.1 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.7.0 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.6.9 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.6.8 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.6.7 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.6.6 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.6.5 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.6.4 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.6.3 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.6.2 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.6.1 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.6.0 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.5.17 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.5.16 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.5.15 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js
classiccms-0.5.14 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js