Change js structure for displays

This commit is contained in:
Patrick Jentsch
2023-10-05 14:11:17 +02:00
parent 53f4400731
commit 1d6834302d
6 changed files with 12 additions and 10 deletions

View File

@ -1,4 +1,4 @@
class CorpusDisplay extends ResourceDisplay {
ResourceDisplays.CorpusDisplay = class CorpusDisplay extends ResourceDisplays.BaseDisplay {
constructor(displayElement) {
super(displayElement);
this.corpusId = displayElement.dataset.corpusId;

View File

@ -1,4 +1,6 @@
class ResourceDisplay {
var ResourceDisplays = {};
ResourceDisplays.BaseDisplay = class BaseDisplay {
constructor(displayElement) {
this.displayElement = displayElement;
this.userId = this.displayElement.dataset.userId;
@ -41,4 +43,4 @@ class ResourceDisplay {
this.setElement(element, value);
}
}
}
};

View File

@ -1,4 +1,4 @@
class JobDisplay extends ResourceDisplay {
ResourceDisplays.JobDisplay = class JobDisplay extends ResourceDisplays.BaseDisplay {
constructor(displayElement) {
super(displayElement);
this.jobId = this.displayElement.dataset.jobId;