From 98de581132dbe8dc69465f503976a8f841bd53b9 Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Wed, 28 Aug 2019 17:31:09 +0200
Subject: [PATCH] Cleanup special list classes.
---
app/static/js/CorpusList.js | 22 +++++++++-------------
app/static/js/JobList.js | 22 +++++++++-------------
2 files changed, 18 insertions(+), 26 deletions(-)
diff --git a/app/static/js/CorpusList.js b/app/static/js/CorpusList.js
index 0caa45dd..3613a94a 100644
--- a/app/static/js/CorpusList.js
+++ b/app/static/js/CorpusList.js
@@ -6,7 +6,15 @@ class CorpusList extends List {
init() {
- this.createCorpusElements(corpora);
+ var corpus;
+
+ for (corpus of corpora) {
+ this.list.appendChild(this.createCorpusElement(corpus));
+ }
+
+ this.reIndex();
+ this.update();
+ List.updatePagination(this);
}
@@ -38,18 +46,6 @@ class CorpusList extends List {
}
- createCorpusElements(corpora) {
- var corpus;
-
- for (corpus of corpora) {
- this.list.appendChild(this.createCorpusElement(corpus));
- }
-
- this.reIndex();
- this.update();
- List.updatePagination(this);
- }
-
/*
corporaUpdateHandler(delta) {
var corpusElement, key, listItem;
diff --git a/app/static/js/JobList.js b/app/static/js/JobList.js
index edf7dbdd..1fb9bebe 100644
--- a/app/static/js/JobList.js
+++ b/app/static/js/JobList.js
@@ -6,7 +6,15 @@ class JobList extends List {
init() {
- this.createJobElements(jobs);
+ var job;
+
+ for (job of jobs) {
+ this.list.appendChild(this.createJobElement(job));
+ }
+
+ this.reIndex();
+ this.update();
+ List.updatePagination(this);
}
@@ -41,18 +49,6 @@ class JobList extends List {
}
- createJobElements(jobs) {
- var job;
-
- for (job of jobs) {
- this.list.appendChild(this.createJobElement(job));
- }
-
- this.reIndex();
- this.update();
- List.updatePagination(this);
- }
-
/*
jobsUpdateHandler(delta) {
var jobElement, jobStatusElement, key, listItem;