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

Merge branch 'sowon' into develop

sowon4187 5 лет назад
Родитель
Сommit
508c591e42

+ 13 - 8
src/main/webapp/WEB-INF/views/web/mypage/MypageReviewDetailFormWeb.html

@@ -28,7 +28,7 @@
 <!-- <input type="hidden" name="bestYn" th:value="${review.bestYn}" /> -->
 <input type="hidden" name="photoYn" th:value="${review.photoYn}" />
 <input type="hidden" name="reviewSq" th:value="${review.reviewSq}" />
-<input type="hidden" name="rvAtcSq" th:value="${review.rvAtcSq}" />
+<input type="hidden" name="attachSq" th:value="${review.attachSq}" />
 </form>
 <a href="javascript:void(0);" rel="modal:close" onclick="cfCloseLayer('layer_review_best')" class="close-modal">Close</a> 
 <script th:inline="javascript">
@@ -41,7 +41,7 @@
 		params.reviewSq = $('#reviewDetailForm input[name=reviewSq]').val();
 		//params.bestYn =$('#reviewDetailForm input[name=bestYn]').val();
 		params.photoYn = $('#reviewDetailForm input[name=photoYn]').val();
-		params.rvAtcSq = $('#reviewDetailForm input[name=rvAtcSq]').val();
+		params.attachSq = $('#reviewDetailForm input[name=attachSq]').val();
 		gagajf.ajaxSubmit("/mypage/review/detail/list", "json", fnReviewDetailCallback, params);
 	}
 
@@ -50,6 +50,7 @@
 		// 목록
 		if (result.reviewList != null && result.reviewList.length > 0) {
 			let fileGbClass = '';
+			let rdx = $('#reviewDetailForm input[name=attachSq]').val();
 			$.each(result.reviewList, function(idx, review) {
 				let tag = '';
 				tag +='<div class="pop_cont">\n';
@@ -183,20 +184,20 @@
 					let activeClass = '';
 					$.each(review.reviewAttachList, function(aIdx, reviewAttach){
 						activeClass = '';
-						if (aIdx == 0){
+						/* if (aIdx.rvAtcSq == rdx){
 							activeClass = 'active';
-						}
+						} */
 						fileGbClass = '';
 						if (reviewAttach.fileGb == "M") fileGbClass = "mov";
 						if (reviewAttach.fileGb == "M") {
-							tag +='			<li>\n';
+							tag +='			<li id="'+ reviewAttach.rvAtcSq+'">\n';
 							tag +='				<div class="pic '+activeClass+'"> \n'; <!-- 활성화시 active 클래스 추가 -->
 							tag +='							<span class="thumb '+ fileGbClass +'"><iframe width="100%" height="100%" src="'+_kollusMediaUrl +'/'+reviewAttach.kmcKey +'?player_version=html5" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></span>\n';
 							tag +='				</div>\n';
 							tag +='			</li>\n';
 						}else{
-							tag +='			<li>\n';
-							tag +='				<div class="pic '+activeClass+'"> \n'; <!-- 활성화시 active 클래스 추가 -->
+							tag +='			<li id="'+ reviewAttach.rvAtcSq+'">\n';
+							tag +='				<div class="pic '+activeClass+'" > \n'; <!-- 활성화시 active 클래스 추가 -->
 							tag +='					<span class="thumb" class="'+fileGbClass+'" style="background-image:url('+ _imgUrl + reviewAttach.sysFileNm +');\" >\n';<!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
 							tag +='					<img src="'+ _imgUrl + reviewAttach.sysFileNm +'" alt="">\n';
 							tag +='					</span>\n';
@@ -228,10 +229,14 @@
 				        $this.find('.thumblist ul').attr('style', 'width:' + thumbListWidth + 'px;');
 				        
 				    }); 
-
+				
+				$("#" + rdx).trigger("click");
 			});
+			
 		}
 		
+	
+		
 	}
 	
 	

+ 7 - 6
src/main/webapp/WEB-INF/views/web/mypage/MypageReviewFormWeb.html

@@ -310,21 +310,22 @@
 					html+='						<div class="photo_box">';
 					html+='							<div class="photo_list">';
 					html+='								<ul>';
-					for (var i = 0; i < attachList.length; i++) {
-						if (attachList[i].reviewSq == item.reviewSq) {
+					/* for (var i = 0; i < attachList.length; i++) { */
+					$.each(attachList, function(aIdx, attachList){
+						if (attachList.reviewSq == item.reviewSq) {
 						html+='									<li>';
 						html+='										<a>';
 						html+='											<div class="pic">';
-						if (attachList[i].fileGb == 'M') {
-							html+='												<span onclick="cfMypageReviewDetail(\''+item.goodsCd+'\', \'Y\',\''+item.reviewSq+'\',\''+attachList[i].rvAtcSq+'\');" class="thumb mov" style="background-image:url(' + _kollusMediaUrl + '/poster/' + attachList[i].kmcKey + '?player_version=html5);"></span>';
+						if (attachList.fileGb == 'M') {
+							html+='												<span onclick="cfMypageReviewDetail(\''+item.goodsCd+'\', \'Y\',\''+item.reviewSq+'\',\''+attachList.rvAtcSq+'\');" class="thumb mov" style="background-image:url(' + _kollusMediaUrl + '/poster/' + attachList.kmcKey + '?player_version=html5);"></span>';
 						}else{
-							html+='												<span onclick="cfMypageReviewDetail(\''+item.goodsCd+'\', \'Y\',\''+item.reviewSq+'\',\''+attachList[i].rvAtcSq+'\');" class="thumb" style="background-image:url(' + _uploadImageUrl + '/' + attachList[i].sysFileNm + ');"></span>';
+							html+='												<span onclick="cfMypageReviewDetail(\''+item.goodsCd+'\', \'Y\',\''+item.reviewSq+'\',\''+attachList.rvAtcSq+'\');" class="thumb" style="background-image:url(' + _uploadImageUrl + '/' + attachList.sysFileNm + ');"></span>';
 						}
 						html+='											</div>';
 						html+='										</a>';
 						html+='									</li>';
 						}
-					}
+					})
 					html+='								</ul>';
 					html+='							</div>';
 					html+='						</div>';

+ 1 - 1
src/main/webapp/WEB-INF/views/web/planning/PlanningEventMainFormWeb.html

@@ -29,7 +29,7 @@
 		<div class="wrap">
 			<div class="content ev_list"> <!-- 페이지특정 클래스 = ev_list -->
 				<div class="cont_head">
-                    <h2 class="displayH t_c">이벤트</h2>
+                    <h2 class="displayH t_c">이벤트/혜택</h2>
 				</div>
 				<div class="cont_body">
 					<div class="ev_mem_rank">