MCPcopy Create free account
hub / github.com/breck7/scroll / _processingHtml

Function _processingHtml

external/.datatables.js:4518–4542  ·  view source on GitHub ↗

* Generate the node required for the processing node * @param {object} settings DataTables settings object

(settings)

Source from the content-addressed store, hash-verified

4516 * @param {object} settings DataTables settings object
4517 */
4518 function _processingHtml(settings) {
4519 var table = settings.nTable
4520 var scrolling = settings.oScroll.sX !== "" || settings.oScroll.sY !== ""
4521
4522 if (settings.oFeatures.bProcessing) {
4523 var n = $("<div/>", {
4524 id: settings.sTableId + "_processing",
4525 class: settings.oClasses.processing.container,
4526 role: "status"
4527 })
4528 .html(settings.oLanguage.sProcessing)
4529 .append("<div><div></div><div></div><div></div><div></div></div>")
4530
4531 // Different positioning depending on if scrolling is enabled or not
4532 if (scrolling) {
4533 n.prependTo($("div.dt-scroll", settings.nTableWrapper))
4534 } else {
4535 n.insertBefore(table)
4536 }
4537
4538 $(table).on("processing.dt.DT", function (e, s, show) {
4539 n.css("display", show ? "block" : "none")
4540 })
4541 }
4542 }
4543
4544 /**
4545 * Display or hide the processing indicator

Callers 1

_fnAddOptionsHtmlFunction · 0.85

Calls 1

$Function · 0.70

Tested by

no test coverage detected