Move all js scripts into this file

This commit is contained in:
franc
2025-05-05 12:33:05 +02:00
parent 1e6d354343
commit a2e50a0195
+2 -2
View File
@@ -103,7 +103,7 @@ async function removeInstruction(instructionId, recipeIdParam) {
function addInstruction() { function addInstruction() {
const container = document.getElementById('instructions-container'); const container = document.getElementById('instructions-container');
const index = document.querySelectorAll('.instruction-item').length; // Index for model binding const index = document.querySelectorAll('.instruction-item').length;
const newInstructionHtml = ` const newInstructionHtml = `
<div class="instruction-item" id="instruction-new-${index}"> <div class="instruction-item" id="instruction-new-${index}">
@@ -150,7 +150,7 @@ async function removeIngredient(ingredientId) {
async function addIngredient() { async function addIngredient() {
const container = document.getElementById('ingredients-container'); const container = document.getElementById('ingredients-container');
const index = document.querySelectorAll('.ingredient-item').length; // Index for model binding const index = document.querySelectorAll('.ingredient-item').length;
const newIngredientHtml = ` const newIngredientHtml = `
<div class="ingredient-item" id="ingredient-new-${index}"> <div class="ingredient-item" id="ingredient-new-${index}">