MCPcopy Create free account
hub / github.com/Threadfin/Threadfin / donePopupData

Function donePopupData

ts/menu_ts.ts:2719–2850  ·  view source on GitHub ↗
(dataType: string, idsStr: string)

Source from the content-addressed store, hash-verified

2717}
2718
2719function donePopupData(dataType: string, idsStr: string) {
2720
2721 var ids: string[] = idsStr.split(',');
2722 var div = document.getElementById("popup-custom")
2723 var inputs = div.getElementsByClassName("changed")
2724
2725 ids.forEach(id => {
2726 var input = new Object();
2727 input = SERVER["xepg"]["epgMapping"][id]
2728 console.log("INPUT: " + input)
2729
2730 for (let i = 0; i < inputs.length; i++) {
2731
2732 var name: string
2733 var value: any
2734
2735 switch (inputs[i].tagName) {
2736
2737 case "INPUT":
2738 switch ((inputs[i] as HTMLInputElement).type) {
2739 case "checkbox":
2740 name = (inputs[i] as HTMLInputElement).name
2741 value = (inputs[i] as HTMLInputElement).checked
2742 input[name] = value
2743 break
2744
2745 case "text":
2746 name = (inputs[i] as HTMLInputElement).name
2747 value = (inputs[i] as HTMLInputElement).value
2748 input[name] = value
2749 break
2750
2751 }
2752
2753 break
2754
2755 case "SELECT":
2756 name = (inputs[i] as HTMLSelectElement).name
2757 value = (inputs[i] as HTMLSelectElement).value
2758 input[name] = value
2759 break
2760
2761 }
2762
2763 switch (name) {
2764
2765
2766 case "tvg-logo":
2767 //(document.getElementById(id).childNodes[2].firstChild as HTMLElement).setAttribute("src", value)
2768 break
2769
2770 case "x-channel-start":
2771 (document.getElementById(id).childNodes[3].firstChild as HTMLElement).innerHTML = value
2772 break
2773
2774 case "x-name":
2775 (document.getElementById(id).childNodes[3].firstChild as HTMLElement).innerHTML = value
2776 break

Callers

nothing calls this directly

Calls 4

getValueFromProviderFileFunction · 0.70
createSearchObjFunction · 0.70
searchInMappingFunction · 0.70
showElementFunction · 0.70

Tested by

no test coverage detected