Setting sZeroRecords Breaks sProcessing
Setting sZeroRecords Breaks sProcessing
I'm adding sZeroRecords to my datatable, and when I do, my settings for sProcessing are being ignored. Any idea what I'm doing that would cause that?
This one works:
[code]
$(function() {
$('.datatable').dataTable({
"oLanguage": {
"sSearch": "Search",
"sProcessing": ''
},
"sPaginationType": "full_numbers",
"iDisplayLength": 20,
"bProcessing": true,
"bServerSide": true,
"bLengthChange": false,
"bStateSave": true,
"bFilter": true,
"bAutoWidth": false,
'aaSorting': [[0, 'desc']],
'sAjaxSource': '/jobs/datatable_response',
"aoColumns": [
null,{
'sType': 'html',
'bSortable':true,
'bSearchable':true
},null,null,null,null,null,null,{
'sType': 'html',
'bSortable':true,
'bSearchable':true
,'sClass':'state'
}
],
'fnRowCallback': function( nRow, aData, iDisplayIndex ) { $('td:eq(8)', nRow).addClass(aData[8].split('<')[0].replace(' ','_').toLowerCase()); $(nRow).attr('data-href',$('td:eq(1) a', nRow).attr('href')); return nRow; },
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( );
$.getJSON( sSource, aoData, function (json) {
fnCallback(json);
} );
}
}).fnSetFilteringDelay(500);
});
[/code]
This one breaks:
[code]
$(function() {
$('.datatable').dataTable({
"oLanguage": {
"sSearch": "Search",
"sProcessing": ''
},
"sPaginationType": "full_numbers",
"iDisplayLength": 20,
"bProcessing": true,
"bServerSide": true,
"bLengthChange": false,
"bStateSave": true,
"bFilter": true,
"bAutoWidth": false,
'aaSorting': [[0, 'desc']],
'sAjaxSource': '/jobs/datatable_response',
"oLanguage": {"sZeroRecords": "No Records Found"},
"aoColumns": [
null,{
'sType': 'html',
'bSortable':true,
'bSearchable':true
},null,null,null,null,null,null,{
'sType': 'html',
'bSortable':true,
'bSearchable':true
,'sClass':'state'
}
],
'fnRowCallback': function( nRow, aData, iDisplayIndex ) { $('td:eq(8)', nRow).addClass(aData[8].split('<')[0].replace(' ','_').toLowerCase()); $(nRow).attr('data-href',$('td:eq(1) a', nRow).attr('href')); return nRow; },
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( );
$.getJSON( sSource, aoData, function (json) {
fnCallback(json);
} );
}
}).fnSetFilteringDelay(500);
});
[/code]
The only difference is the removal of
[code]"oLanguage": {"sZeroRecords": "No Records Found"},[/code]
What's going on here?
This one works:
[code]
$(function() {
$('.datatable').dataTable({
"oLanguage": {
"sSearch": "Search",
"sProcessing": ''
},
"sPaginationType": "full_numbers",
"iDisplayLength": 20,
"bProcessing": true,
"bServerSide": true,
"bLengthChange": false,
"bStateSave": true,
"bFilter": true,
"bAutoWidth": false,
'aaSorting': [[0, 'desc']],
'sAjaxSource': '/jobs/datatable_response',
"aoColumns": [
null,{
'sType': 'html',
'bSortable':true,
'bSearchable':true
},null,null,null,null,null,null,{
'sType': 'html',
'bSortable':true,
'bSearchable':true
,'sClass':'state'
}
],
'fnRowCallback': function( nRow, aData, iDisplayIndex ) { $('td:eq(8)', nRow).addClass(aData[8].split('<')[0].replace(' ','_').toLowerCase()); $(nRow).attr('data-href',$('td:eq(1) a', nRow).attr('href')); return nRow; },
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( );
$.getJSON( sSource, aoData, function (json) {
fnCallback(json);
} );
}
}).fnSetFilteringDelay(500);
});
[/code]
This one breaks:
[code]
$(function() {
$('.datatable').dataTable({
"oLanguage": {
"sSearch": "Search",
"sProcessing": ''
},
"sPaginationType": "full_numbers",
"iDisplayLength": 20,
"bProcessing": true,
"bServerSide": true,
"bLengthChange": false,
"bStateSave": true,
"bFilter": true,
"bAutoWidth": false,
'aaSorting': [[0, 'desc']],
'sAjaxSource': '/jobs/datatable_response',
"oLanguage": {"sZeroRecords": "No Records Found"},
"aoColumns": [
null,{
'sType': 'html',
'bSortable':true,
'bSearchable':true
},null,null,null,null,null,null,{
'sType': 'html',
'bSortable':true,
'bSearchable':true
,'sClass':'state'
}
],
'fnRowCallback': function( nRow, aData, iDisplayIndex ) { $('td:eq(8)', nRow).addClass(aData[8].split('<')[0].replace(' ','_').toLowerCase()); $(nRow).attr('data-href',$('td:eq(1) a', nRow).attr('href')); return nRow; },
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( );
$.getJSON( sSource, aoData, function (json) {
fnCallback(json);
} );
}
}).fnSetFilteringDelay(500);
});
[/code]
The only difference is the removal of
[code]"oLanguage": {"sZeroRecords": "No Records Found"},[/code]
What's going on here?
This discussion has been closed.
Replies
Allan