()
| 125 | |
| 126 | // MARK: buildDisplay [html] |
| 127 | buildDisplay() { |
| 128 | const displayNode = MA.byId('full_table') |
| 129 | |
| 130 | displayNode.innerHTML = '' |
| 131 | |
| 132 | for ( const key of this.fullList_sort ) { |
| 133 | if ( ! this.fullList_filter.has(key) ) { continue } |
| 134 | |
| 135 | const item = this.fullList_data[key] |
| 136 | const itemNode = DATA.templateEngine('mod_entry', { |
| 137 | author : item.author, |
| 138 | icon : `<img src="${DATA.iconMaker(item.icon)}" class="img-fluid">`, |
| 139 | name : item.name, |
| 140 | title : item.title, |
| 141 | }) |
| 142 | |
| 143 | const itemCollectNode = itemNode.querySelector('.versionList') |
| 144 | for ( const cItem of item.collect ) { |
| 145 | const node = DATA.templateEngine('version_entry', { |
| 146 | name : cItem.name, |
| 147 | version : cItem.version, |
| 148 | }) |
| 149 | node.querySelector('dt').addEventListener('click', () => { |
| 150 | window.find_IPC.select(item.id, item.name) |
| 151 | }) |
| 152 | itemCollectNode.appendChild(node) |
| 153 | } |
| 154 | |
| 155 | itemNode.firstElementChild.addEventListener('contextmenu', () => { |
| 156 | window.find_IPC.modContext(item) |
| 157 | }) |
| 158 | |
| 159 | displayNode.appendChild(itemNode) |
| 160 | } |
| 161 | } |
| 162 | } |
no test coverage detected