class JobInputList extends ResourceList { static autoInit() { for (let jobInputListElement of document.querySelectorAll('.job-input-list:not(.no-autoinit)')) { new JobInputList(jobInputListElement); } } constructor(listContainerElement, options = {}) { super(listContainerElement, options); this.listjs.list.addEventListener('click', (event) => {this.onClick(event)}); this.isInitialized = false; this.userId = listContainerElement.dataset.userId; this.jobId = listContainerElement.dataset.jobId; app.subscribeUser(this.userId).then((response) => { app.socket.on('PATCH', (patch) => { if (this.isInitialized) {this.onPatch(patch);} }); }); app.getUser(this.userId).then((user) => { this.add(Object.values(user.jobs[this.jobId].inputs)); this.isInitialized = true; }); } // #region Mandatory getters and methods to implement get item() { return `
Filename |
---|