()
| 382 | |
| 383 | // MARK: update display |
| 384 | doDisplay() { |
| 385 | const scrollFrag = document.createDocumentFragment() |
| 386 | const docFrag = document.createDocumentFragment() |
| 387 | |
| 388 | if ( this.flag.folderEdit ) { |
| 389 | const editNode = document.createElement('tr') |
| 390 | editNode.classList.add('mod-table-folder', 'border-bottom') |
| 391 | editNode.innerHTML = '<td colspan="3" class="py-2"><i18n-text type="button" class="w-75 mx-auto d-block btn btn-sm btn-primary" data-key="folder_alpha"></i18n-text></td>' |
| 392 | editNode.querySelector('i18n-text').addEventListener('click', () => { |
| 393 | window.main_IPC.folder.alpha() |
| 394 | }) |
| 395 | docFrag.appendChild(editNode) |
| 396 | } else { |
| 397 | this.filter.build() |
| 398 | } |
| 399 | |
| 400 | for ( const CKey of this.orderMap.keys ) { |
| 401 | const thisCol = this.collections[CKey] |
| 402 | thisCol.nodeIcon.innerHTML = DATA.makeFolderIcon( |
| 403 | this.track.openCollection === CKey, |
| 404 | thisCol.notes.notes_favorite, |
| 405 | this.flag.activeCollect === CKey, |
| 406 | thisCol.notes.notes_holding, |
| 407 | thisCol.notes.notes_color |
| 408 | ) |
| 409 | |
| 410 | scrollFrag.appendChild(thisCol.scroll) |
| 411 | docFrag.appendChild(thisCol.node) |
| 412 | |
| 413 | if ( ! this.flag.folderEdit && this.track.openCollection === CKey ) { |
| 414 | thisCol.modNodePoint.innerHTML = '' |
| 415 | for ( const MKey of thisCol[this.track.sortOrder] ) { |
| 416 | const modRec = this.mods[CKey][MKey] |
| 417 | const modKey = `${CKey}--${MKey}` |
| 418 | if ( ! this.track.selected.has(modKey) ) { |
| 419 | if ( this.doesSearchExclude(modRec) ) { continue } |
| 420 | if ( this.doesTagExclude(modRec) ) { continue } |
| 421 | if ( this.track.selectedOnly ) { continue } |
| 422 | } |
| 423 | |
| 424 | thisCol.modNodePoint.appendChild(modRec.node) |
| 425 | scrollFrag.appendChild(modRec.scroll) |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | docFrag.appendChild(thisCol.modNode) |
| 430 | } |
| 431 | MA.byId('mod-collections').innerHTML = '' |
| 432 | MA.byId('mod-collections').appendChild(docFrag) |
| 433 | MA.byId('scroll-bar-fake').innerHTML = '' |
| 434 | MA.byId('scroll-bar-fake').appendChild(scrollFrag) |
| 435 | this.doSideBar() |
| 436 | this.refreshSelected() |
| 437 | } |
| 438 | |
| 439 | doVersionChanger(version, options, modCollect) { |
| 440 | const counts = { collect : 0, mods : 0 } |
no test coverage detected