Просмотр исходного кода

Minor frontend bug fixes to recipe categories.

Lee Morgan 5 лет назад
Родитель
Сommit
f0a16c9c52

+ 4 - 0
views/dashboardPage/css/sidebars/recipeDetails.css

@@ -4,6 +4,10 @@
     width: 100%;
 }
 
+    #recipeName{
+        padding: 0;
+    }
+
     #recipeIngredientList{
         width: 100%;
     }

+ 2 - 0
views/dashboardPage/ejs/sidebars/recipeDetails.ejs

@@ -42,6 +42,8 @@
     </div>
 
     <h1 id="recipeName"></h1>
+
+    <h4 id="recipeCategory"></h4>
     
     <div id="recipeIngredientList"></div>
 

+ 2 - 0
views/dashboardPage/js/sidebars/editRecipe.js

@@ -8,6 +8,8 @@ let editRecipe = {
             nameInput.parentNode.style.display = "none";
         }
 
+        document.getElementById("editRecipeCategory").value = recipe.category;
+
         //Populate ingredients
         let ingredientList = document.getElementById("editRecipeIngList");
 

+ 1 - 0
views/dashboardPage/js/sidebars/recipeDetails.js

@@ -15,6 +15,7 @@ let recipeDetails = {
         }
         document.getElementById("hideRecipeBtn").onclick = ()=>{this.hide(recipe)};
         document.getElementById("recipeName").innerText = recipe.name;
+        document.getElementById("recipeCategory").innerText = recipe.category;
 
         let button = document.getElementById("removeRecipeBtn");
         switch(merchant.pos){