PHP Classes

File: assets/js/datatables/unit_testing/tests_onhold/1_dom/6776-scrolling-table-grows.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/6776-scrolling-table-grows.js   Download  
File: assets/js/datatables/unit_testing/tests_onhold/1_dom/6776-scrolling-table-grows.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,827 bytes
 

Contents

Class file image Download
// DATA_TEMPLATE: 6776 oTest.fnStart( "Actions on a scrolling table keep width" ); $(document).ready( function () { var oTable = $('#example').dataTable( { "bFilter": true, "bSort": true, "sScrollY": "100px", "bPaginate": false } ); var iWidth = $('div.dataTables_wrapper').width(); oTest.fnTest( "First sort has no effect on width", function () { $('th:eq(1)').click(); }, function () { return $('div.dataTables_wrapper').width() == iWidth; } ); oTest.fnTest( "Second sort has no effect on width", function () { $('th:eq(1)').click(); }, function () { return $('div.dataTables_wrapper').width() == iWidth; } ); oTest.fnTest( "Third sort has no effect on width", function () { $('th:eq(2)').click(); }, function () { return $('div.dataTables_wrapper').width() == iWidth; } ); oTest.fnTest( "Filter has no effect on width", function () { oTable.fnFilter('i'); }, function () { return $('div.dataTables_wrapper').width() == iWidth; } ); oTest.fnTest( "Filter 2 has no effect on width", function () { oTable.fnFilter('in'); }, function () { return $('div.dataTables_wrapper').width() == iWidth; } ); oTest.fnTest( "No result filter has header and body at same width", function () { oTable.fnFilter('xxx'); }, function () { return $('#example').width() == $('div.dataTables_scrollHeadInner').width(); } ); oTest.fnTest( "Filter with no results has no effect on width", function () { oTable.fnFilter('xxx'); }, function () { return $('div.dataTables_wrapper').width() == iWidth; } ); oTest.fnTest( "Filter with no results has table equal to wrapper width", function () { oTable.fnFilter('xxx'); }, function () { return $('div.dataTables_wrapper').width() == $('#example').width(); } ); oTest.fnComplete(); } );