Skip to content
Snippets Groups Projects
Commit a13bd1fd authored by Neuber, Eugen Ramon's avatar Neuber, Eugen Ramon :speech_balloon: Committed by Reiter, Christoph
Browse files

Remove local var id

parent 9ac478b4
No related branches found
No related tags found
No related merge requests found
...@@ -123,8 +123,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement { ...@@ -123,8 +123,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement {
} }
toggle(e) { toggle(e) {
const id = this.id; const element = this.shadowRoot.querySelector('#' + this.id);
const element = this.shadowRoot.querySelector('#' + id);
const img = e.target; const img = e.target;
const d = element.style.display; const d = element.style.display;
if(d === '' || d === 'none') { if(d === '' || d === 'none') {
...@@ -138,7 +137,6 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement { ...@@ -138,7 +137,6 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement {
render() { render() {
//<link rel="stylesheet" href="${this.css}"> //<link rel="stylesheet" href="${this.css}">
const id = this.id;
return html` return html`
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css">
<style> <style>
...@@ -147,7 +145,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement { ...@@ -147,7 +145,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement {
} }
</style> </style>
<span>${this.text}<img src='${this.eyeOpen}' @click="${this.toggle}" alt="open/close"></span> <span>${this.text}<img src='${this.eyeOpen}' @click="${this.toggle}" alt="open/close"></span>
<div class='kb' id="${id}"> <div class='kb' id="${this.id}">
${unsafeHTML(this.html)} ${unsafeHTML(this.html)}
${this.error} ${this.error}
</div> </div>
......
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