mirror of
https://github.com/DataTables/DataTables.git
synced 2025-03-15 16:29:16 +01:00
Fixed: Remove the 'sNames' parameter that was introduced for server-side processing in 1.7.4. The parameter 'sColumns' actually performs exactly this task already. Doh. Also update the example PHP to take this into account - 3218
This commit is contained in:
parent
e4e2b0d11b
commit
eec881b8ac
@ -8,13 +8,13 @@
|
||||
*
|
||||
* 1. Data from server to client - notice that the $aColumns array below is in a different
|
||||
* order to that from the array in server_processing.php, but DataTables will render the
|
||||
* table in the same order. This reordering is done on the client-side by using the sNames
|
||||
* table in the same order. This reordering is done on the client-side by using the sColumns
|
||||
* parameter which is passed back, stating the order which the server is sending data back in.
|
||||
* DataTables will compaire this to the sName parameter for each column and reorder as needed.
|
||||
*
|
||||
* 2. Data from client to server - in order that the columns can be sent to the server in
|
||||
* any order (it is expected in this script that the server-side will always work with a static
|
||||
* array which is not reordered dynamically) DataTables will send the parameter 'sNames' which
|
||||
* array which is not reordered dynamically) DataTables will send the parameter 'sColumns' which
|
||||
* like it's return counterpart is a comma seperated list of the column names, telling the
|
||||
* server-side what order the columns are being shown on the client-side. As such it is now
|
||||
* possible to realise what column sSearch_{i} (for example) refers to. This is done by a look
|
||||
@ -66,7 +66,7 @@
|
||||
/*
|
||||
* Names - this is specific to server-side column re-ordering
|
||||
*/
|
||||
$aNames = explode( ',', $_GET['sNames'] );
|
||||
$aNames = explode( ',', $_GET['sColumns'] );
|
||||
|
||||
|
||||
/*
|
||||
|
8
media/js/jquery.dataTables.js
vendored
8
media/js/jquery.dataTables.js
vendored
@ -3162,14 +3162,6 @@
|
||||
aoData.push( { "name": "iDisplayLength", "value": oSettings.oFeatures.bPaginate !== false ?
|
||||
oSettings._iDisplayLength : -1 } );
|
||||
|
||||
/* Column names */
|
||||
var aNames = [];
|
||||
for ( i=0 ; i<iColumns ; i++ )
|
||||
{
|
||||
aNames.push( oSettings.aoColumns[i].sName );
|
||||
}
|
||||
aoData.push( { "name": "sNames", "value": aNames.join(',') } );
|
||||
|
||||
/* Filtering */
|
||||
if ( oSettings.oFeatures.bFilter !== false )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user