mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-17 15:54:14 +01:00
Size: Remove _fnColumnOrdering
and replace with a _pluck call
This commit is contained in:
parent
16dea34d8c
commit
c95f8c88d6
@ -1 +1 @@
|
||||
01c0282a6f2b9b9ff6db0b05bffda9c30ef93d07
|
||||
6bfb230c228aeab96fc3ffcc0d8394ac32de9ac5
|
||||
|
25
media/js/jquery.dataTables.js
vendored
25
media/js/jquery.dataTables.js
vendored
@ -495,28 +495,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the column ordering that DataTables expects
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @returns {string} comma separated list of names
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnColumnOrdering ( oSettings )
|
||||
{
|
||||
var sNames = '';
|
||||
for ( var i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
||||
{
|
||||
sNames += oSettings.aoColumns[i].sName+',';
|
||||
}
|
||||
if ( sNames.length == iLen )
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return sNames.slice(0, -1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Take the column definitions and static columns arrays and calculate how
|
||||
* they relate to column indexes. The callback function will then apply the
|
||||
@ -2049,7 +2027,7 @@
|
||||
|
||||
param( 'sEcho', oSettings.iDraw );
|
||||
param( 'iColumns', iColumns );
|
||||
param( 'sColumns', _fnColumnOrdering(oSettings) );
|
||||
param( 'sColumns', _pluck( aoColumns, 'sName' ).join(',') );
|
||||
param( 'iDisplayStart', oSettings._iDisplayStart );
|
||||
param( 'iDisplayLength', oSettings.oFeatures.bPaginate !== false ?
|
||||
oSettings._iDisplayLength : -1
|
||||
@ -5434,7 +5412,6 @@
|
||||
"_fnGetDataMaster": _fnGetDataMaster,
|
||||
"_fnEscapeRegex": _fnEscapeRegex,
|
||||
"_fnDeleteIndex": _fnDeleteIndex,
|
||||
"_fnColumnOrdering": _fnColumnOrdering,
|
||||
"_fnLog": _fnLog,
|
||||
"_fnClearTable": _fnClearTable,
|
||||
"_fnSaveState": _fnSaveState,
|
||||
|
Loading…
x
Reference in New Issue
Block a user