diff --git a/web/docroot/js/sensesp.js b/web/docroot/js/sensesp.js index e41f85afc..9b7bba9e3 100644 --- a/web/docroot/js/sensesp.js +++ b/web/docroot/js/sensesp.js @@ -193,6 +193,21 @@ Element.prototype.empty = function () { } } +function showLoader(show, status) { + var loader = document.getElementById("loader"); + if (show) { + if (status == null || status == undefined) { + status = "Loading..."; + } + + loadertext.innerHTML = status; + loader.classList.remove("visually-hidden"); + } + else { + loader.classList.add("visually-hidden"); + } +} + function executeCommand(name, shouldConfirm) { if (shouldConfirm == true && !confirm("Execute " + name + "?")) { return;