diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index d4e62fc2..3ee6ed3b 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -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 ); diff --git a/media/src/core/core.ajax.js b/media/src/core/core.ajax.js index d5bdfcbf..321cb602 100644 --- a/media/src/core/core.ajax.js +++ b/media/src/core/core.ajax.js @@ -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 ); } diff --git a/media/src/core/core.draw.js b/media/src/core/core.draw.js index cf63eb6f..71c80833 100644 --- a/media/src/core/core.draw.js +++ b/media/src/core/core.draw.js @@ -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 ); - } - } } diff --git a/media/src/core/core.init.js b/media/src/core/core.init.js index ce251c30..8038e468 100644 --- a/media/src/core/core.init.js +++ b/media/src/core/core.init.js @@ -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 );