MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / setBusy

Function setBusy

src/ifcchat/app.js:174–198  ·  view source on GitHub ↗
(isBusy, reason = "")

Source from the content-addressed store, hash-verified

172onProviderChange();
173
174function setBusy(isBusy, reason = "") {
175 const controls = [
176 $("send"),
177 $("newModel"),
178 $("downloadIfc"),
179 $("ifcFile"),
180 ];
181
182 for (const el of controls) el.disabled = isBusy;
183
184 $("input").disabled = isBusy;
185
186 const browseBtn = $("browseBtn");
187 if (browseBtn) {
188 browseBtn.classList.toggle("disabled", isBusy);
189 browseBtn.setAttribute("aria-disabled", isBusy ? "true" : "false");
190 browseBtn.tabIndex = isBusy ? -1 : 0;
191 }
192
193 sendBtn.innerHTML = isBusy
194 ? `<span class="spinner"></span>`
195 : `Send <span class="material-icons">send</span>`;
196
197 setStatus(isBusy ? (reason || "Working…") : "Ready");
198}
199
200function escapeHtml(text) {
201 return text

Callers 1

app.jsFile · 0.85

Calls 3

$Function · 0.85
setStatusFunction · 0.85
toggleMethod · 0.80

Tested by

no test coverage detected