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

Function saveBulk

html/js/mapping-editor.js:759–813  ·  view source on GitHub ↗
(key, value)

Source from the content-addressed store, hash-verified

757}
758
759function saveBulk(key, value) {
760 for (var i = 0; i < bulkIDs.length; i++) {
761 var id = bulkIDs[i]
762 var thisChannel = xEPG["epgMapping"][id];
763 thisChannel[key] = value;
764
765 switch (key) {
766 case "tvg-logo": document.getElementById(id).childNodes[2].lastChild.setAttribute("src", value); break;
767
768 case "x-category": document.getElementById(id).childNodes[3].lastChild.className = value; break;
769
770 case "x-xmltv-file":
771 var element = document.getElementById(id).childNodes[6].lastChild;
772 switch (value) {
773 case "-": element.innerHTML = value; break;
774 case "Threadfin Dummy": element.innerHTML = value; break;
775 default: element.innerHTML = getValueFromProviderFile(value, "xmltv", "name"); break;
776 }
777
778
779
780 //document.getElementById(id).childNodes[5].lastChild.innerHTML = value.replace(/^.*[\\\/]/, ''); break;
781 case "x-mapping":
782 document.getElementById(id).childNodes[7].lastChild.innerHTML = value;
783 if (value == "-") {
784 thisChannel["x-active"] = false;
785 document.getElementById(id).className = "notActiveEPG";
786 } else {
787 thisChannel["x-active"] = true;
788 document.getElementById(id).className = "activeEPG";
789 }
790 break;
791
792 case "x-group-title": document.getElementById(id).childNodes[5].lastChild.innerHTML = value; break;
793
794 case "x-active":
795 var tr = document.getElementById(id);
796
797 if (thisChannel.hasOwnProperty("x-xmltv-file") == true) {
798 if (thisChannel["x-mapping"] != "-" && thisChannel["x-mapping"] != undefined && thisChannel["x-xmltv-file"] != "-" && thisChannel["x-xmltv-file"] != undefined) {
799 switch (thisChannel["x-active"]) {
800 case true: tr.className = "activeEPG"; break;
801 case false: tr.className = "notActiveEPG"; break;
802 }
803 break;
804 }
805 }
806
807 }
808
809 updateChannelLogo(id)
810
811 }
812
813}
814
815function updateChannelLogo(xepg) {
816 var thisChannel = xEPG["epgMapping"][xepg];

Callers 8

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

Calls 2

updateChannelLogoFunction · 0.85
getValueFromProviderFileFunction · 0.70

Tested by

no test coverage detected