From 52bdac14c88650646f65b318175d207920d95ce4 Mon Sep 17 00:00:00 2001 From: AlinaMoon123 Date: Wed, 20 Nov 2024 01:07:20 +0300 Subject: [PATCH] prototype --- lake-catalog/pom.xml | 8 +++++++- .../src/main/resources/static/JavaScript/card_script.js | 5 ++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lake-catalog/pom.xml b/lake-catalog/pom.xml index 293f3e4..807b2cf 100644 --- a/lake-catalog/pom.xml +++ b/lake-catalog/pom.xml @@ -1,11 +1,16 @@ + + 4.0.0 + org.springframework.boot spring-boot-starter-parent 3.3.5 + com.example lake-catalog 0.0.1-SNAPSHOT @@ -72,4 +77,5 @@ - \ No newline at end of file + + diff --git a/lake-catalog/src/main/resources/static/JavaScript/card_script.js b/lake-catalog/src/main/resources/static/JavaScript/card_script.js index dca1c9c..4eee6bb 100644 --- a/lake-catalog/src/main/resources/static/JavaScript/card_script.js +++ b/lake-catalog/src/main/resources/static/JavaScript/card_script.js @@ -52,9 +52,8 @@ const submitButton = document.getElementById('submit-review-btn'); const reviewInput = document.getElementById('review-input'); const starRating = document.getElementById('star-rating'); const pathParts = window.location.pathname.split('/'); -const lakeId = pathParts[pathParts.length - 1]; // Последняя часть URL (например, "123") +const lakeId = pathParts[pathParts.length - 1]; -// Это глобальная переменная для хранения выбранного значения звезд let selectedValue = 0; document.addEventListener('DOMContentLoaded', () => { @@ -141,7 +140,7 @@ submitButton.addEventListener('click', () => { }) .then(review => { console.log(review); - // После успешного добавления отзыва, отобразим его + const reviewElement = document.createElement('div'); reviewElement.classList.add('review'); reviewElement.innerHTML = `