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

Function mappingDetail

html/js/mapping-editor.js:443–667  ·  view source on GitHub ↗
(xepg)

Source from the content-addressed store, hash-verified

441}
442
443function mappingDetail(xepg) {
444
445 bulkIDs = new Array();
446 var activeElement = document.activeElement;
447 // If input id, return
448 if (activeElement.tagName == "INPUT") {
449 return
450 }
451
452 if (bulk == true) {
453 var elm = document.getElementsByClassName("bulk");
454 for (var i = 1; i < elm.length; i++) {
455 if (elm[i].checked == true) {
456 var id = elm[i].parentElement.parentElement.id;
457 bulkIDs.push(id)
458 }
459
460 }
461
462 if (bulkIDs.length == 0) {
463 showElement('popup', false)
464 alert("No channels selected for editing")
465 return
466 }
467
468 xepg = bulkIDs[0]
469 }
470
471
472 createSearchObj();
473
474 showPopUpElement('mapping-detail');
475
476 var thisChannel = xEPG["epgMapping"][xepg];
477 //console.log(thisChannel);
478 var xXmltvFile = thisChannel["x-xmltv-file"];
479 var xMapping = thisChannel["x-mapping"];
480 var xCategory = thisChannel["x-category"];
481
482 if (xXmltvFile == undefined) {
483 thisChannel["x-xmltv-file"] = "-";
484 xXmltvFile = "-";
485 }
486
487 if (xMapping == undefined) {
488 thisChannel["x-mapping"] = "-";
489 xMapping = "-";
490 }
491
492 /*
493 console.log("ID:", xepg);
494 console.log("XMLTV File:", xXmltvFile);
495 console.log("Mapping:", xMapping);
496 */
497
498 var keys = getObjKeys(thisChannel);
499 for (var i = 0; i < keys.length; i++) {
500 if (document.getElementById(keys[i])) {

Callers 9

saveChannelLogoFunction · 0.85
saveChannelIconUpdateFunction · 0.85
saveChannelNameFunction · 0.85
saveChannelNameUpdateFunction · 0.85
saveChannelStatusFunction · 0.85
saveGroupTitleFunction · 0.85
saveCategoryFunction · 0.85
changeXmltvFileFunction · 0.85
mappingChannelFunction · 0.85

Calls 7

createNewElementFunction · 0.85
showElementFunction · 0.70
createSearchObjFunction · 0.70
showPopUpElementFunction · 0.70
getObjKeysFunction · 0.70
getValueFromProviderFileFunction · 0.70
sortSelectFunction · 0.70

Tested by

no test coverage detected