mirror of
https://github.com/DataTables/DataTables.git
synced 2024-11-29 11:24:10 +01:00
Examples update: Update the JSONP and pipelining examples to store the returned jqXHR object int he settings object. Helpful for the debugger so we can see what the sever says
This commit is contained in:
parent
f0c91b7a9c
commit
c09b0b89ea
@ -17,8 +17,8 @@
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "scripts/jsonp.php",
|
||||
"fnServerData": function( sUrl, aoData, fnCallback ) {
|
||||
$.ajax( {
|
||||
"fnServerData": function( sUrl, aoData, fnCallback, oSettings ) {
|
||||
oSettings.jqXHR = $.ajax( {
|
||||
"url": sUrl,
|
||||
"data": aoData,
|
||||
"success": fnCallback,
|
||||
@ -76,8 +76,8 @@
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "scripts/jsonp.php",
|
||||
"fnServerData": function( sUrl, aoData, fnCallback ) {
|
||||
$.ajax( {
|
||||
"fnServerData": function( sUrl, aoData, fnCallback, oSettings ) {
|
||||
oSettings.jqXHR = $.ajax( {
|
||||
"url": sUrl,
|
||||
"data": aoData,
|
||||
"success": fnCallback,
|
||||
|
@ -39,7 +39,7 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
function fnDataTablesPipeline ( sSource, aoData, fnCallback ) {
|
||||
function fnDataTablesPipeline ( sSource, aoData, fnCallback, oSettings ) {
|
||||
var iPipe = 5; /* Ajust the pipe size */
|
||||
|
||||
var bNeedServer = false;
|
||||
@ -91,7 +91,7 @@
|
||||
fnSetKey( aoData, "iDisplayStart", iRequestStart );
|
||||
fnSetKey( aoData, "iDisplayLength", iRequestLength*iPipe );
|
||||
|
||||
$.getJSON( sSource, aoData, function (json) {
|
||||
oSettings.jqXHR = $.getJSON( sSource, aoData, function (json) {
|
||||
/* Callback processing */
|
||||
oCache.lastJson = jQuery.extend(true, {}, json);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user