Modifying oSettings.aanFeatures.r
Modifying oSettings.aanFeatures.r
psharp
Posts: 39Questions: 0Answers: 0
Greetings and thanks for this awesome plugin!
I've looked and looked through google searches and the documentation on how to change this, but could not find any reference to it.
I would like to change the default "Processing..." text box (enabled with 'bProcessing' : true.
We have a wait mask element that people are familiar with seeing and the datatables "Processing..." screen is causing issues (visual preference only)
IS there a way to modify / set this during the init call of datatables?
I've tried adding :
'fnPreDrawCallback' : function(oSettings) {oSettings.aanFeatures.r[0] = $('#wait_mask')[0];return true;}
which does not appear to be working.
Any ideas?
I've looked and looked through google searches and the documentation on how to change this, but could not find any reference to it.
I would like to change the default "Processing..." text box (enabled with 'bProcessing' : true.
We have a wait mask element that people are familiar with seeing and the datatables "Processing..." screen is causing issues (visual preference only)
IS there a way to modify / set this during the init call of datatables?
I've tried adding :
'fnPreDrawCallback' : function(oSettings) {oSettings.aanFeatures.r[0] = $('#wait_mask')[0];return true;}
which does not appear to be working.
Any ideas?
This discussion has been closed.
Replies
Allan
Thanks a million. It took all of 14 seconds to add your recommended change and all is good.
For those who are wondering how, here is a copy of my init (sans showHide function because it is not relevant):
[code]
$(document).ready(function(){
var oTable = $('#dtable')
.bind('processing',function(e, oSettings, bShow){showHide(bShow)})
.dataTable({
'aoColumnDefs' : [{'bSortable' : false, 'aTargets' : [4,12]}],
'oLanguage' : {'sSearch' : 'Highlight in results:'},
'bJQueryUI' : true,
'bProcessing' : false,
'bServerSide' : true,
'bPaging' : true,
'sPaginationType' : 'full_numbers',
'aLengthMenu' :[[10,20,30,50,100],[10,20,30,50,100]],
'iDisplayLength' : 20,
'fnInitComplete' : function(){this.fnSetFilteringDelay(750);},
'sAjaxSource' : 'controller/xxxx.php?action=history_ajax',
'fnServerData' : function( sSource, aoData, fnCallback ) {
$.getJSON(sSource, aoData, function(json){
totals = json.fac_totals; // important! Sent by the controller
fnCallback(json);
});
}
})
[/code]