Fixed some bugs. Started auto complete

This commit is contained in:
simon
2018-04-11 13:46:05 -04:00
parent 410261da41
commit 8b55c3b681
16 changed files with 318 additions and 201 deletions

View File

@@ -79,14 +79,22 @@
try {
var bar = document.getElementById("task-bar-" + currentTask.id);
bar.setAttribute("style", "width: " + percent + "%;");
document.getElementById("task-label-" + currentTask.id).innerHTML = currentTask.parsed + " / " + currentTask.total + " (" + percent.toFixed(2) + "%)";
if (currentTask.total === 0) {
if (percent === 100) {
bar.classList.add("bg-success")
document.getElementById("task-label-" + currentTask.id).innerHTML = "Calculating file count...";
} else {
var bar = document.getElementById("task-bar-" + currentTask.id);
bar.setAttribute("style", "width: " + percent + "%;");
document.getElementById("task-label-" + currentTask.id).innerHTML = currentTask.parsed + " / " + currentTask.total + " (" + percent.toFixed(2) + "%)";
if (percent === 100) {
bar.classList.add("bg-success")
}
}
} catch (e) {
window.reload();
}