mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-07-03 11:13:17 +00:00
Use a single js namespace as parent for all other nopaque namespaces.
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
var ResourceLists = {};
|
||||
nopaque.resource_lists = {};
|
||||
|
||||
ResourceLists.AutoInit = () => {
|
||||
for (let propertyName in ResourceLists) {
|
||||
let property = ResourceLists[propertyName];
|
||||
// Call autoInit of all properties that are subclasses of `ResourceLists.ResourceList`.
|
||||
// This does not include `ResourceLists.ResourceList` itself.
|
||||
if (property.prototype instanceof ResourceLists.ResourceList) {
|
||||
nopaque.resource_lists.AutoInit = () => {
|
||||
for (let propertyName in nopaque.resource_lists) {
|
||||
let property = nopaque.resource_lists[propertyName];
|
||||
// Call autoInit of all properties that are subclasses of `nopaque.resource_lists.ResourceList`.
|
||||
// This does not include `nopaque.resource_lists.ResourceList` itself.
|
||||
if (property.prototype instanceof nopaque.resource_lists.ResourceList) {
|
||||
// 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