ソースを参照

Merge branch 'develop' of http://112.172.147.34:4936/style24/style24.front into develop

card007 5 年 前
コミット
5cca510247

+ 1 - 0
src/main/java/com/style24/persistence/domain/Plan.java

@@ -93,6 +93,7 @@ public class Plan extends TscBaseDomain {
 	private String dispDt;			// 기획전 기간
 	private String viewDt;			// 미리보기 일시
 	private String preview;			// 미리보기 여부 (Y:미리보기)
+	private Integer attachSq;
 
 	// 기획전 브랜드
 	private Integer brandGroupNo;	//기획전브랜드그룹번호

+ 0 - 2
src/main/java/com/style24/persistence/mybatis/shop/TsfPlanning.xml

@@ -1637,8 +1637,6 @@
 		   AND PE.PLAN_SQ = #{planSq}
 		   <if test="planEntrySq != null and planEntrySq != ''">
 		   AND PE.PLAN_ENTRY_SQ = #{planEntrySq}
-		ORDER BY FIELD(PEA.PLAN_ENTRY_AT_SQ, #{planEntryAtSq})DESC
-		        ,PLAN_ENTRY_AT_SQ ASC 
 		   </if>
 	</select>
 	

+ 2 - 2
src/main/webapp/WEB-INF/views/mob/display/CategoryGoodsListFormMob.html

@@ -51,7 +51,7 @@
 										</a>
 									</div>
 								</li>
-								<li><a href="#none" class="filter open_filter">필터</a></li>
+								<li><a href="javascript:void(0);" class="filter open_filter">필터</a></li>
 							</ul>
 						</div>
 					</div>
@@ -1082,7 +1082,7 @@
 					// fnCategoryGoodsInfiniteScrollInit();
 					console.log('here*'+historyData.scroll);
 					// $('html, body').animate({scrollTop: $('#'+scrollLoc).offset().top}, 'slow');
-					// $('html, body').animate({scrollTop: historyData.scroll}, 'slow');
+					$('html, body').animate({scrollTop: historyData.scroll}, 'slow');
 					fnGoodsListSearch();
 				}
 			}else{

+ 10 - 2
src/main/webapp/WEB-INF/views/mob/display/MallMainFormMob.html

@@ -293,7 +293,7 @@
 								<ul class="swiper-wrapper">
 									<th:block th:each="ContentsData, ContentsStat : ${mainData.ContentsList}">
 										<li class="swiper-slide" th:classappend="${ContentsStat.count==1}?'on'"> <!-- li.on / li .btn.active : 메뉴 표시 -->
-											<button class="btn btn_link" th:attr="data-tab=${'pick'+ContentsStat.count}"><span th:text="${ContentsData.brandGroupNm}">BUKAROO</span></button>
+											<button class="btn btn_link" th:id="${'pickBtn'+ContentsStat.count}" th:attr="data-tab=${'pick'+ContentsStat.count}"><span th:text="${ContentsData.brandGroupNm}">BUKAROO</span></button>
 										</li>
 									</th:block>
 								</ul>
@@ -340,7 +340,7 @@
 								<!-- 210524 : pick-post 형제로 버튼그룹 이동 -->
 								<div class="btn_group_flex">
 									<div>
-										<button class="btn btn_default" th:onclick="cfnGoToBrandMain([[${brandPickData.brandGroupNo}]])">다음 브랜드 보기<span></span></button>
+										<button class="btn btn_default" th:onclick="fnNextBrand([[${brandPickStat.size}]],[[${brandPickStat.count}]])">다음 브랜드 보기<span></span></button>
 									</div>
 								</div>
 								<!-- //210329 : 브랜드 pick 상품 swiper 제거 -->
@@ -831,6 +831,14 @@
 			$('#htopSub').show();
 		}
 	}
+
+	var fnNextBrand = function (tot, idx){
+		if(tot == idx){
+			$("#pickBtn1").click();
+		}else{
+			$("#pickBtn"+(idx+1)).click();
+		}
+	}
 /*]]>*/
 </script>
 

+ 2 - 1
src/main/webapp/WEB-INF/views/mob/goods/GoodsDealDescFormMob.html

@@ -159,8 +159,9 @@
 		<!-- 브랜드 노출 -->
 		<div class="brand_box">
 			<p class="name" th:text="${goodsInfo.brandGroupNm}">TBJ 티비제이</p>
-			<a href="javascript:void(0);" class="btn btn_default" th:onclick="cfnGoToBrandMain([[${goodsInfo.brandGroupNo}]])" ><span>브랜드 홈 바로가기</span></a>
+			<a href="javascript:void(0);" class="brend_home" th:onclick="cfnGoToBrandMain([[${goodsInfo.brandGroupNo}]])" ><span>브랜드 홈 바로가기</span></a>
 		</div>
+		
 		<!-- //브랜드 노출 -->	
 		
 		<!-- 상품필수정보 노출 -->

+ 2 - 0
src/main/webapp/WEB-INF/views/mob/goods/GoodsDetailQnaFormMob.html

@@ -134,6 +134,8 @@
 			if (result.paging.pageable.totalPage > result.paging.pageable.pageNo) {
 				$('#btnMore').parent().show();
 				$('#goodsQnaForm input[name=pageNo]').val(result.paging.pageable.pageNo + 1);
+			}else{
+				$('#btnMore').parent().hide();
 			}
 		
 		}else{

+ 4 - 4
src/main/webapp/WEB-INF/views/mob/goods/GoodsIncludeFormMob.html

@@ -160,7 +160,7 @@
 										<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm+'?RS=331'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 									</div>
 									<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">BRAND NAME1</p>
-									<div class="itemName" ><span class="tit_option" th:text="${'[상품'+status.count+']'}">[상품1]</span><th:block th:text="${goodsInfo.goodsFullNm}"></th:block> </div>
+									<div class="itemName" ><span class="tit_option" th:text="${'[상품'+status.count+'] '}">[상품1]</span><th:block th:text="${goodsInfo.goodsFullNm}"></th:block> </div>
 									<div class="itemText">
 										<span class="tx1">(리뷰 <th:block  th:text="${(goodsInfo.reviewRegCnt <= 9999) ? #numbers.formatInteger(goodsInfo.reviewRegCnt, 0,'COMMA')  : '9,999+'}"></th:block>)</span>
 									</div>
@@ -195,7 +195,7 @@
 										<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm+'?RS=331'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 									</div>
 									<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">BRAND NAME1</p>
-									<div class="itemName" ><span class="tit_option" th:text="${'[상품'+status.count+']'}">[상품1]</span><th:block th:text="${goodsInfo.goodsFullNm}"></th:block> </div>
+									<div class="itemName" ><span class="tit_option" th:text="${'[상품'+status.count+'] '}">[상품1]</span><th:block th:text="${goodsInfo.goodsFullNm}"></th:block> </div>
 									<div class="itemText">
 										<span class="tx1">(문의 <th:block  th:text="${(goodsInfo.goodsQnaCnt <= 9999) ? #numbers.formatInteger(goodsInfo.goodsQnaCnt, 0,'COMMA')  : '9,999+'}"></th:block>)</span>
 									</div>
@@ -230,7 +230,7 @@
 										<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm+'?RS=331'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 									</div>
 									<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">BRAND NAME1</p>
-									<div class="itemName" ><span class="tit_option" th:text="${'[상품'+status.count+']'}">[상품1]</span><th:block th:text="${goodsInfo.goodsFullNm}"></th:block> </div>
+									<div class="itemName" ><span class="tit_option" th:text="${'[상품'+status.count+'] '}">[상품1]</span><th:block th:text="${goodsInfo.goodsFullNm}"></th:block> </div>
 								</a>
 								<input type="hidden" name="selectGoods" th:value="${goodsInfo.compsGoodsCd}" />
 							</div>
@@ -292,7 +292,7 @@
 														<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm+'?RS=331'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 													</div>
 													<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">BRAND NAME1</p>
-													<div class="itemName" ><span class="tit_option" th:text="${'[상품'+status.count+']'}">[상품1]</span><th:block th:text="${goodsInfo.goodsFullNm}"></th:block></div>
+													<div class="itemName" ><span class="tit_option" th:text="${'[상품'+status.count+'] '}">[상품1]</span><th:block th:text="${goodsInfo.goodsFullNm}"></th:block></div>
 													<p class="itemPrice">
 														<th:block th:text="${#numbers.formatInteger(goodsInfo.currPrice, 0,'COMMA')}"> 134,100</th:block>
 														<span class="itemPrice_original" th:if="${goodsInfo.listPrice > goodsInfo.currPrice}" th:text="${#numbers.formatInteger(goodsInfo.listPrice, 0,'COMMA')}">89,000</span>

+ 6 - 7
src/main/webapp/WEB-INF/views/mob/mypage/MypageReviewDetailFormMob.html

@@ -157,11 +157,10 @@
 /*<![CDATA[*/
 	
 	$(document).ready( function() {
-		/* let reviewAttchSq = 0; 
-		if (!gagajf.isNull( [[${review.rvAtcSq}]])){
-			reviewAttchSq = [[${review.rvAtcSq}]];
-		
-		} */
+		let reviewAttchSq = 0; 
+		if (!gagajf.isNull( [[${review.attachSq}]])){
+			reviewAttchSq = [[${review.attachSq}]];
+		} 
 		 //슬라이드 - 포토,영상리뷰팝업 
         var photoreviewdetailSwiper = new Swiper('.pd_photoreviewdetail_pop .area_slider .swiper-container', {
             observer: true,
@@ -171,9 +170,9 @@
                 el: '.swiper-pagination',
                 type: 'fraction',
             },
-         /*    photoreviewdetailSwiper.slideTo(reviewAttchSq, 0, false); */
+        
         });
-		 
+       photoreviewdetailSwiper.slideTo(reviewAttchSq, 0, false);
         // 포토,베스트리뷰숨김
         var review_open=$(".btn_review_open");
         $(document).on('click','.btn_review_open',function(e){

+ 5 - 4
src/main/webapp/WEB-INF/views/mob/mypage/MypageReviewFormMob.html

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

+ 4 - 4
src/main/webapp/WEB-INF/views/mob/planning/PlanningDetailFormMob.html

@@ -203,9 +203,6 @@
 			</div>
 		</main>
 		
-	<div class="modal pop_full photo_comment_popup" id="photo_full_popup" tabindex="-1" role="dialog" aria-labelledby="comment_popup" aria-hidden="true">
-		
-	</div>
 	<!-- (공통) 공유팝업 -->
 		<div class="modal fade" id="tglShare" tabindex="-1" role="dialog"
 			aria-labelledby="aModalLabel" aria-hidden="true">
@@ -307,10 +304,13 @@ var fnSearchCallback = function (result) {
 					html += '		<div class="cmt_cont">';
 					if (result.replyAttachList.length>0) {
 						html += '			<div class="img_wrap clear">';
+						var j = 0;
 						for (var i = 0; i < result.replyAttachList.length; i++) {
 							if(result.replyAttachList[i].planEntrySq == item.planEntrySq){
-								html += '				<div class="pics"><img class="picsThumbs" src="'+ _uploadImageUrl +'/'+result.replyAttachList[i].sysFileNm +'" onclick="cfPlanReplyDetail(\''+item.planSq+'\',\''+item.planEntrySq+'\',\''+result.replyAttachList[i].planEntryAtSq+'\');"></div>';
+								html += '				<div class="pics"><img class="picsThumbs" src="'+ _uploadImageUrl +'/'+result.replyAttachList[i].sysFileNm +'" onclick="cfPlanReplyDetail(\''+item.planSq+'\',\''+item.planEntrySq+'\',\''+result.replyAttachList[i].planEntryAtSq+'\', \''+ j +'\');"></div>';
+								j++;
 							}
+							
 						}
 						html += '			</div>';
 					}

+ 14 - 76
src/main/webapp/WEB-INF/views/mob/planning/PlanningReplyPhotoFormMob.html

@@ -57,97 +57,35 @@
 </div>
 
 <a href="javascript:void(0);" rel="modal:close"
-	onclick="cfCloseLayer('layer_review_photo')" class="close-modal">Close</a>
+	onclick="cfCloseLayer('photo_full_popup')" class="close-modal">Close</a>
 <script th:inline="javascript">
+/* 210414_추가 : swiper fraction 숫자 1자리수 일때 앞에 0 스크립트 추가 */
+
+
 /*<![CDATA[*/
-	
-	
-	
 	$(document).ready( function() {
-		
+		let replyAttchSq = 0; 
+		if (!gagajf.isNull( [[${plan.attachSq}]])){
+			replyAttchSq = [[${plan.attachSq}]];
+		} 
 		$(document).on('click','.pop_open_btn',function(){
 			$('.modal.photo_comment_popup .pop_detail').toggleClass('active');
 		});
 		
-		/* 210414_추가 : swiper fraction 숫자 1자리수 일때 앞에 0 스크립트 추가 */
-		var swiper = new Swiper('.pop_slide .swiper-container', {
+		var photoreplydetailSwiper = new Swiper('.pop_slide .swiper-container', {
 			observer: true,
 			observeParents: true,
+			slidesPerView: 1,
 			pagination: {
-				el: '.pop_slide .swiper-pagination',
+				el: '.swiper-pagination',
 				type: 'fraction',
-				formatFractionCurrent: function (number) {
-					switch(number)
-					{
-						case 1:
-						myNum='01'
-						break;
-						case 2:
-						myNum='02'
-						break;
-						case 3:
-						myNum='03'
-						break;
-						case 4:
-						myNum='04'
-						break;
-						case 5:
-						myNum='05'
-						break;
-						case 6:
-						myNum='06'
-						break;
-						case 7:
-						myNum='07'
-						break;
-						case 8:
-						myNum='08'
-						break;
-						case 9:
-						myNum='09'
-						break;
-						default:myNum= number
-						}
-					return myNum; 
-				},
-				formatFractionTotal: function (number) {
-					switch(number)
-					{
-						case 1:
-						myNum='01'
-						break;
-						case 2:
-						myNum='02'
-						break;
-						case 3:
-						myNum='03'
-						break;
-						case 4:
-						myNum='04'
-						break;
-						case 5:
-						myNum='05'
-						break;
-						case 6:
-						myNum='06'
-						break;
-						case 7:
-						myNum='07'
-						break;
-						case 8:
-						myNum='08'
-						break;
-						case 9:
-						myNum='09'
-						break;
-						default:myNum= number
-						}
-					return myNum; 
-				},
 			},
 		});
 		
 		
+		photoreplydetailSwiper.slideTo(replyAttchSq, 0, false);
+		photoreplydetailSwiper.update();
+		
 	});
 	
 	

+ 2 - 2
src/main/webapp/WEB-INF/views/web/common/fragments/BrandGnbWeb.html

@@ -17,7 +17,7 @@
 <header id="header" th:fragment="gnb">
 
 	<div class="common_header br_header" th:style="${'background-color: #' + brandGroupInfo.rgbCd}">
-		<div class="area">
+		<div class="area" th:style="${'background-color: #' + brandGroupInfo.rgbCd}">
 			<div class="logo">
 				<a href="javascript:void(0);" th:onclick="cfnGoToBrandMain([[${brandGroupInfo.brandGroupNo}]]);">
 					<h1>
@@ -34,7 +34,7 @@
 				<span><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MYPAGE);" title="마이페이지 바로가기">마이페이지</a></span>
 			</div>
 		</div>
-		<div class="gnb">
+		<div class="gnb" th:style="${'background-color: #' + brandGroupInfo.rgbCd}">
 			<!-- nav -->
 			<div class="nav">
 				<ul class="bundle" id="ulGnbTab">

+ 7 - 1
src/main/webapp/WEB-INF/views/web/common/layout/BrandLayoutWeb.html

@@ -35,7 +35,13 @@
 <script th:inline="javascript">
 /*<![CDATA[*/
 	$(document).ready(function() {
-		$("#container").css('backgroundColor','#fff');
+		let brandGroupColor = [[${brandGroupInfo.rgbCd}]];
+		if(brandGroupColor != null){
+			$("#container").css('backgroundColor',[[${brandGroupInfo.rgbCd}]]);
+		}else{
+			$("#container").css('backgroundColor','#fff');
+		}
+
 	});
 /*]]>*/
 </script>

+ 206 - 0
src/main/webapp/ux/plugins/gaga/gaga.infinite.scroll.js

@@ -0,0 +1,206 @@
+/*
+ * Inifinite Scroll Java Script written by gagamel.
+ *
+ * Copyright (c) 2016 gagamel (nogdoo.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2016-04-28 $
+ *
+ * 사용 예)
+ * 		// HTML 태그는 다음과 같은 구조로 되어 있어야 하며
+ * 		// id 명칭은 container, listBoxOuter, listBox 가 필요하다.
+ * 		<section id="container">
+ * 			<div id="listBoxOuter">
+ * 				<ul id="listBox">
+ * 				</ul>
+ *			</div>
+ *		</section>
+ *
+ * 		// JQUERY History 파일과 인피니트 스크롤 관련 자바스크립트 파일을 import 되어 있어야 한다.
+ * 		<script type="text/javascript" src="/ux/plugins/jquery.history.min.js"></script>
+ * 		<script type="text/javascript" src="/ux/plugins/gaga.infinite.scroll.js"></script>
+ *
+ * 		<script type="text/javascript">
+ * 			// 인피니트 스크롤에 대한 History 정보를 가져오기 위해 함수를 호출한다.
+ *			// History 정보가 없을 경우 fnGetInfiniteScrollDataList 함수가 호출된다.
+ * 			$(function() { gagaInfiniteScroll.getHistory(); });
+ *
+ *			// 인피니트 스크롤 이벤트 발생 시 데이터 가져오기
+ *			var fnGetInfiniteScrollDataList = function(pageNum) {
+ *				// 콜백함수인 gagaInfiniteScroll.jsonToHtml 에서는 fnDrawInfiniteScrollData 함수를 호출한다.
+ *				gagajf.ajaxSubmitForm(document.searchForm, "/goods/list", "json", gagaInfiniteScroll.jsonToHtml);
+ *			}
+ *
+ *			// 인피니트 스크롤 이벤트 발생 시 가져온 데이터를 특정 태그에 append
+ *			// fnDrawInfiniteScrollData(result, pageNum) 함수 구현
+ *			// 		이 함수 내에서의 로직은
+ *			//		1. 가져온 데이터로 HTML 태그를 만든다.
+ *			// 		2. 만든 태그를 append 하는 gagaInfiniteScroll.draw() 함수를 호출
+ *		</script>
+ */
+
+var gagaInfiniteScroll = {
+	pageStatus : {
+		pageNum : []      // [0,1,2...] 로드된 페이지 (Array)
+		, loadPage : 0      // 로드할 페이지
+		, loadAlign : 'not' // 로드 상태(prev, next, not)
+		, historyScroll : 0 //
+		, nowPage : null    // 현재 페이지
+		, pageUrl : {       // page url
+		}
+		, totalCount : ''
+	},
+	obj : {
+		$ajaxBoxOuter : $('#listBoxOuter')
+		, $ajaxBox : $('#listBox')
+		, $window : $(window)
+		, $loadingBar : '<div style="width: 100%; padding-top: 50px; text-align: center;" id="loadingBar"><img src="/ux/plugins/gaga/loader.gif" style="width:25px; height:25px;"/></div>'
+//		, $loadingBar : '<div style="width: 100%; padding-top: 50px; text-align: center;" id="loadingBar"><img src="/images/hsmob/common/loading_bar_01.gif" width="24px" height=" 22px"/></div>'
+	},
+	scrollCheck : function() {
+		var obj = this.obj, stat = this.pageStatus;
+
+		if (obj.$window.scrollTop() >= obj.$ajaxBox.offset().top + obj.$ajaxBox.height() - obj.$window.height()) { // 더보기
+			if (stat.loadAlign == 'not') {
+				var pageLen = this.pageStatus.pageNum.length - 1;
+				var nextPageNum = this.pageStatus.pageNum[pageLen] + 1;
+				this.pageStatus.pageNum.push(nextPageNum);
+				this.pageStatus.loadPage = nextPageNum;
+				stat.loadAlign = 'next';
+				this.getDataList();
+			};
+		}
+	},
+	getDataList : function() {
+		if (this.pageStatus.loadAlign == 'prev') {
+			this.obj.$ajaxBoxOuter.prepend($(this.obj.$loadingBar));
+		} else if (this.pageStatus.loadAlign == 'next') {
+			this.obj.$ajaxBoxOuter.append($(this.obj.$loadingBar));
+		};
+
+		// 인피니트 스크롤 이벤트에서 호출될 함수(데이터 가져오기 등)
+		// fnGetInfiniteScrollDataList 함수는 개발단에서 구현해야 한다.
+		fnGetInfiniteScrollDataList(this.pageStatus.loadPage);
+	},
+	getHistory : function() {
+		var historyData = History.getState();
+		if (historyData.data.pageNum === undefined || historyData.data.pageNum === '' || historyData.data.htm === undefined || historyData.data.htm == '') {
+			this.pageStatus.loadPage = 0;
+			this.pageStatus.pageNum[0] = 0;
+			this.pageStatus.loadAlign = 'next';
+			this.pageStatus.historyScroll = 0;
+
+			this.getDataList();
+		} else {
+			this.pageStatus.loadPage = historyData.data.pageNum;
+			this.pageStatus.pageNum[0] = historyData.data.pageNum;
+			this.pageStatus.historyScroll = historyData.data.dataIndex;
+			this.pageStatus.loadAlign = 'next';
+			this.pageStatus.loadAlign = historyData.data.totalCount;
+
+			gagaInfiniteScroll.draw(historyData.data.htm);
+		};
+
+		$(window).on('scroll', function() {
+			gagaInfiniteScroll.scrollCheck();
+		});
+	},
+	draw : function(htm, scrollTop, containerHeight) {
+		if (htm == 'not') {
+			$('#loadingBar').remove();
+			this.pageStatus.loadAlign = 'top';
+		} else {
+			var startH = $('#infiniteContainer').height();
+			var $addHtm = $(htm);
+			var $imgs = $addHtm.find('img');
+			var loadCheck = 0;
+			var len = $imgs.length;
+
+			if (scrollTop && containerHeight) {
+			} else {
+			}
+
+			// $addHtm.find('img.lazy').lazyload({root: null,
+			// 	rootMargin: "100px",
+			// 	threshold: 0});
+
+			$.each($imgs, function(index) {
+				$imgs.eq(index).on('load',function() {
+					loadCheck++;
+					imgLpadComp();
+				});
+			});
+
+			var imgLpadComp = function() {
+				if (len - 1 == loadCheck) {
+					gagaInfiniteScroll.pushHistory(
+						gagaInfiniteScroll.pageStatus.nowPage
+						, $(window).scrollTop()
+						, $('#infiniteContainer').height()
+						, gagaInfiniteScroll.pageStatus.loadPage
+						, 0
+						, gagaInfiniteScroll.obj.$ajaxBox.html());
+					if (scrollTop && containerHeight) {
+						gagaInfiniteScroll.obj.$window.scrollTop.scrollTop(0).scrollTop(scrollTop);
+					} else {
+						gagaInfiniteScroll.obj.$window.scrollTop(gagaInfiniteScroll.obj.$window.scrollTop() + 1);
+					}
+				};
+			};
+
+			$('#loadingBar').remove();
+
+			// Append HTML
+			this.obj.$ajaxBox.append($addHtm);
+
+			if (scrollTop && containerHeight) {
+				gagaInfiniteScroll.obj.$window.scrollTop.scrollTop(0).scrollTop(scrollTop);
+			} else {
+				$(window).scrollTop($(window).scrollTop() + 1);
+			}
+
+			this.pageStatus.loadAlign = 'not';
+		}
+	},
+	pushHistory : function(page, sScrollTop, sHeight, sPageNum, sDataIndex, sHtml) {
+		History.replaceState({
+			state: page
+			, scroll: sScrollTop
+			, height: sHeight
+			, pageUrl: gagaInfiniteScroll.pageStatus.pageUrl
+			, name: gagaInfiniteScroll.pageStatus.nowPage
+			, pageNum : sPageNum
+			, dataIndex : sDataIndex
+			, htm : sHtml
+			, totalCount : gagaInfiniteScroll.pageStatus.totalCount
+		}, "", "");
+	},
+	pushLinkHistory : function(pageNum, dataIndex, obj) { // 링크에서 사용
+		var $pageNum = (pageNum || pageNum == 0) ? pageNum : '';
+		var $dataIndex = (dataIndex || dataIndex == 0) ? dataIndex : '';
+		var $html = (obj) ? $(obj).parents('#listBox').html() : '';
+
+		History.replaceState({
+			state : gagaInfiniteScroll.pageStatus.nowPage
+			, scroll : $(window).scrollTop()
+			, height : $('#infiniteContainer').height()
+			, pageUrl : gagaInfiniteScroll.pageStatus.pageUrl
+			, name : gagaInfiniteScroll.pageStatus.nowPage
+			, pageNum : $pageNum
+			, dataIndex : $dataIndex
+			, htm : $html
+			, totalCount : gagaInfiniteScroll.pageStatus.totalCount
+		}, "", "");
+
+		return false;
+	},
+	jsonToHtml : function(result) {
+		// Data 가져온 후 실행될 함수
+		// fnDrawInfiniteScrollData 함수는 개발단에서 구현해야 한다.
+		if (result.dataList == "not") // data가 더 이상 없으면
+			fnDrawInfiniteScrollData('not', result.CURRENT_PAGE - 1);
+		else
+			fnDrawInfiniteScrollData(result, result.CURRENT_PAGE - 1);
+	}
+};

+ 5 - 4
src/main/webapp/ux/style24_link.js

@@ -651,19 +651,20 @@ function cfGoodsInstockAlarmInfo(goodsCd, colorCd) {
 * @access : public
 * @desc   : 댓글 이미지 팝업
 * <pre>
-*		cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq);
+*		cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq);
 * </pre>
 */
-function cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq) {
-	var str = '<div class="modal pop_full photo_comment_popup" id="photo_full_popup" tabindex="-1" role="dialog" aria-labelledby="comment_popup" aria-hidden="true">';
+function cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq) {
+	var str = '<div class="modal pop_full photo_comment_popup" id="photo_full_popup" tabindex="-1" role="dialog" aria-labelledby="comment_popup" aria-hidden="true"></div>';
 
-	if ($('#layer_review_best').length == 0) {
+	if ($('#photo_full_popup').length == 0) {
 		$('body').append(str);
 	}
 	
 	var params = '?planSq=' + planSq;
 	params += '&planEntrySq=' + planEntrySq;
 	if (typeof (planEntryAtSq) != 'undefined') params += "&planEntryAtSq=" + planEntryAtSq;
+	if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
 	
 	cfnOpenLayer(_PAGE_PLANNING_REPLY_DETAIL_LAYER+params, 'photo_full_popup');
 }