mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
reference corresponding ressources (jobs/queryresults) in JobList and QueryResultList
This commit is contained in:
parent
f8bdfa3a04
commit
223ae773d6
@ -1,9 +1,15 @@
|
|||||||
class JobList extends RessourceList {
|
class JobList extends RessourceList {
|
||||||
constructor(listElement, options = {}) {
|
constructor(listElement, options = {}) {
|
||||||
super(listElement, {...JobList.options, ...options});
|
super(listElement, {...JobList.options, ...options});
|
||||||
|
this.jobs = undefined;
|
||||||
this.user.eventListeners.job.addEventListener((eventType, payload) => this.eventHandler(eventType, payload));
|
this.user.eventListeners.job.addEventListener((eventType, payload) => this.eventHandler(eventType, payload));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
init(jobs) {
|
||||||
|
this.jobs = jobs;
|
||||||
|
super.init(jobs);
|
||||||
|
}
|
||||||
|
|
||||||
onclick(event) {
|
onclick(event) {
|
||||||
let ressourceElement = event.target.closest('tr');
|
let ressourceElement = event.target.closest('tr');
|
||||||
if (ressourceElement === null) {return;}
|
if (ressourceElement === null) {return;}
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
class QueryResultList extends RessourceList {
|
class QueryResultList extends RessourceList {
|
||||||
constructor(listElement, options = {}) {
|
constructor(listElement, options = {}) {
|
||||||
super(listElement, {...QueryResultList.options, ...options});
|
super(listElement, {...QueryResultList.options, ...options});
|
||||||
|
this.queryResults = undefined;
|
||||||
this.user.eventListeners.queryResult.addEventListener((eventType, payload) => this.eventHandler(eventType, payload));
|
this.user.eventListeners.queryResult.addEventListener((eventType, payload) => this.eventHandler(eventType, payload));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
init(queryResults) {
|
||||||
|
this.queryResults = queryResults;
|
||||||
|
super.init(queryResults);
|
||||||
|
}
|
||||||
|
|
||||||
onclick(event) {
|
onclick(event) {
|
||||||
let ressourceElement = event.target.closest('tr');
|
let ressourceElement = event.target.closest('tr');
|
||||||
if (ressourceElement === null) {return;}
|
if (ressourceElement === null) {return;}
|
||||||
|
Loading…
Reference in New Issue
Block a user