mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-01 13:24:10 +01:00
Fix #168 - fnInitComplete should give json as second parameter as well
- When server-side processing is enabled, fnInitComplete will now be passed a second parameter, the json returned from the server for that first draw, matching the Ajax data source with client-side processing option.
This commit is contained in:
parent
baa16632ec
commit
5a0c1f5ac6
17
media/js/jquery.dataTables.js
vendored
17
media/js/jquery.dataTables.js
vendored
@ -1575,15 +1575,6 @@
|
||||
oSettings.bSorted = false;
|
||||
oSettings.bFiltered = false;
|
||||
oSettings.bDrawing = false;
|
||||
|
||||
if ( oSettings.oFeatures.bServerSide )
|
||||
{
|
||||
_fnProcessingDisplay( oSettings, false );
|
||||
if ( !oSettings._bInitComplete )
|
||||
{
|
||||
_fnInitComplete( oSettings );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2121,6 +2112,12 @@
|
||||
|
||||
oSettings.bAjaxDataGet = false;
|
||||
_fnDraw( oSettings );
|
||||
|
||||
if ( ! oSettings._bInitComplete )
|
||||
{
|
||||
_fnInitComplete( oSettings, json );
|
||||
}
|
||||
|
||||
oSettings.bAjaxDataGet = true;
|
||||
_fnProcessingDisplay( oSettings, false );
|
||||
}
|
||||
@ -2759,7 +2756,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
/* Server-side processing initialisation complete is done at the end of _fnDraw */
|
||||
/* Server-side processing init complete is done by _fnAjaxUpdateDraw */
|
||||
if ( !oSettings.oFeatures.bServerSide )
|
||||
{
|
||||
_fnProcessingDisplay( oSettings, false );
|
||||
|
@ -237,6 +237,12 @@ function _fnAjaxUpdateDraw ( oSettings, json )
|
||||
|
||||
oSettings.bAjaxDataGet = false;
|
||||
_fnDraw( oSettings );
|
||||
|
||||
if ( ! oSettings._bInitComplete )
|
||||
{
|
||||
_fnInitComplete( oSettings, json );
|
||||
}
|
||||
|
||||
oSettings.bAjaxDataGet = true;
|
||||
_fnProcessingDisplay( oSettings, false );
|
||||
}
|
||||
|
@ -490,15 +490,6 @@ function _fnDraw( oSettings )
|
||||
oSettings.bSorted = false;
|
||||
oSettings.bFiltered = false;
|
||||
oSettings.bDrawing = false;
|
||||
|
||||
if ( oSettings.oFeatures.bServerSide )
|
||||
{
|
||||
_fnProcessingDisplay( oSettings, false );
|
||||
if ( !oSettings._bInitComplete )
|
||||
{
|
||||
_fnInitComplete( oSettings );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -98,7 +98,7 @@ function _fnInitialise ( oSettings )
|
||||
return;
|
||||
}
|
||||
|
||||
/* Server-side processing initialisation complete is done at the end of _fnDraw */
|
||||
/* Server-side processing init complete is done by _fnAjaxUpdateDraw */
|
||||
if ( !oSettings.oFeatures.bServerSide )
|
||||
{
|
||||
_fnProcessingDisplay( oSettings, false );
|
||||
|
Loading…
Reference in New Issue
Block a user