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

Method createInactiveTableContent

ts/menu_ts.ts:548–694  ·  view source on GitHub ↗
(menuKey: string)

Source from the content-addressed store, hash-verified

546 }
547
548 createInactiveTableContent(menuKey: string): string[] {
549
550 var data = new Object()
551 var rows = new Array()
552
553 switch (menuKey) {
554 case "mapping":
555 BULK_EDIT = false
556 createSearchObj()
557 checkUndo("epgMapping")
558 console.log("MAPPING")
559 data = SERVER["xepg"]["epgMapping"]
560
561 var keys = getObjKeys(data)
562 keys.forEach(key => {
563 if (data[key]["x-active"] === false) {
564
565 var tr = document.createElement("TR")
566 tr.id = key
567 tr.className = "notActiveEPG"
568
569 // Bulk
570 var cell: Cell = new Cell()
571 cell.child = true
572 cell.childType = "BULK"
573 cell.value = false
574 tr.appendChild(cell.createCell())
575
576 // Kanalnummer
577 var cell: Cell = new Cell()
578 cell.child = true
579 cell.childType = "INPUTCHANNEL"
580 if (data[key]["x-active"] == true) {
581 cell.value = data[key]["x-channelID"]
582 } else {
583 cell.value = data[key]["x-channelID"] * 10
584 }
585 //td.setAttribute('onclick', 'javascript: changeChannelNumber("' + key + '", this)')
586 tr.appendChild(cell.createCell())
587
588 // Logo
589 var cell: Cell = new Cell()
590 cell.child = true
591 cell.childType = "IMG"
592 cell.imageURL = data[key]["tvg-logo"]
593 var td = cell.createCell()
594 td.setAttribute('onclick', 'javascript: openPopUp("mapping", this)')
595 td.className = "logo-cell"
596 td.id = key
597
598 tr.appendChild(td)
599
600 // Kanalname
601 var cell: Cell = new Cell()
602 var cats = data[key]["x-category"].split(":")
603 cell.child = true
604 cell.childType = "P"
605 cell.className = "category"

Callers 1

showMethod · 0.45

Calls 5

createCellMethod · 0.95
createSearchObjFunction · 0.70
checkUndoFunction · 0.70
getObjKeysFunction · 0.70
getValueFromProviderFileFunction · 0.70

Tested by

no test coverage detected