mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-10-15 19:21:57 +00:00
Use a single js namespace as parent for all other nopaque namespaces.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
var ResourceDisplays = {};
|
||||
nopaque.resource_displays = {};
|
||||
|
||||
ResourceDisplays.AutoInit = () => {
|
||||
for (let propertyName in ResourceDisplays) {
|
||||
let property = ResourceDisplays[propertyName];
|
||||
// Call autoInit of all properties that are subclasses of `ResourceDisplays.ResourceDisplay`.
|
||||
// This does not include `ResourceDisplays.ResourceDisplay` itself.
|
||||
if (property.prototype instanceof ResourceDisplays.ResourceDisplay) {
|
||||
nopaque.resource_displays.AutoInit = () => {
|
||||
for (let propertyName in nopaque.resource_displays) {
|
||||
let property = nopaque.resource_displays[propertyName];
|
||||
// Call autoInit of all properties that are subclasses of `nopaque.resource_displays.ResourceDisplay`.
|
||||
// This does not include `nopaque.resource_displays.ResourceDisplay` itself.
|
||||
if (property.prototype instanceof nopaque.resource_displays.ResourceDisplay) {
|
||||
// Check if the static `htmlClass` property is defined.
|
||||
if (property.htmlClass === undefined) {return;}
|
||||
// Gather all HTML elements that have the `this.htmlClass` class
|
||||
|
Reference in New Issue
Block a user