From 320f53e217740b73d511c44b74026e46bbac2905 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Mon, 6 Aug 2012 20:41:49 +0100 Subject: [PATCH] New: When making an Ajax call for data (fnServerData) and the server responds with the JSON parameter "sError" set, Data Tables will alert this out. Typically end users should never see this - it is useful for error reporting from the server though. --- media/js/jquery.dataTables.js | 2 +- media/src/model/model.defaults.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index a9ac3ca8..a4cd0e40 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -8686,7 +8686,7 @@ "data": aoData, "success": function (json) { if ( json.sError ) { - alert( json.sError ); + oSettings.oApi._fnLog( oSettings, 0, json.sError ); } $(oSettings.oInstance).trigger('xhr', oSettings); diff --git a/media/src/model/model.defaults.js b/media/src/model/model.defaults.js index f09c142b..4fa49a0f 100644 --- a/media/src/model/model.defaults.js +++ b/media/src/model/model.defaults.js @@ -919,7 +919,7 @@ DataTable.defaults = { "data": aoData, "success": function (json) { if ( json.sError ) { - alert( json.sError ); + oSettings.oApi._fnLog( oSettings, 0, json.sError ); } $(oSettings.oInstance).trigger('xhr', oSettings);