public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/Responsive/js/dataTables.responsive.js
function ()
	{
		var dt = this.s.dt;
		var columns = this.s.columns;

		// Are we allowed to do auto sizing?
		if ( ! this.c.auto ) {
			return;
		}

		// Are there any columns that actually need auto-sizing, or do they all
		// have classes defined
		if ( $.inArray( true, $.map( columns, function (c) { return c.auto; } ) ) === -1 ) {
			return;
		}

		// Clone the table with the current data in it
		var tableWidth   = dt.table().node().offsetWidth;
		var columnWidths = dt.columns;
		var clonedTable  = dt.table().node().cloneNode( false );
		var clonedHeader = $( dt.table().header().cloneNode( false ) ).appendTo( clonedTable );
		var clonedBody   = $( dt.table().body().cloneNode( false ) ).appendTo( clonedTable );

		$( dt.table().footer() ).clone( false ).appendTo( clonedTable );

		// This is a bit slow, but we need to get a clone of each row that
		// includes all columns. As such, try to do this as little as possible.
		dt.rows( { page: 'current' } ).indexes().flatten().each( function ( idx ) {
			var clone = dt.row( idx ).node().cloneNode( true );
			
			if ( dt.columns( ':hidden' ).flatten().length ) {
				$(clone).append( dt.cells( idx, ':hidden' ).nodes().to$().clone() );
			}

			$(clone).appendTo( clonedBody );
		} );

		var cells = dt.columns().header().to$().clone( false );
		$('<tr/>')
			.append( cells )
			.appendTo( clonedHeader );

		// In the inline case extra padding is applied to the first column to
		// give space for the show / hide icon. We need to use this in the
		// calculation
		if ( this.c.details.type === 'inline' ) {
			$(clonedTable).addClass( 'dtr-inline collapsed' );
		}

		var inserted = $('<div/>')
			.css( {
				width: 1,
				height: 1,
				overflow: 'hidden'
			} )
			.append( clonedTable );

		// Remove columns which are not to be included
		inserted.find('th.never, td.never').remove();

		inserted.insertBefore( dt.table().node() );

		// The cloned header now contains the smallest that each column can be
		dt.columns().eq(0).each( function ( idx ) {
			columns[idx].minWidth = cells[ idx ].offsetWidth || 0;
		} );

		inserted.remove();
	}
function ()
	{
		var dt = this.s.dt;
		var columns = this.s.columns;

		// Are we allowed to do auto sizing?
		if ( ! this.c.auto ) {
			return;
		}

		// Are there any columns that actually need auto-sizing, or do they all
		// have classes defined
		if ( $.inArray( true, $.map( columns, function (c) { return c.auto; } ) ) === -1 ) {
			return;
		}

		// Clone the table with the current data in it
		var tableWidth   = dt.table().node().offsetWidth;
		var columnWidths = dt.columns;
		var clonedTable  = dt.table().node().cloneNode( false );
		var clonedHeader = $( dt.table().header().cloneNode( false ) ).appendTo( clonedTable );
		var clonedBody   = $( dt.table().body().cloneNode( false ) ).appendTo( clonedTable );

		$( dt.table().footer() ).clone( false ).appendTo( clonedTable );

		// This is a bit slow, but we need to get a clone of each row that
		// includes all columns. As such, try to do this as little as possible.
		dt.rows( { page: 'current' } ).indexes().flatten().each( function ( idx ) {
			var clone = dt.row( idx ).node().cloneNode( true );
			
			if ( dt.columns( ':hidden' ).flatten().length ) {
				$(clone).append( dt.cells( idx, ':hidden' ).nodes().to$().clone() );
			}

			$(clone).appendTo( clonedBody );
		} );

		var cells = dt.columns().header().to$().clone( false );
		$('<tr/>')
			.append( cells )
			.appendTo( clonedHeader );

		// In the inline case extra padding is applied to the first column to
		// give space for the show / hide icon. We need to use this in the
		// calculation
		if ( this.c.details.type === 'inline' ) {
			$(clonedTable).addClass( 'dtr-inline collapsed' );
		}

		var inserted = $('<div/>')
			.css( {
				width: 1,
				height: 1,
				overflow: 'hidden'
			} )
			.append( clonedTable );

		// Remove columns which are not to be included
		inserted.find('th.never, td.never').remove();

		inserted.insertBefore( dt.table().node() );

		// The cloned header now contains the smallest that each column can be
		dt.columns().eq(0).each( function ( idx ) {
			columns[idx].minWidth = cells[ idx ].offsetWidth || 0;
		} );

		inserted.remove();
	}
function ( ) { var dt = this . s . dt ; var columns = this . s . columns ; // Are we allowed to do auto sizing? if ( ! this . c . auto ) { return ; } // Are there any columns that actually need auto-sizing, or do they all // have classes defined if ( $ . inArray ( true , $ . map ( columns , function ( c ) { return c . auto ; } ) ) === - 1 ) { return ; } // Clone the table with the current data in it var tableWidth = dt . table ( ) . node ( ) . offsetWidth ; var columnWidths = dt . columns ; var clonedTable = dt . table ( ) . node ( ) . cloneNode ( false ) ; var clonedHeader = $ ( dt . table ( ) . header ( ) . cloneNode ( false ) ) . appendTo ( clonedTable ) ; var clonedBody = $ ( dt . table ( ) . body ( ) . cloneNode ( false ) ) . appendTo ( clonedTable ) ; $ ( dt . table ( ) . footer ( ) ) . clone ( false ) . appendTo ( clonedTable ) ; // This is a bit slow, but we need to get a clone of each row that // includes all columns. As such, try to do this as little as possible. dt . rows ( { page : 'current' } ) . indexes ( ) . flatten ( ) . each ( function ( idx ) { var clone = dt . row ( idx ) . node ( ) . cloneNode ( true ) ; if ( dt . columns ( ':hidden' ) . flatten ( ) . length ) { $ ( clone ) . append ( dt . cells ( idx , ':hidden' ) . nodes ( ) . to$ ( ) . clone ( ) ) ; } $ ( clone ) . appendTo ( clonedBody ) ; } ) ; var cells = dt . columns ( ) . header ( ) . to$ ( ) . clone ( false ) ; $ ( '<tr/>' ) . append ( cells ) . appendTo ( clonedHeader ) ; // In the inline case extra padding is applied to the first column to // give space for the show / hide icon. We need to use this in the // calculation if ( this . c . details . type === 'inline' ) { $ ( clonedTable ) . addClass ( 'dtr-inline collapsed' ) ; } var inserted = $ ( '<div/>' ) . css ( { width : 1 , height : 1 , overflow : 'hidden' } ) . append ( clonedTable ) ; // Remove columns which are not to be included inserted . find ( 'th.never, td.never' ) . remove ( ) ; inserted . insertBefore ( dt . table ( ) . node ( ) ) ; // The cloned header now contains the smallest that each column can be dt . columns ( ) . eq ( 0 ) . each ( function ( idx ) { columns [ idx ] . minWidth = cells [ idx ] . offsetWidth || 0 ; } ) ; inserted . remove ( ) ; }
Determine the width of each column in the table so the auto column hiding
has that information to work with. This method is never going to be 100%
perfect since column widths can change slightly per page, but without
seriously compromising performance this is quite effective.

@private
Determine the width of each column in the table so the auto column hiding has that information to work with . This method is never going to be 100% perfect since column widths can change slightly per page but without seriously compromising performance this is quite effective .