public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/ColVis/js/dataTables.colVis.js
function ()
	{
		var columns = this.s.dt.aoColumns;
		var buttons = this.dom.buttons;
		var groups = this.s.aoGroups;
		var button;

		for ( var i=0, ien=buttons.length ; i<ien ; i++ ) {
			button = buttons[i];

			if ( button.__columnIdx !== undefined ) {
				$('input', button).prop( 'checked', columns[ button.__columnIdx ].bVisible );
			}
		}

		var allVisible = function ( columnIndeces ) {
			for ( var k=0, kLen=columnIndeces.length ; k<kLen ; k++ )
			{
				if (  columns[columnIndeces[k]].bVisible === false ) { return false; }
			}
			return true;
		};
		var allHidden = function ( columnIndeces ) {
			for ( var m=0 , mLen=columnIndeces.length ; m<mLen ; m++ )
			{
				if ( columns[columnIndeces[m]].bVisible === true ) { return false; }
			}
			return true;
		};

		for ( var j=0, jLen=groups.length ; j<jLen ; j++ )
		{
			if ( allVisible(groups[j].aiColumns) )
			{
				$('input', this.dom.groupButtons[j]).prop('checked', true);
				$('input', this.dom.groupButtons[j]).prop('indeterminate', false);
			}
			else if ( allHidden(groups[j].aiColumns) )
			{
				$('input', this.dom.groupButtons[j]).prop('checked', false);
				$('input', this.dom.groupButtons[j]).prop('indeterminate', false);
			}
			else
			{
				$('input', this.dom.groupButtons[j]).prop('indeterminate', true);
			}
		}
	}
function ()
	{
		var columns = this.s.dt.aoColumns;
		var buttons = this.dom.buttons;
		var groups = this.s.aoGroups;
		var button;

		for ( var i=0, ien=buttons.length ; i<ien ; i++ ) {
			button = buttons[i];

			if ( button.__columnIdx !== undefined ) {
				$('input', button).prop( 'checked', columns[ button.__columnIdx ].bVisible );
			}
		}

		var allVisible = function ( columnIndeces ) {
			for ( var k=0, kLen=columnIndeces.length ; k<kLen ; k++ )
			{
				if (  columns[columnIndeces[k]].bVisible === false ) { return false; }
			}
			return true;
		};
		var allHidden = function ( columnIndeces ) {
			for ( var m=0 , mLen=columnIndeces.length ; m<mLen ; m++ )
			{
				if ( columns[columnIndeces[m]].bVisible === true ) { return false; }
			}
			return true;
		};

		for ( var j=0, jLen=groups.length ; j<jLen ; j++ )
		{
			if ( allVisible(groups[j].aiColumns) )
			{
				$('input', this.dom.groupButtons[j]).prop('checked', true);
				$('input', this.dom.groupButtons[j]).prop('indeterminate', false);
			}
			else if ( allHidden(groups[j].aiColumns) )
			{
				$('input', this.dom.groupButtons[j]).prop('checked', false);
				$('input', this.dom.groupButtons[j]).prop('indeterminate', false);
			}
			else
			{
				$('input', this.dom.groupButtons[j]).prop('indeterminate', true);
			}
		}
	}
function ( ) { var columns = this . s . dt . aoColumns ; var buttons = this . dom . buttons ; var groups = this . s . aoGroups ; var button ; for ( var i = 0 , ien = buttons . length ; i < ien ; i ++ ) { button = buttons [ i ] ; if ( button . __columnIdx !== undefined ) { $ ( 'input' , button ) . prop ( 'checked' , columns [ button . __columnIdx ] . bVisible ) ; } } var allVisible = function ( columnIndeces ) { for ( var k = 0 , kLen = columnIndeces . length ; k < kLen ; k ++ ) { if ( columns [ columnIndeces [ k ] ] . bVisible === false ) { return false ; } } return true ; } ; var allHidden = function ( columnIndeces ) { for ( var m = 0 , mLen = columnIndeces . length ; m < mLen ; m ++ ) { if ( columns [ columnIndeces [ m ] ] . bVisible === true ) { return false ; } } return true ; } ; for ( var j = 0 , jLen = groups . length ; j < jLen ; j ++ ) { if ( allVisible ( groups [ j ] . aiColumns ) ) { $ ( 'input' , this . dom . groupButtons [ j ] ) . prop ( 'checked' , true ) ; $ ( 'input' , this . dom . groupButtons [ j ] ) . prop ( 'indeterminate' , false ) ; } else if ( allHidden ( groups [ j ] . aiColumns ) ) { $ ( 'input' , this . dom . groupButtons [ j ] ) . prop ( 'checked' , false ) ; $ ( 'input' , this . dom . groupButtons [ j ] ) . prop ( 'indeterminate' , false ) ; } else { $ ( 'input' , this . dom . groupButtons [ j ] ) . prop ( 'indeterminate' , true ) ; } } }
On each table draw, check the visibility checkboxes as needed. This allows any process to
update the table's column visibility and ColVis will still be accurate.
@method  _fnDrawCallback
@returns void
@private
On each table draw check the visibility checkboxes as needed . This allows any process to update the table s column visibility and ColVis will still be accurate .