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

Merge branch 'master' of github.com:DataTables/DataTablesSrc

This commit is contained in:
Allan Jardine 2020-05-21 09:31:59 +00:00
parent adef96b700
commit c1e67aec89
2 changed files with 11 additions and 1 deletions

View File

@ -1 +1 @@
b3feb8979f2c7d4b43816b998443fb647a93cbdb
39f1b4feeaea2ca273874e711e1fa29139e1995a

View File

@ -28,6 +28,7 @@ if ( window.$ ) {
// init html
var table = $('<p/>').append( $('table').clone() ).html();
var demoHtml = $.trim( $('div.demo-html').html() );
if ( demoHtml ) {
@ -63,6 +64,15 @@ if ( window.$ ) {
str = JSON.stringify( str, null, 2 );
} catch ( e ) {}
var strArr = str.split('\n');
if(strArr.length > 1000){
var first = strArr.splice(0, 500);
var second = strArr.splice(strArr.length - 499, 499);
first.push("\n\n... Truncated for brevity - look at your browser's network inspector to see the full source ...\n\n");
str = first.concat(second).join('\n');
}
$('div.tabs div.ajax').append(
$('<code class="multiline language-js"/>').text( str )
);