diff --git a/src/templates/frontend/frontend.js b/src/templates/frontend/frontend.js index 7f5e93756b0de90ea420bfbf7aa71ab66d240eab..f5eae27d8d85aba1551acc029bf79491abe0ecab 100644 --- a/src/templates/frontend/frontend.js +++ b/src/templates/frontend/frontend.js @@ -1,12 +1,8 @@ class Team{ - constructor (name="", logo_path="", side){ - this.name = name; - this.logo_path = logo_path; - this.errors = 0; - this.points = 0; + constructor (side){ + this.name = ""; + this.logo_path = ""; - this.points_element = document.getElementById("points_" + side); - this.errors_element = document.getElementById("fails_" + side); this.name_element = document.getElementById("team_" + side); this.logo_element = document.getElementById("logo_" + side); } @@ -19,7 +15,7 @@ class Team{ } this.errors_element.innerHTML = fails_string; this.name_element.innerHTML = this.name; - + this.logo_element.src = "../../static/" } parse_from_json(json){ @@ -65,6 +61,9 @@ class Round{ this.question = null; this.error_right = 0; this.error_left = 0; + + this.points_element = document.getElementById("points_" + side); + this.errors_element = document.getElementById("fails_" + side); } }