Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for table.ajax.reload() with data source "ssd" and ajax object in configuration #135

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions js/api/api.ajax.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@


var __reload = function ( settings, holdPosition, callback ) {
// Not an ajax source - abort
if ( settings.ajax == null ) {
return;
}

// Use the draw event to trigger a callback
if ( callback ) {
var api = new _Api( settings );
Expand Down
7 changes: 5 additions & 2 deletions js/core/core.ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function _fnBuildAjax( oSettings, data, fn )

// Remove the data property as we've resolved it already and don't want
// jQuery to do it again (it is restored at the end of the function)
ajax.data = null; // or undefined - for IE / Safari
delete ajax.data;
}

Expand Down Expand Up @@ -136,8 +137,10 @@ function _fnBuildAjax( oSettings, data, fn )
// Object to extend the base settings
oSettings.jqXHR = $.ajax( $.extend( baseAjax, ajax ) );

// Restore for next time around
ajax.data = ajaxData;
if (ajax && ajaxData) {
// Restore for next time around
ajax.data = ajaxData;
}
}
}

Expand Down