From 067273df6dd8f7ae202fdf5bc80e8bb673ba7ec9 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Wed, 8 Dec 2021 15:36:10 +0100 Subject: [PATCH] Minor Codestyle updates. --- app/static/js/nopaque/RessourceLists/RessourceList.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/static/js/nopaque/RessourceLists/RessourceList.js b/app/static/js/nopaque/RessourceLists/RessourceList.js index e05431ab..387e77dd 100644 --- a/app/static/js/nopaque/RessourceLists/RessourceList.js +++ b/app/static/js/nopaque/RessourceLists/RessourceList.js @@ -88,8 +88,8 @@ class RessourceList { `.trim(); this.listjs.list.style.cursor = 'pointer'; - this.userId = listElement.dataset.userId; - if (typeof this.onclick === 'function') {this.listjs.list.addEventListener('click', event => this.onclick(event));} + this.userId = this.listjs.listContainer.dataset.userId; + this.listjs.list.addEventListener('click', event => this.onclick(event)); if (this.userId) { app.addEventListener('users.patch', patch => this.usersPatchHandler(patch)); app.getUserById(this.userId).then( @@ -115,9 +115,9 @@ class RessourceList { init(user) {throw 'Not implemented';} - usersPatchHandler(patch) {throw 'Not implemented';} + onclick(event) {throw 'Not implemented';} - preprocessRessource() {throw 'Not implemented'} + usersPatchHandler(patch) {throw 'Not implemented';} add(ressources) { let values = Array.isArray(ressources) ? ressources : [ressources];