1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-03-11 12:29: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'); require('api.internal.js');
var _that = this; var _that = this;
return this.each(function() { this.each(function() {
require('core.constructor.js'); require('core.constructor.js');
} ); } );
_that = null;
return this;
}; };
require('api.static.js'); require('api.static.js');

View File

@ -474,7 +474,7 @@ this.fnDestroy = function ( bRemove )
var nBody = oSettings.nTBody; var nBody = oSettings.nTBody;
var i, iLen; 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 */ /* Flag to note that the table is currently being destroyed - no action should be taken */
oSettings.bDestroying = true; oSettings.bDestroying = true;
@ -482,7 +482,9 @@ this.fnDestroy = function ( bRemove )
/* Fire off the destroy callbacks for plug-ins etc */ /* Fire off the destroy callbacks for plug-ins etc */
_fnCallbackFire( oSettings, "aoDestroyCallback", "destroy", [oSettings] ); _fnCallbackFire( oSettings, "aoDestroyCallback", "destroy", [oSettings] );
/* Restore hidden columns */ /* If the table is not being removed, restore the hidden columns */
if ( !bRemove )
{
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ ) for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
{ {
if ( oSettings.aoColumns[i].bVisible === false ) if ( oSettings.aoColumns[i].bVisible === false )
@ -490,6 +492,7 @@ this.fnDestroy = function ( bRemove )
this.fnSetColumnVis( i, true ); this.fnSetColumnVis( i, true );
} }
} }
}
/* Blitz all DT events */ /* Blitz all DT events */
$(oSettings.nTableWrapper).find('*').andSelf().unbind('.DT'); $(oSettings.nTableWrapper).find('*').andSelf().unbind('.DT');
@ -581,6 +584,7 @@ this.fnDestroy = function ( bRemove )
/* End it all */ /* End it all */
oSettings = null; 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 * 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 * _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 */ /* Add to the display array */
oSettings.aiDisplayMaster.push( iRow ); oSettings.aiDisplayMaster.push( iRow );
/* Create the DOM imformation */ /* Create the DOM information */
if ( !oSettings.oFeatures.bDeferRender ) if ( !oSettings.oFeatures.bDeferRender )
{ {
_fnCreateTr( oSettings, iRow ); _fnCreateTr( oSettings, iRow );