* Show the processing element if an action takes longer than a given time * * @param {*} settings DataTables settings object * @param {*} enable Do (true) or not (false) async processing (local feature enablement) * @param {*} run Function to run
(settings, enable, run)
| 4563 | * @param {*} run Function to run |
| 4564 | */ |
| 4565 | function _fnProcessingRun(settings, enable, run) { |
| 4566 | if (!enable) { |
| 4567 | // Immediate execution, synchronous |
| 4568 | run() |
| 4569 | } else { |
| 4570 | _fnProcessingDisplay(settings, true) |
| 4571 | |
| 4572 | // Allow the processing display to show if needed |
| 4573 | setTimeout(function () { |
| 4574 | run() |
| 4575 | |
| 4576 | _fnProcessingDisplay(settings, false) |
| 4577 | }, 0) |
| 4578 | } |
| 4579 | } |
| 4580 | /** |
| 4581 | * Add any control elements for the table - specifically scrolling |
| 4582 | * @param {object} settings dataTables settings object |
no test coverage detected