Remove old scheduler code.

This commit is contained in:
Patrick Jentsch
2019-08-30 14:00:08 +02:00
parent 8f3c53dad2
commit 7d4a1e6d37
5 changed files with 12 additions and 89 deletions

View File

@ -10,6 +10,7 @@ class CorpusList extends List {
this.addCorpus(corpus);
}
this.update()
List.updatePagination(this);
}
@ -22,10 +23,13 @@ class CorpusList extends List {
switch(operation.op) {
case "add":
this.addCorpus(operation.value);
this.update()
List.updatePagination(this);
break;
case "remove":
if (pathArray.length != 1) {break;}
this.remove("id", pathArray[0]);
List.updatePagination(this);
break;
case "replace":
if (pathArray.length != 2) {break;}

View File

@ -10,6 +10,7 @@ class JobList extends List {
this.addJob(job);
}
this.update()
List.updatePagination(this);
}
@ -23,10 +24,13 @@ class JobList extends List {
switch(operation.op) {
case "add":
this.addJob(operation.value);
this.update();
List.updatePagination(this);
break;
case "remove":
if (pathArray.length != 1) {break;}
this.remove("id", pathArray[0]);
List.updatePagination(this);
break;
case "replace":
if (pathArray.length != 2) {break;}
@ -52,6 +56,7 @@ class JobList extends List {
jobStatusElement.classList.remove(statusColor);
jobStatusElement.classList.add(newStatusColor);
jobStatusElement.innerHTML = operation.value;
break;
case "title":
item.values({"title": operation.value});
break;
@ -109,7 +114,9 @@ class JobList extends List {
this.add(
[{description: job.description, id: job.id, title: job.title}],
function(items) {items[0].elm = jobElement;}
(items) => {
items[0].elm = jobElement;
}
);
}
}