Skip to content
Snippets Groups Projects
Commit 223ae773 authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

reference corresponding ressources (jobs/queryresults) in JobList and QueryResultList

parent f8bdfa3a
No related branches found
No related tags found
No related merge requests found
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;}
......
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;}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment