오늘 할일
1. 내비바 2-depth 지도에서 안 보이는 오류 수정 ✔
→시간이 촉박한데 이유를 알 수가 없어서 우회해서 해결함...
2. myCourses 뷰 개선 ✔
2-1. 저장된 코스가 없을 경우 없다고 안내 ✔
3. 상세페이지 뷰 개선 ✔
3-1. 홈페이지 출력 부분: ...으로 줄이기or대체문구 넣기 ✔
- 그냥 버튼으로 만들까
- 홈페이지 없는 경우 버튼 출력 x
3-2. 빠진 항목 추가(반려견 시설) ✔
4. 상세페이지에서 항목별로 출력되게 하기 ✔
5. 상세정보 '-' 앞에서 줄바꿈 넣기 ✔
- content, mainFacility, useCost, policyCautions, petFacility
- 각 도메인 setter 변경
public void setUsedCost(String usedCost) {
String convertedString = usedCost.replaceAll("-", "<br>-");
this.usedCost = convertedString;
}
+ '*' 앞에서도 줄바꿈
public void setContent(String content) {
String convertedString = content.replaceAll("-", "<br>-");
convertedString = convertedString.replaceAll("\\*", "<br>\\*");
this.content = convertedString;
}
"*"이라고만 하면 오류 발생→이스케이프 문자 사용
메시지 Request processing failed; nested exception is java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
5. 로그인했을 때만 리뷰 작성 가능하게 하기 ✔
6. SQL 파일 정리 ✔
7. 메인 페이지 채우기 ✔
7-1. 메인 페이지 내비 수정 ✔
8. 회원정보 페이지 개선
9. 호텔 관심목록 페이지 개선 ✔
10. 컨텐츠 추가는 owner_mem만 가능하게 변경 → 팀원
- 컨텐츠 추가를 owner_mem이 신청하고 관리자가 받아서 승인하게 하면 좋겠지만 시간이 있을지 모르겠다...
11. 내비 메뉴별로 배너 색 다르게 하기 ✔
12. 키워드별/지역별 검색결과 없으면 없다고 띄우기
12-1. 목록 페이지 min-height 지정 ✔
13. id 중복 확인
14. 코스 총합 수정
- 코스 중간 지점을 경유지로 넣어서 api로 출력하면 경유지를 최적화시켜버림............
- 수동으로 더해야 할 듯
- 경유지 열심히 만들었는데...아깝다...
15. owner member info가 없는 것 같은데.....
16. 첫 페이지 home으로 변경
17. 로그인 페이지 정리
5. 로그인했을 때만 리뷰 작성 가능하게 하기
1)현재 코드
<c:when test="${empty sessionScope.sessionId}">
<div id="리뷰" class="p-5" style="width: 32%; margin-right: 1%; border-radius: 10px; height: 350px; padding-top: 5px !important;">
<p style="margin-bottom: 5px">리뷰 작성</p>
<form:form modelAttribute="NewReview" class="form-horizontal">
<form:textarea path="text" class="star_box" placeholder="리뷰 내용을 작성해주세요. (최대 200자)" maxlength="200" />
<input type="submit" class="btn02" value="리뷰 등록"/>
</form:form>
</div>
</c:when>
<%
int verify = (int)request.getAttribute("verify");
if(verify == 1){
%>
<div id="리뷰" class="p-5" style="width: 32%; margin-right: 1%; border-radius: 10px; height: 350px; padding-top: 5px !important;">
<p style="margin-bottom: 5px">나의 리뷰</p>
<form action="review/update" method="POST" class="form-horizontal">
<%-- <div class ="star_rating">
<c:forEach begin="1" end="5" var="i"><!-- value="${i}" -->
<span class="star ${i <= myReview.star ? 'on' : ''}" ></span>
</c:forEach>
<!-- hidden input 추가 -->
<input type="hidden" id="starValue" name="star" />
</div> --%>
<textarea name="text" class="star_box" placeholder="리뷰 내용을 작성해주세요. (최대 200자)" maxlength="200">${myReview.text}</textarea>
<input type="hidden" name="mem_id" value="${myReview.mem_id}"/>
<input type="hidden" name="contentSeq" value="${myReview.contentSeq}"/>
<input type="submit" class="submit-green" value="리뷰 수정"/>
<a href="review/delete?num=${myReview.num}&contentSeq=${myReview.contentSeq}" class="submit-red" onclick="return confirm('리뷰를 삭제하시겠습니까?');">리뷰 삭제</a>
</form>
</div>
<%
}else{
%>
<div id="리뷰" class="p-5" style="width: 32%; margin-right: 1%; border-radius: 10px; height: 350px; padding-top: 5px !important;">
<p style="margin-bottom: 5px">리뷰 작성</p>
<form:form modelAttribute="NewReview" class="form-horizontal">
<!-- <div class ="star_rating">
<span class="star" value="1"> </span>
<span class="star" value="2"> </span>
<span class="star" value="3"> </span>
<span class="star" value="4"> </span>
<span class="star" value="5"> </span>
hidden input 추가
<input type="hidden" id="starValue" name="star" />
</div> -->
<form:textarea path="text" class="star_box" placeholder="리뷰 내용을 작성해주세요. (최대 200자)" maxlength="200" />
<input type="submit" class="btn02" value="리뷰 등록"/>
</form:form>
</div>
<%
}
%>
<c:when>을 추가했을 때 어떻게 되는지 확인해봤더니 리뷰 부분이 아예 출력이 안 된다.
2)자바태그를 빼고 c:choose로 바꿈
<c:choose>
<c:when test="${empty sessionScope.sessionId}">
<div id="리뷰" class="p-5" style="width: 32%; margin-right: 1%; border-radius: 10px; height: 350px; padding-top: 5px !important;">
<p style="margin-bottom: 5px">리뷰 작성</p>
<form:form modelAttribute="NewReview" class="form-horizontal">
<form:textarea path="text" class="star_box" placeholder="리뷰 내용을 작성해주세요. (최대 200자)" maxlength="200" />
<input type="submit" class="btn02" value="리뷰 등록"/>
</form:form>
</div>
</c:when>
<c:when test="${not empty sessionScope.sessionId}">
<c:when test="${verify == 1}">
<div id="리뷰" class="p-5" style="width: 32%; margin-right: 1%; border-radius: 10px; height: 350px; padding-top: 5px !important;">
<p style="margin-bottom: 5px">나의 리뷰</p>
<form action="review/update" method="POST" class="form-horizontal">
<%-- <div class ="star_rating">
<c:forEach begin="1" end="5" var="i"><!-- value="${i}" -->
<span class="star ${i <= myReview.star ? 'on' : ''}" ></span>
</c:forEach>
<!-- hidden input 추가 -->
<input type="hidden" id="starValue" name="star" />
</div> --%>
<textarea name="text" class="star_box" placeholder="리뷰 내용을 작성해주세요. (최대 200자)" maxlength="200">${myReview.text}</textarea>
<input type="hidden" name="mem_id" value="${myReview.mem_id}"/>
<input type="hidden" name="contentSeq" value="${myReview.contentSeq}"/>
<input type="submit" class="submit-green" value="리뷰 수정"/>
<a href="review/delete?num=${myReview.num}&contentSeq=${myReview.contentSeq}" class="submit-red" onclick="return confirm('리뷰를 삭제하시겠습니까?');">리뷰 삭제</a>
</form>
</div>
</c:when>
<c:otherwise>
<div id="리뷰" class="p-5" style="width: 32%; margin-right: 1%; border-radius: 10px; height: 350px; padding-top: 5px !important;">
<p style="margin-bottom: 5px">리뷰 작성</p>
<form:form modelAttribute="NewReview" class="form-horizontal">
<!-- <div class ="star_rating">
<span class="star" value="1"> </span>
<span class="star" value="2"> </span>
<span class="star" value="3"> </span>
<span class="star" value="4"> </span>
<span class="star" value="5"> </span>
hidden input 추가
<input type="hidden" id="starValue" name="star" />
</div> -->
<form:textarea path="text" class="star_box" placeholder="리뷰 내용을 작성해주세요. (최대 200자)" maxlength="200" />
<input type="submit" class="btn02" value="리뷰 등록"/>
</form:form>
</div>
</c:otherwise>
</c:when>
</c:choose>
<div class="d-flex" style="width: 67%">
<c:forEach items="${reviewList}" var="review">
<c:if test="${review.mem_id != sessionScope.sessionId}">
<div id="printReview" class="p-5" style="padding: 5px 50px 50px!important; height: 400px; width: 49%; ">
<p style="margin-bottom: 5px">${review.mem_nickname} (${review.rev_date})</p>
<%-- <div class="star_rating">
<c:forEach begin="1" end="5" var="i">
<span class="star ${i <= review.star ? 'on' : ''}" value="${i}"></span>
</c:forEach>
</div> --%>
<div class="star_box">
<p>${review.text}</p>
</div>
</div>
</c:if>
</c:forEach>
안 됨...
<c:when> 안에 또 <c:when>을 사용할 때는 <c:choose>도 다시 써야 한다.
3. 뷰 계획
1)api에서 제공되는 사진 사이즈가 작음
- 지금 뷰 구성에서는 첫 번째 사진을 확대해서 맨 위에 놓고 있음
- 사진을 확대하는 대신에 슬라이드쇼로 만들어서 제목 위에 배치
2)아래쪽 사진 코너 삭제
function arrangeSlides(){
let slides = document.querySelectorAll(".slide");
let slideBox = document.getElementById("slideBox");
slides.forEach(function(slide, index) {
slide.style.left = `${index * 100}%px`;
});
console.log(slides);
}
왜 안 먹히지............slides에 잡히기는 다 잡히는데...............
'정리노트 > 팀프로젝트' 카테고리의 다른 글
❗ 여행코스 작성 코드 백업 (0) | 2024.03.18 |
---|---|
코스 정보 코드 백업 (0) | 2024.03.18 |
[팀 프로젝트] 24.03.13. 노트 (0) | 2024.03.13 |
[팀 프로젝트] 24.03.12. 노트 (0) | 2024.03.12 |
[팀 프로젝트] 24.03.11. 노트 (0) | 2024.03.11 |