many updates

This commit is contained in:
2026-02-11 11:38:26 +11:00
parent 8cb9e43a72
commit b069d5bee8
21 changed files with 1324 additions and 85 deletions

View File

@@ -35,7 +35,9 @@ var WizardItem = /** @class */ (function (_super) {
var key = this.key;
var content = new PopupContent();
var description;
var wizardField = null;
var doc = document.getElementById(this.DocumentID);
doc.setAttribute("aria-busy", "true");
doc.innerHTML = "";
doc.appendChild(headline);
switch (key) {
@@ -50,6 +52,7 @@ var WizardItem = /** @class */ (function (_super) {
select.setAttribute("class", "wizard");
select.id = key;
doc.appendChild(select);
wizardField = select;
description = "{{.wizard.tuner.description}}";
break;
case "epgSource":
@@ -59,6 +62,7 @@ var WizardItem = /** @class */ (function (_super) {
select.setAttribute("class", "wizard");
select.id = key;
doc.appendChild(select);
wizardField = select;
description = "{{.wizard.epgSource.description}}";
break;
case "m3u":
@@ -67,6 +71,7 @@ var WizardItem = /** @class */ (function (_super) {
input.setAttribute("class", "wizard");
input.id = key;
doc.appendChild(input);
wizardField = input;
description = "{{.wizard.m3u.description}}";
break;
case "xmltv":
@@ -75,6 +80,7 @@ var WizardItem = /** @class */ (function (_super) {
input.setAttribute("class", "wizard");
input.id = key;
doc.appendChild(input);
wizardField = input;
description = "{{.wizard.xmltv.description}}";
break;
default:
@@ -82,8 +88,20 @@ var WizardItem = /** @class */ (function (_super) {
break;
}
var pre = document.createElement("PRE");
pre.id = "wizard-description-" + key;
pre.innerHTML = description;
doc.appendChild(pre);
if (wizardField != null) {
wizardField.setAttribute("aria-label", this.headline);
wizardField.setAttribute("aria-describedby", pre.id);
setTimeout(function () {
wizardField.focus();
}, 20);
}
doc.setAttribute("aria-busy", "false");
if (typeof announceToScreenReader == "function") {
announceToScreenReader(this.headline + " step");
}
console.log(headline, key);
};
return WizardItem;
@@ -145,3 +163,20 @@ configurationWizard.push(new WizardItem("tuner", "{{.wizard.tuner.title}}"));
configurationWizard.push(new WizardItem("epgSource", "{{.wizard.epgSource.title}}"));
configurationWizard.push(new WizardItem("m3u", "{{.wizard.m3u.title}}"));
configurationWizard.push(new WizardItem("xmltv", "{{.wizard.xmltv.title}}"));
document.addEventListener("DOMContentLoaded", function () {
var container = document.getElementById("content");
if (container == null) {
return;
}
container.addEventListener("keydown", function (event) {
if (event.key != "Enter") {
return;
}
var target = event.target;
if (target == null || target.tagName != "INPUT") {
return;
}
event.preventDefault();
saveWizard();
});
});