mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Make JobList class ready for admin view.
This commit is contained in:
parent
0ea87de072
commit
b90d6114b0
@ -1,11 +1,11 @@
|
||||
class JobList extends List {
|
||||
constructor(idOrElement, options) {
|
||||
constructor(idOrElement, subscriberList, options) {
|
||||
super(idOrElement, options);
|
||||
jobsSubscribers.push(this);
|
||||
subscriberList.push(this);
|
||||
}
|
||||
|
||||
|
||||
_init() {
|
||||
_init(jobs) {
|
||||
for (let [id, job] of Object.entries(jobs)) {
|
||||
this.addJob(job);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
var subscriber;
|
||||
|
||||
jobs = JSON.parse(msg);
|
||||
for (subscriber of jobsSubscribers) {subscriber._init();}
|
||||
for (subscriber of jobsSubscribers) {subscriber._init(jobs);}
|
||||
});
|
||||
|
||||
|
||||
|
@ -75,7 +75,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var jobList = new JobList("job-list", {
|
||||
var jobList = new JobList("job-list", jobsSubscribers, {
|
||||
item: '<div><span class="title"></span><span class="description"></span></div>',
|
||||
page: 4,
|
||||
pagination: true,
|
||||
|
Loading…
Reference in New Issue
Block a user