fuck semicolons

This commit is contained in:
alisolarflare 2017-06-18 17:12:56 -04:00
parent 8d39143f16
commit cfe5deabfa
2 changed files with 39 additions and 41 deletions

View file

@ -4,7 +4,9 @@ window.onload = function(){
//output element, that other elements are attached to //output element, that other elements are attached to
let $trueOutputElement = $("<li></li>") let $trueOutputElement = $("<li></li>")
$trueOutputElement.attr("id", "scenarios-"+scenario.name); $trueOutputElement.attr("id", `scenarios-${scenario.name}`);
let $outputElement = $("<div class=\"accordion-panel\"></div>") let $outputElement = $("<div class=\"accordion-panel\"></div>")
//Determines whether this is a jQuery Accordion //Determines whether this is a jQuery Accordion
const isAccordion = true; const isAccordion = true;
@ -32,7 +34,7 @@ window.onload = function(){
//Create radio button //Create radio button
$inputTag = $("<input>"); $inputTag = $("<input>");
$inputTag.attr("type", "radio"); $inputTag.attr("type", "radio");
$inputTag.attr("name", "radio-"+scenario.name); $inputTag.attr("name", `radio-${scenario.name}`);
//Populate list element //Populate list element
$newOption = $("<li></li>"); $newOption = $("<li></li>");

View file

@ -1,58 +1,54 @@
window.onload = function(){ window.onload = function(){
function addRow(building){ const addRow = function(building){
$nameElement = $("<td></td>") $nameElement = $("<td></td>")
$nameElement.attr("id", building.id + "-progress.name") .attr("id", `${building.id}-progress.name`)
$nameElement.append(building.name); .append(building.name);
$useElement = $("<td></td>"); $useElement = $("<td></td>")
$useElement.attr("id", building.id + "-progress.use"); .attr("id", `${building.id}-progress.use`)
$useElement.append(building.use) .append(building.use)
$designedElement = $("<td></td>"); $designedElement = $("<td></td>")
$designedElement.attr("id", building.id + "-progress.designed"); .attr("id", `${building.id}-progress.designed`)
$designedElement.addClass("checkboxCell"); .addClass("checkboxCell")
$designedElement.append( .append($("<input>")
$("<input>")
.attr("type", "checkbox") .attr("type", "checkbox")
.attr("id", building.id + ".designed?") .attr("id", `${building.id}.designed?`)
.attr("checked", building.designed))f; .attr("checked", building.designed));
$startedElement = $("<td></td>"); $startedElement = $("<td></td>")
$startedElement.attr("id", building.id + "-progress.stated"); .attr("id", `${building.id}-progress.stated`)
$startedElement.addClass("checkboxCell"); .addClass("checkboxCell")
$startedElement.append( .append($("<input>")
$("<input>")
.attr("type", "checkbox") .attr("type", "checkbox")
.attr("id", building.id + ".started?") .attr("id", `${building.id}.started?`)
.attr("checked", building.started)); .attr("checked", building.started));
$completedElement = $("<td></td>"); $completedElement = $("<td></td>")
$completedElement.attr("id", building.id + "-progress.completed"); .attr("id", `${building.id}-progress.completed`)
$completedElement.addClass("checkboxCell"); .addClass("checkboxCell")
$completedElement.append( .append($("<input>")
$("<input>")
.attr("type", "checkbox") .attr("type", "checkbox")
.attr("id", building.id + ".completed?") .attr("id", `${building.id}.completed?`)
.attr("checked", building.completed)); .attr("checked", building.completed));
$populatedElement = $("<td></td>"); $populatedElement = $("<td></td>")
$populatedElement.attr("id", building.id + "-progress.populated"); .attr("id", `${building.id}-progress.populated`)
$populatedElement.addClass("checkboxCell"); .addClass("checkboxCell")
$populatedElement.append( .append($("<input>")
$("<input>")
.attr("type", "checkbox") .attr("type", "checkbox")
.attr("id", building.id + ".populated?") .attr("id", `${building.id}.populated?`)
.attr("checked", building.populated)); .attr("checked", building.populated));
$outputRow = $("<tr></tr>"); $outputRow = $("<tr></tr>")
$outputRow.attr("id", building.id + "-progress"); .attr("id", `${building.id}-progress`)
$outputRow.append($nameElement); .append($nameElement)
$outputRow.append($useElement); .append($useElement)
$outputRow.append($designedElement); .append($designedElement)
$outputRow.append($startedElement); .append($startedElement)
$outputRow.append($completedElement); .append($completedElement)
$outputRow.append($populatedElement); .append($populatedElement);
return $outputRow; return $outputRow;
} }
console.info("loading"); console.info("loading");