1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-18 16:54:14 +01:00

Merge branch 'master' of github.com:DataTables/DataTables

This commit is contained in:
Allan Jardine 2012-08-22 16:39:25 +01:00
commit 93774f4d7d
3 changed files with 14 additions and 9 deletions

View File

@ -78,9 +78,11 @@
require('api.internal.js');
var _that = this;
return this.each(function() {
this.each(function() {
require('core.constructor.js');
} );
_that = null;
return this;
};
require('api.static.js');

View File

@ -474,20 +474,23 @@ this.fnDestroy = function ( bRemove )
var nBody = oSettings.nTBody;
var i, iLen;
bRemove = (bRemove===undefined) ? false : true;
bRemove = (bRemove===undefined) ? false : bRemove;
/* Flag to note that the table is currently being destroyed - no action should be taken */
oSettings.bDestroying = true;
/* Fire off the destroy callbacks for plug-ins etc */
_fnCallbackFire( oSettings, "aoDestroyCallback", "destroy", [oSettings] );
/* Restore hidden columns */
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
/* If the table is not being removed, restore the hidden columns */
if ( !bRemove )
{
if ( oSettings.aoColumns[i].bVisible === false )
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
{
this.fnSetColumnVis( i, true );
if ( oSettings.aoColumns[i].bVisible === false )
{
this.fnSetColumnVis( i, true );
}
}
}
@ -581,6 +584,7 @@ this.fnDestroy = function ( bRemove )
/* End it all */
oSettings = null;
oInit = null;
};

View File

@ -1,5 +1,4 @@
/**
* Add a data array to the table, creating DOM node etc. This is the parallel to
* _fnGatherData, but for adding rows from a Javascript source, rather than a
@ -64,7 +63,7 @@ function _fnAddData ( oSettings, aDataSupplied )
/* Add to the display array */
oSettings.aiDisplayMaster.push( iRow );
/* Create the DOM imformation */
/* Create the DOM information */
if ( !oSettings.oFeatures.bDeferRender )
{
_fnCreateTr( oSettings, iRow );