()
| 4283 | method.app.commentString(); |
| 4284 | }, |
| 4285 | cycleOptions = function dom_event_modeToggle_cycleOptions():void { |
| 4286 | const li:HTMLLIElement[] = id("addOptions").getElementsByTagName("li"), |
| 4287 | lilen:number = li.length, |
| 4288 | disable = function dom_event_modeToggle_cycleOptions_disable(parent:HTMLElement, enable:boolean):void { |
| 4289 | const inputs:HTMLCollectionOf<HTMLInputElement> = parent.getElementsByTagName("input"), |
| 4290 | sels:HTMLCollectionOf<HTMLSelectElement> = parent.getElementsByTagName("select"); |
| 4291 | if (sels.length > 0) { |
| 4292 | if (enable === true) { |
| 4293 | sels[0].disabled = false; |
| 4294 | } else { |
| 4295 | sels[0].disabled = true; |
| 4296 | } |
| 4297 | } else { |
| 4298 | if (enable === true) { |
| 4299 | inputs[0].disabled = false; |
| 4300 | } else { |
| 4301 | inputs[0].disabled = true; |
| 4302 | } |
| 4303 | if (inputs.length > 1) { |
| 4304 | if (enable === true) { |
| 4305 | inputs[1].disabled = false; |
| 4306 | } else { |
| 4307 | inputs[1].disabled = true; |
| 4308 | } |
| 4309 | } |
| 4310 | } |
| 4311 | }; |
| 4312 | let a:number = 0, |
| 4313 | div:HTMLDivElement, |
| 4314 | modeat:string; |
| 4315 | do { |
| 4316 | if (li[a].getAttribute("data-mode") !== "any") { |
| 4317 | div = li[a].getElementsByTagName("div")[0]; |
| 4318 | modeat = li[a].getAttribute("data-mode"); |
| 4319 | if (modeat !== mode && mode !== "diff") { |
| 4320 | div.innerHTML = `This option is not available in mode '${mode}'.`; |
| 4321 | div.style.display = "block"; |
| 4322 | disable(li[a], false); |
| 4323 | } else if (mode === "diff" && modeat !== "diff" && modeat !== "beautify") { |
| 4324 | div.innerHTML = `This option is not available in mode '${mode}'.`; |
| 4325 | div.style.display = "block"; |
| 4326 | disable(li[a], false); |
| 4327 | } else { |
| 4328 | div.style.display = "none"; |
| 4329 | disable(li[a], true); |
| 4330 | } |
| 4331 | } |
| 4332 | a = a + 1; |
| 4333 | } while (a < lilen); |
| 4334 | }, |
| 4335 | makeChanges = function dom_event_modeToggle_makeChanges():void { |
| 4336 | const text:string = mode.charAt(0).toUpperCase() + mode.slice(1), |
| 4337 | ci:HTMLElement = id("codeInput"), |
no test coverage detected