mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-16 11:00:41 +00:00
Huge List class update
This commit is contained in:
@ -3,9 +3,9 @@ var ResourceDisplays = {};
|
||||
ResourceDisplays.autoInit = () => {
|
||||
for (let propertyName in ResourceDisplays) {
|
||||
let property = ResourceDisplays[propertyName];
|
||||
// Call autoInit of all properties that are subclasses of `ResourceDisplays.BaseDisplay`.
|
||||
// This does not include `ResourceDisplays.BaseDisplay` itself.
|
||||
if (property.prototype instanceof ResourceDisplays.BaseDisplay) {
|
||||
// Call autoInit of all properties that are subclasses of `ResourceDisplays.ResourceDisplay`.
|
||||
// This does not include `ResourceDisplays.ResourceDisplay` itself.
|
||||
if (property.prototype instanceof ResourceDisplays.ResourceDisplay) {
|
||||
// Check if the static `htmlClass` property is defined.
|
||||
if (property.htmlClass === undefined) {return;}
|
||||
// Gather all HTML elements that have the `this.htmlClass` class
|
||||
@ -15,4 +15,4 @@ ResourceDisplays.autoInit = () => {
|
||||
for (let displayElement of displayElements) {new property(displayElement);}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user