| 4 |
lars |
1 |
/**
|
|
|
2 |
* When doing some heavy processing of your own (for example using fnOpen with
|
|
|
3 |
* data loading from the server) it can be useful to make use of the
|
|
|
4 |
* 'processing' indicator built-into DataTables. This plug-in function exposes
|
|
|
5 |
* the internal DataTables function so it can be used for exactly this.
|
|
|
6 |
*
|
|
|
7 |
* @name fnProcessingIndicator
|
|
|
8 |
* @summary Show and hide the DataTables processing element through the API.
|
|
|
9 |
* @author Allan Chappell
|
|
|
10 |
*
|
|
|
11 |
* @param {boolean} [onoff=true] Show (`true`) or hide (`false`) the processing
|
|
|
12 |
* element.
|
|
|
13 |
*
|
|
|
14 |
* @example
|
|
|
15 |
* var table = $('#example').dataTable();
|
|
|
16 |
* table.fnProcessingIndicator(); // On
|
|
|
17 |
* table.fnProcessingIndicator(false); // Off
|
|
|
18 |
*/
|
|
|
19 |
|
|
|
20 |
jQuery.fn.dataTableExt.oApi.fnProcessingIndicator = function ( oSettings, onoff )
|
|
|
21 |
{
|
|
|
22 |
if ( onoff === undefined ) {
|
|
|
23 |
onoff = true;
|
|
|
24 |
}
|
|
|
25 |
this.oApi._fnProcessingDisplay( oSettings, onoff );
|
|
|
26 |
};
|