From 12e818e079dfa578e74b5b922edf2285547d4bb4 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Sun, 20 Nov 2022 15:23:22 -0800 Subject: [PATCH] fix js linting Signed-off-by: Arthur Lu --- source/assets/scripts/CreatePage.js | 20 ++++++++++---------- source/assets/scripts/ReviewDetails.js | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/source/assets/scripts/CreatePage.js b/source/assets/scripts/CreatePage.js index 02ddea1..9f5bb65 100644 --- a/source/assets/scripts/CreatePage.js +++ b/source/assets/scripts/CreatePage.js @@ -22,20 +22,20 @@ function initFormHandler() { */ let select = document.getElementById("select"); select.addEventListener("change", function() { - const input = document.getElementById('source'); + const input = document.getElementById("source"); if (select.value == "file") { - input.innerHTML = ` - Source: - - ` + input.innerHTML = ` + Source: + + `; } //TODO: change to photo taking for sprint 3 else { - input.innerHTML = ` - Source: - - ` + input.innerHTML = ` + Source: + + `; } }); @@ -51,7 +51,7 @@ function initFormHandler() { //convert image file into data URL for local storage reader.readAsDataURL(document.getElementById("mealImg").files[0]); - }) + }); form.addEventListener("submit", function(e){ /* diff --git a/source/assets/scripts/ReviewDetails.js b/source/assets/scripts/ReviewDetails.js index 60cb614..1786c5e 100644 --- a/source/assets/scripts/ReviewDetails.js +++ b/source/assets/scripts/ReviewDetails.js @@ -62,20 +62,20 @@ function setupUpdate(){ */ let select = document.getElementById("select"); select.addEventListener("change", function() { - const input = document.getElementById('source'); + const input = document.getElementById("source"); if (select.value == "file") { - input.innerHTML = ` - Source: - - ` + input.innerHTML = ` + Source: + + `; } //TODO: change to photo taking for sprint 3 else { - input.innerHTML = ` - Source: - - ` + input.innerHTML = ` + Source: + + `; } }); @@ -92,7 +92,7 @@ function setupUpdate(){ //convert image file into data URL for local storage reader.readAsDataURL(document.getElementById("mealImg").files[0]); - }) + }); //Take formdata values as newData when submit