1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-30 23:52:11 +01:00

Dev: Get the library size back under the target 70000 bytes. Its a bit of a cheap shoot this one, but every little helps!

This commit is contained in:
Allan Jardine 2012-01-31 08:42:40 +00:00
parent a0ebd9ffec
commit 4a4b6f6d58
2 changed files with 14 additions and 12 deletions

View File

@ -5583,6 +5583,7 @@
this.fnIsOpen = function( nTr )
{
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
var aoOpenRows = oSettings.aoOpenRows;
for ( var i=0 ; i<oSettings.aoOpenRows.length ; i++ )
{
@ -5714,11 +5715,11 @@
{
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
var i, iLen;
var iColumns = oSettings.aoColumns.length;
var aoColumns = oSettings.aoColumns;
var nTd, nCell, anTrs, jqChildren, bAppend, iBefore;
/* No point in doing anything if we are requesting what is already true */
if ( oSettings.aoColumns[iCol].bVisible == bShow )
if ( aoColumns[iCol].bVisible == bShow )
{
return;
}
@ -5729,7 +5730,7 @@
var iInsert = 0;
for ( i=0 ; i<iCol ; i++ )
{
if ( oSettings.aoColumns[i].bVisible )
if ( aoColumns[i].bVisible )
{
iInsert++;
}
@ -5741,9 +5742,9 @@
/* Which coloumn should we be inserting before? */
if ( !bAppend )
{
for ( i=iCol ; i<iColumns ; i++ )
for ( i=iCol ; i<aoColumns.length ; i++ )
{
if ( oSettings.aoColumns[i].bVisible )
if ( aoColumns[i].bVisible )
{
iBefore = i;
break;
@ -5785,7 +5786,7 @@
}
/* Clear to set the visible flag */
oSettings.aoColumns[iCol].bVisible = bShow;
aoColumns[iCol].bVisible = bShow;
/* Redraw the header and footer based on the new column visibility */
_fnDrawHead( oSettings, oSettings.aoHeader );

View File

@ -829,6 +829,7 @@ this.fnGetPosition = function( nNode )
this.fnIsOpen = function( nTr )
{
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
var aoOpenRows = oSettings.aoOpenRows;
for ( var i=0 ; i<oSettings.aoOpenRows.length ; i++ )
{
@ -960,11 +961,11 @@ this.fnSetColumnVis = function ( iCol, bShow, bRedraw )
{
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
var i, iLen;
var iColumns = oSettings.aoColumns.length;
var aoColumns = oSettings.aoColumns;
var nTd, nCell, anTrs, jqChildren, bAppend, iBefore;
/* No point in doing anything if we are requesting what is already true */
if ( oSettings.aoColumns[iCol].bVisible == bShow )
if ( aoColumns[iCol].bVisible == bShow )
{
return;
}
@ -975,7 +976,7 @@ this.fnSetColumnVis = function ( iCol, bShow, bRedraw )
var iInsert = 0;
for ( i=0 ; i<iCol ; i++ )
{
if ( oSettings.aoColumns[i].bVisible )
if ( aoColumns[i].bVisible )
{
iInsert++;
}
@ -987,9 +988,9 @@ this.fnSetColumnVis = function ( iCol, bShow, bRedraw )
/* Which coloumn should we be inserting before? */
if ( !bAppend )
{
for ( i=iCol ; i<iColumns ; i++ )
for ( i=iCol ; i<aoColumns.length ; i++ )
{
if ( oSettings.aoColumns[i].bVisible )
if ( aoColumns[i].bVisible )
{
iBefore = i;
break;
@ -1031,7 +1032,7 @@ this.fnSetColumnVis = function ( iCol, bShow, bRedraw )
}
/* Clear to set the visible flag */
oSettings.aoColumns[iCol].bVisible = bShow;
aoColumns[iCol].bVisible = bShow;
/* Redraw the header and footer based on the new column visibility */
_fnDrawHead( oSettings, oSettings.aoHeader );