From cfe5deabfa3ff3ce5dc17257852d1dea220067be Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Sun, 18 Jun 2017 17:12:56 -0400 Subject: [PATCH] fuck semicolons --- resources/questions/scenarios.js | 6 ++- resources/spawn/progress-table.js | 74 +++++++++++++++---------------- 2 files changed, 39 insertions(+), 41 deletions(-) diff --git a/resources/questions/scenarios.js b/resources/questions/scenarios.js index bf0db46..1b13ae7 100644 --- a/resources/questions/scenarios.js +++ b/resources/questions/scenarios.js @@ -4,7 +4,9 @@ window.onload = function(){ //output element, that other elements are attached to let $trueOutputElement = $("
  • ") - $trueOutputElement.attr("id", "scenarios-"+scenario.name); + $trueOutputElement.attr("id", `scenarios-${scenario.name}`); + + let $outputElement = $("
    ") //Determines whether this is a jQuery Accordion const isAccordion = true; @@ -32,7 +34,7 @@ window.onload = function(){ //Create radio button $inputTag = $(""); $inputTag.attr("type", "radio"); - $inputTag.attr("name", "radio-"+scenario.name); + $inputTag.attr("name", `radio-${scenario.name}`); //Populate list element $newOption = $("
  • "); diff --git a/resources/spawn/progress-table.js b/resources/spawn/progress-table.js index 29600d8..905572e 100644 --- a/resources/spawn/progress-table.js +++ b/resources/spawn/progress-table.js @@ -1,58 +1,54 @@ window.onload = function(){ - function addRow(building){ + const addRow = function(building){ $nameElement = $("") - $nameElement.attr("id", building.id + "-progress.name") - $nameElement.append(building.name); + .attr("id", `${building.id}-progress.name`) + .append(building.name); - $useElement = $(""); - $useElement.attr("id", building.id + "-progress.use"); - $useElement.append(building.use) + $useElement = $("") + .attr("id", `${building.id}-progress.use`) + .append(building.use) - $designedElement = $(""); - $designedElement.attr("id", building.id + "-progress.designed"); - $designedElement.addClass("checkboxCell"); - $designedElement.append( - $("") + $designedElement = $("") + .attr("id", `${building.id}-progress.designed`) + .addClass("checkboxCell") + .append($("") .attr("type", "checkbox") - .attr("id", building.id + ".designed?") - .attr("checked", building.designed))f; + .attr("id", `${building.id}.designed?`) + .attr("checked", building.designed)); - $startedElement = $(""); - $startedElement.attr("id", building.id + "-progress.stated"); - $startedElement.addClass("checkboxCell"); - $startedElement.append( - $("") + $startedElement = $("") + .attr("id", `${building.id}-progress.stated`) + .addClass("checkboxCell") + .append($("") .attr("type", "checkbox") - .attr("id", building.id + ".started?") + .attr("id", `${building.id}.started?`) .attr("checked", building.started)); - $completedElement = $(""); - $completedElement.attr("id", building.id + "-progress.completed"); - $completedElement.addClass("checkboxCell"); - $completedElement.append( - $("") + $completedElement = $("") + .attr("id", `${building.id}-progress.completed`) + .addClass("checkboxCell") + .append($("") .attr("type", "checkbox") - .attr("id", building.id + ".completed?") + .attr("id", `${building.id}.completed?`) .attr("checked", building.completed)); - $populatedElement = $(""); - $populatedElement.attr("id", building.id + "-progress.populated"); - $populatedElement.addClass("checkboxCell"); - $populatedElement.append( - $("") + $populatedElement = $("") + .attr("id", `${building.id}-progress.populated`) + .addClass("checkboxCell") + .append($("") .attr("type", "checkbox") - .attr("id", building.id + ".populated?") + .attr("id", `${building.id}.populated?`) .attr("checked", building.populated)); - $outputRow = $(""); - $outputRow.attr("id", building.id + "-progress"); - $outputRow.append($nameElement); - $outputRow.append($useElement); - $outputRow.append($designedElement); - $outputRow.append($startedElement); - $outputRow.append($completedElement); - $outputRow.append($populatedElement); + $outputRow = $("") + .attr("id", `${building.id}-progress`) + .append($nameElement) + .append($useElement) + .append($designedElement) + .append($startedElement) + .append($completedElement) + .append($populatedElement); return $outputRow; } console.info("loading");