MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / createWizard

Method createWizard

html/js/configuration_ts.js:17–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 this.key = key;
16 }
17 createWizard() {
18 var headline = this.createCategoryHeadline(this.headline);
19 var key = this.key;
20 var content = new PopupContent();
21 var description;
22 var doc = document.getElementById(this.DocumentID);
23 doc.innerHTML = "";
24 doc.appendChild(headline);
25 switch (key) {
26 case "tuner":
27 var text = new Array();
28 var values = new Array();
29 for (var i = 1; i <= 100; i++) {
30 text.push(i);
31 values.push(i);
32 }
33 var select = content.createSelect(text, values, "1", key);
34 select.setAttribute("class", "wizard");
35 select.id = key;
36 doc.appendChild(select);
37 description = "{{.wizard.tuner.description}}";
38 break;
39 case "epgSource":
40 var text = ["PMS", "XEPG"];
41 var values = ["PMS", "XEPG"];
42 var select = content.createSelect(text, values, "XEPG", key);
43 select.setAttribute("class", "wizard");
44 select.id = key;
45 doc.appendChild(select);
46 description = "{{.wizard.epgSource.description}}";
47 break;
48 case "m3u":
49 var input = content.createInput("text", key, "");
50 input.setAttribute("placeholder", "{{.wizard.m3u.placeholder}}");
51 input.setAttribute("class", "wizard");
52 input.id = key;
53 doc.appendChild(input);
54 description = "{{.wizard.m3u.description}}";
55 break;
56 case "xmltv":
57 var input = content.createInput("text", key, "");
58 input.setAttribute("placeholder", "{{.wizard.xmltv.placeholder}}");
59 input.setAttribute("class", "wizard");
60 input.id = key;
61 doc.appendChild(input);
62 description = "{{.wizard.xmltv.description}}";
63 break;
64 default:
65 console.log(key);
66 break;
67 }
68 var pre = document.createElement("PRE");
69 pre.innerHTML = description;
70 doc.appendChild(pre);
71 console.log(headline, key);
72 }
73}
74function readyForConfiguration(wizard) {

Callers 2

initWebSocketFunction · 0.45
readyForConfigurationFunction · 0.45

Calls 3

createSelectMethod · 0.95
createInputMethod · 0.95

Tested by

no test coverage detected