mirror of
https://github.com/DataTables/DataTables.git
synced 2024-11-28 10:24:10 +01:00
Searchpanes examples testing performance have large amounts of rows, which load slowly when the ajax rendering is active, now any ajax loading will only display the first thousand rows under the ajax tab.
Jira Issue DD-1294
This commit is contained in:
parent
7779ad6488
commit
f3f0a291cd
@ -1 +1 @@
|
||||
0dd502bbc4a317ddc1da948e4a2f4ac8977f7489
|
||||
ed72bfc2985f81b9c4e86fd2835dabd3fa193417
|
||||
|
@ -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,14 @@ if ( window.$ ) {
|
||||
str = JSON.stringify( str, null, 2 );
|
||||
} catch ( e ) {}
|
||||
|
||||
var strArr = str.split('\n');
|
||||
|
||||
if(strArr.length > 1000){
|
||||
strArr.splice(999);
|
||||
strArr.push('...');
|
||||
str = strArr.join('\n');
|
||||
}
|
||||
|
||||
$('div.tabs div.ajax').append(
|
||||
$('<code class="multiline language-js"/>').text( str )
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user