invalid Ids

This commit is contained in:
glax 2023-06-10 00:23:23 +02:00
parent 29e1790c93
commit 8b916eb854

View File

@ -369,11 +369,11 @@ function ShowTasksQueue(){
downloadTasksOutput.appendChild(CreateProgressChild(task)); downloadTasksOutput.appendChild(CreateProgressChild(task));
if(task.chapter != undefined){ if(task.chapter != undefined){
document.querySelector(`#progress${task.publication.internalId}-${task.chapter.chapterNumber}`).value = task.progress; document.querySelector(`#progress${task.publication.internalId.replace('=','')}-${task.chapter.chapterNumber}`).value = task.progress;
document.querySelector(`#progressStr${task.publication.internalId}-${task.chapter.chapterNumber}`).innerText = task.progress.toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2}); document.querySelector(`#progressStr${task.publication.internalId.replace('=','')}-${task.chapter.chapterNumber}`).innerText = task.progress.toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2});
}else{ }else{
document.querySelector(`#progress${task.publication.internalId}`).value = task.progress; document.querySelector(`#progress${task.publication.internalId.replace('=','')}`).value = task.progress;
document.querySelector(`#progressStr${task.publication.internalId}`).innerText = task.progress.toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2}); document.querySelector(`#progressStr${task.publication.internalId.replace('=','')}`).innerText = task.progress.toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2});
} }
}); });
}); });
@ -419,11 +419,11 @@ function CreateProgressChild(task){
chapterName.innerText = task.chapter.name; chapterName.innerText = task.chapter.name;
child.appendChild(chapterName); child.appendChild(chapterName);
progress.id = `progress${task.publication.internalId}-${task.chapter.chapterNumber}`; progress.id = `progress${task.publication.internalId.replace('=','')}-${task.chapter.chapterNumber}`;
progressStr.id = `progressStr${task.publication.internalId}-${task.chapter.chapterNumber}`; progressStr.id = `progressStr${task.publication.internalId.replace('=','')}-${task.chapter.chapterNumber}`;
}else{ }else{
progress.id = `progress${task.publication.internalId}`; progress.id = `progress${task.publication.internalId.replace('=','')}`;
progressStr.id = `progressStr${task.publication.internalId}`; progressStr.id = `progressStr${task.publication.internalId.replace('=','')}`;
} }
@ -495,11 +495,11 @@ setInterval(() => {
GetRunningTasks().then((json) => { GetRunningTasks().then((json) => {
json.forEach(task => { json.forEach(task => {
if(task.chapter != undefined){ if(task.chapter != undefined){
document.querySelector(`#progress${task.publication.internalId}-${task.chapter.chapterNumber}`).value = task.progress; document.querySelector(`#progress${task.publication.internalId.replace('=','')}-${task.chapter.chapterNumber}`).value = task.progress;
document.querySelector(`#progressStr${task.publication.internalId}-${task.chapter.chapterNumber}`).innerText = task.progress.toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2}); document.querySelector(`#progressStr${task.publication.internalId.replace('=','')}-${task.chapter.chapterNumber}`).innerText = task.progress.toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2});
}else{ }else{
document.querySelector(`#progress${task.publication.internalId}`).value = task.progress; document.querySelector(`#progress${task.publication.internalId.replace('=','')}`).value = task.progress;
document.querySelector(`#progressStr${task.publication.internalId}`).innerText = task.progress.toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2}); document.querySelector(`#progressStr${task.publication.internalId.replace('=','')}`).innerText = task.progress.toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2});
} }
}); });
}); });