X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webapp%2Fresources%2Fdatatables-1.9.4%2Fextras%2FColReorder%2Ffixedcolumns.html;fp=webapp%2Fresources%2Fdatatables-1.9.4%2Fextras%2FColReorder%2Ffixedcolumns.html;h=bd993f63ced386cae1e9c347bfa19a7444df70a6;hb=9bb6ee99ca7f738fac1087190b5481b8fe6e8d9f;hp=0000000000000000000000000000000000000000;hpb=2e3f6b76be585306f1003d849831840c0adb3360;p=proteocache.git diff --git a/webapp/resources/datatables-1.9.4/extras/ColReorder/fixedcolumns.html b/webapp/resources/datatables-1.9.4/extras/ColReorder/fixedcolumns.html new file mode 100755 index 0000000..bd993f6 --- /dev/null +++ b/webapp/resources/datatables-1.9.4/extras/ColReorder/fixedcolumns.html @@ -0,0 +1,603 @@ + + +
+ + + +While ColReorder works great with scrolling in DataTables (and thus FixedColumns), + it also presents an additional option called 'iFixedColumns' which allows you to not + let the user reorder certain columns (specific the number given, counting left to + right). So in the case of FixedColumns this is useful because you typically won't want + to let your fixed column be reordered. This is shown below in the FixedColumns index column + example.
+ +$(document).ready( function () { + var oTable = $('#example').dataTable( { + "sDom": 'Rlfrtip', + "sScrollX": "100%", + "sScrollXInner": "150%", + "bScrollCollapse": true, + "fnDrawCallback": function ( oSettings ) { + /* Need to redo the counters if filtered or sorted */ + if ( oSettings.bSorted || oSettings.bFiltered ) { + for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ ) { + $('td:eq(0)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 ); + } + } + }, + "aoColumnDefs": [ + { "bSortable": false, "sClass": "index", "aTargets": [ 0 ] } + ], + "aaSorting": [[ 1, 'asc' ]], + "oColReorder": { + "iFixedColumns": 1 + } + } ); + new FixedColumns( oTable ); +} );+ + +