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

Function donePopupData

html/js/menu_ts.js:2195–2289  ·  view source on GitHub ↗
(dataType, idsStr)

Source from the content-addressed store, hash-verified

2193 server.request(data);
2194}
2195function donePopupData(dataType, idsStr) {
2196 var ids = idsStr.split(',');
2197 var div = document.getElementById("popup-custom");
2198 var inputs = div.getElementsByClassName("changed");
2199 ids.forEach(id => {
2200 var input = new Object();
2201 input = SERVER["xepg"]["epgMapping"][id];
2202 console.log("INPUT: " + input);
2203 for (let i = 0; i < inputs.length; i++) {
2204 var name;
2205 var value;
2206 switch (inputs[i].tagName) {
2207 case "INPUT":
2208 switch (inputs[i].type) {
2209 case "checkbox":
2210 name = inputs[i].name;
2211 value = inputs[i].checked;
2212 input[name] = value;
2213 break;
2214 case "text":
2215 name = inputs[i].name;
2216 value = inputs[i].value;
2217 input[name] = value;
2218 break;
2219 }
2220 break;
2221 case "SELECT":
2222 name = inputs[i].name;
2223 value = inputs[i].value;
2224 input[name] = value;
2225 break;
2226 }
2227 switch (name) {
2228 case "tvg-logo":
2229 //(document.getElementById(id).childNodes[2].firstChild as HTMLElement).setAttribute("src", value)
2230 break;
2231 case "x-channel-start":
2232 document.getElementById(id).childNodes[3].firstChild.innerHTML = value;
2233 break;
2234 case "x-name":
2235 document.getElementById(id).childNodes[3].firstChild.innerHTML = value;
2236 break;
2237 case "x-category":
2238 var color = "white";
2239 var catColorSettings = SERVER["settings"]["epgCategoriesColors"];
2240 var colors_split = catColorSettings.split("|");
2241 for (var ii = 0; ii < colors_split.length; ii++) {
2242 var catsColor_split = colors_split[ii].split(":");
2243 if (catsColor_split[0] == value) {
2244 color = catsColor_split[1];
2245 }
2246 }
2247 document.getElementById(id).childNodes[3].firstChild.style.borderColor = color;
2248 break;
2249 case "x-group-title":
2250 document.getElementById(id).childNodes[5].firstChild.innerHTML = value;
2251 break;
2252 case "x-xmltv-file":

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