1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-28 10:24:10 +01:00

Slight change so that the truncated data in the ajax space contains both the start and the end of the json with a message in the middle.

Jira Issue DD-1294
This commit is contained in:
Allan Jardine 2020-05-21 09:29:53 +00:00
parent f3f0a291cd
commit 5e5295febd
2 changed files with 5 additions and 4 deletions

View File

@ -1 +1 @@
ed72bfc2985f81b9c4e86fd2835dabd3fa193417
a150bb592baaba3196a7c879602aa617da9ecc42

View File

@ -67,9 +67,10 @@ if ( window.$ ) {
var strArr = str.split('\n');
if(strArr.length > 1000){
strArr.splice(999);
strArr.push('...');
str = strArr.join('\n');
var first = strArr.splice(0, 500);
var second = strArr.splice(strArr.length - 499, 499);
first.push('... Truncated for berevity - look at your browsers network inspector to see the full source ...');
str = first.concat(second).join('\n');
}
$('div.tabs div.ajax').append(