PHP Classes

File: assets/js/datatables/unit_testing/tests_onhold/1_dom/html-autodetect-sort.js

Recommend this page to a friend!
  Classes of Tran Tuan   Pretty PHP S3 Files Manager   assets/js/datatables/unit_testing/tests_onhold/1_dom/html-autodetect-sort.js   Download  
File: assets/js/datatables/unit_testing/tests_onhold/1_dom/html-autodetect-sort.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Pretty PHP S3 Files Manager
Web based interface to manage files in Amazon S3
Author: By
Last change:
Date: 8 years ago
Size: 1,400 bytes
 

Contents

Class file image Download
// DATA_TEMPLATE: html_table oTest.fnStart( "HTML auto detect" ); $(document).ready( function () { var oTable = $('#example').dataTable(); oTest.fnTest( "Initial sort", null, function () { var ret = $('#example tbody tr:eq(0) td:eq(0)').html() == '1' && $('#example tbody tr:eq(1) td:eq(0)').html() == '2' && $('#example tbody tr:eq(2) td:eq(0)').html() == '3'; return ret; } ); oTest.fnTest( "HTML sort", function () { $('#example thead th:eq(1)').click() }, function () { var ret = $('#example tbody tr:eq(0) td:eq(0)').html() == '2' && $('#example tbody tr:eq(1) td:eq(0)').html() == '1' && $('#example tbody tr:eq(2) td:eq(0)').html() == '4'; return ret; } ); oTest.fnTest( "HTML reverse sort", function () { $('#example thead th:eq(1)').click() }, function () { var ret = $('#example tbody tr:eq(0) td:eq(0)').html() == '3' && $('#example tbody tr:eq(1) td:eq(0)').html() == '4' && $('#example tbody tr:eq(2) td:eq(0)').html() == '1'; return ret; } ); oTest.fnTest( "Numeric sort", function () { $('#example thead th:eq(0)').click() }, function () { var ret = $('#example tbody tr:eq(0) td:eq(0)').html() == '1' && $('#example tbody tr:eq(1) td:eq(0)').html() == '2' && $('#example tbody tr:eq(2) td:eq(0)').html() == '3'; return ret; } ); oTest.fnComplete(); } );