public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/ColVis/js/dataTables.colVis.js
function ()
	{
		var
			nButton,
			columns = this.s.dt.aoColumns;

		if ( $.inArray( 'all', this.s.aiExclude ) === -1 ) {
			for ( var i=0, iLen=columns.length ; i<iLen ; i++ )
			{
				if ( $.inArray( i, this.s.aiExclude ) === -1 )
				{
					nButton = this._fnDomColumnButton( i );
					nButton.__columnIdx = i;
					this.dom.buttons.push( nButton );
				}
			}
		}

		if ( this.s.order === 'alpha' ) {
			this.dom.buttons.sort( function ( a, b ) {
				var titleA = columns[ a.__columnIdx ].sTitle;
				var titleB = columns[ b.__columnIdx ].sTitle;

				return titleA === titleB ?
					0 :
					titleA < titleB ?
						-1 :
						1;
			} );
		}

		if ( this.s.restore )
		{
			nButton = this._fnDomRestoreButton();
			nButton.className += " ColVis_Restore";
			this.dom.buttons.push( nButton );
		}

		if ( this.s.showAll )
		{
			nButton = this._fnDomShowXButton( this.s.showAll, true );
			nButton.className += " ColVis_ShowAll";
			this.dom.buttons.push( nButton );
		}

		if ( this.s.showNone )
		{
			nButton = this._fnDomShowXButton( this.s.showNone, false );
			nButton.className += " ColVis_ShowNone";
			this.dom.buttons.push( nButton );
		}

		$(this.dom.collection).append( this.dom.buttons );
	}
function ()
	{
		var
			nButton,
			columns = this.s.dt.aoColumns;

		if ( $.inArray( 'all', this.s.aiExclude ) === -1 ) {
			for ( var i=0, iLen=columns.length ; i<iLen ; i++ )
			{
				if ( $.inArray( i, this.s.aiExclude ) === -1 )
				{
					nButton = this._fnDomColumnButton( i );
					nButton.__columnIdx = i;
					this.dom.buttons.push( nButton );
				}
			}
		}

		if ( this.s.order === 'alpha' ) {
			this.dom.buttons.sort( function ( a, b ) {
				var titleA = columns[ a.__columnIdx ].sTitle;
				var titleB = columns[ b.__columnIdx ].sTitle;

				return titleA === titleB ?
					0 :
					titleA < titleB ?
						-1 :
						1;
			} );
		}

		if ( this.s.restore )
		{
			nButton = this._fnDomRestoreButton();
			nButton.className += " ColVis_Restore";
			this.dom.buttons.push( nButton );
		}

		if ( this.s.showAll )
		{
			nButton = this._fnDomShowXButton( this.s.showAll, true );
			nButton.className += " ColVis_ShowAll";
			this.dom.buttons.push( nButton );
		}

		if ( this.s.showNone )
		{
			nButton = this._fnDomShowXButton( this.s.showNone, false );
			nButton.className += " ColVis_ShowNone";
			this.dom.buttons.push( nButton );
		}

		$(this.dom.collection).append( this.dom.buttons );
	}
function ( ) { var nButton , columns = this . s . dt . aoColumns ; if ( $ . inArray ( 'all' , this . s . aiExclude ) === - 1 ) { for ( var i = 0 , iLen = columns . length ; i < iLen ; i ++ ) { if ( $ . inArray ( i , this . s . aiExclude ) === - 1 ) { nButton = this . _fnDomColumnButton ( i ) ; nButton . __columnIdx = i ; this . dom . buttons . push ( nButton ) ; } } } if ( this . s . order === 'alpha' ) { this . dom . buttons . sort ( function ( a , b ) { var titleA = columns [ a . __columnIdx ] . sTitle ; var titleB = columns [ b . __columnIdx ] . sTitle ; return titleA === titleB ? 0 : titleA < titleB ? - 1 : 1 ; } ) ; } if ( this . s . restore ) { nButton = this . _fnDomRestoreButton ( ) ; nButton . className += " ColVis_Restore" ; this . dom . buttons . push ( nButton ) ; } if ( this . s . showAll ) { nButton = this . _fnDomShowXButton ( this . s . showAll , true ) ; nButton . className += " ColVis_ShowAll" ; this . dom . buttons . push ( nButton ) ; } if ( this . s . showNone ) { nButton = this . _fnDomShowXButton ( this . s . showNone , false ) ; nButton . className += " ColVis_ShowNone" ; this . dom . buttons . push ( nButton ) ; } $ ( this . dom . collection ) . append ( this . dom . buttons ) ; }
Loop through the columns in the table and as a new button for each one.
@method  _fnAddButtons
@returns void
@private
Loop through the columns in the table and as a new button for each one .