Sfoglia il codice sorgente

검색 결과화면 히스토리백 건수 수정

bin2107 4 anni fa
parent
commit
687e829f31

+ 1 - 1
src/main/webapp/WEB-INF/views/mob/display/BrandSearchGoodsListFormMob.html

@@ -588,7 +588,7 @@
 			// }
 			fnReCheckFilterList();
 			if(typeof historyData.totalCount!='undefined' && historyData.totalCount!=''){
-				$("#totCntId").text(historyData.totalCount);
+				$("#totCntId").text(historyData.totalCount.addComma());
 			}
 			if(typeof historyData.sortingType!='undefined' && historyData.sortingType!=''){
 				$("#searchGoodsForm input:hidden[name=sortingType]").val(historyData.sortingType);

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

@@ -604,7 +604,7 @@
 		<input type="hidden" name="sortingType" value="NEW"/>
 	</form>
 
-	<script src="/ux/plugins/gaga/gaga.infinite.scrollSession.js"></script>
+	<script th:src="@{'/ux/plugins/gaga/gaga.infinite.scrollSession.js?v=' + ${#calendars.format(#calendars.createNow(), 'yyyyMMddHHmmss')}}" src="/ux/plugins/gaga/gaga.infinite.scrollSession.js"></script>
 	<script src="/ux/plugins/jquery/jquery.history.min.js"></script>
 	<script th:src="@{'/biz/search.js?v=' + ${#calendars.format(#calendars.createNow(), 'yyyyMMddHHmmss')}}" src="/biz/search.js"></script>
 
@@ -676,7 +676,21 @@
 			// }
 			fnReCheckFilterList();
 			if(typeof historyData.totalCount!='undefined' && historyData.totalCount!=''){
-				$("#totCntId").text(historyData.totalCount);
+				$("#totCntId").text(historyData.totalCount.addComma());
+				$("#prodListCnt").text('('+historyData.totalCount.addComma()+')');
+			}else{
+				$("#totCntId").text('0');
+				$("#prodListCnt").text('(0)');
+			}
+			if(typeof historyData.planningCount!='undefined' && historyData.planningCount!=''){
+				$("#planListCnt").text('('+historyData.planningCount.addComma()+')');
+			}else{
+				$("#planListCnt").text('(0)');
+			}
+			if(typeof historyData.eventCount!='undefined' && historyData.eventCount!=''){
+				$("#eventListCnt").text('('+historyData.eventCount.addComma()+')');
+			}else{
+				$("#eventListCnt").text('(0)');
 			}
 			if(typeof historyData.sortingType!='undefined' && historyData.sortingType!=''){
 				$("#searchGoodsForm input:hidden[name=sortingType]").val(historyData.sortingType);

+ 1 - 1
src/main/webapp/WEB-INF/views/web/display/BrandSearchGoodsListFormWeb.html

@@ -681,7 +681,7 @@
 					filterStatHtml = historyData.filterStatHtml;
 				}
 				if(typeof historyData.totalCount!='undefined' && historyData.totalCount!=''){
-					$("#totCntId").text(historyData.totalCount);
+					$("#totCntId").text(historyData.totalCount.addComma());
 				}
 				if(!gagajf.isNull($("#searchGoodsForm").find('input[name=priceArr]').val())){
 					let tempPrice = $("#searchGoodsForm").find('input[name=priceArr]').val();

+ 19 - 3
src/main/webapp/WEB-INF/views/web/display/SearchGoodsListFormWeb.html

@@ -581,7 +581,7 @@
 		<input type="hidden" name="sortingType" value="NEW"/>
 	</form>
 
-	<script src="/ux/plugins/gaga/gaga.infinite.scrollSession.js"></script>
+	<script th:src="@{'/ux/plugins/gaga/gaga.infinite.scrollSession.js?v=' + ${#calendars.format(#calendars.createNow(), 'yyyyMMddHHmmss')}}" src="/ux/plugins/gaga/gaga.infinite.scrollSession.js"></script>
 	<script src="/ux/plugins/jquery/jquery.history.min.js"></script>
 	<script th:src="@{'/biz/search.js?v=' + ${#calendars.format(#calendars.createNow(), 'yyyyMMddHHmmss')}}" src="/biz/search.js"></script>
 
@@ -727,7 +727,7 @@
 				$("#searchGoodsForm input:hidden[name=unisex]").remove();
 				$("#searchGoodsForm input:hidden[name=newGoods]").remove();
 				var historyData = sessionStorage.getItem(document.location.href);
-				// console.log('historyData>>'+historyData);
+				console.log('historyData>>'+historyData);
 				if(historyData!=null){
 					historyData = JSON.parse(historyData);
 				}else{
@@ -747,7 +747,21 @@
 					filterStatHtml = historyData.filterStatHtml;
 				}
 				if(typeof historyData.totalCount!='undefined' && historyData.totalCount!=''){
-					$("#totCntId").text(historyData.totalCount);
+					$("#totCntId").text(historyData.totalCount.addComma());
+					$("#prodListCnt").text('('+historyData.totalCount.addComma()+')');
+				}else{
+					$("#totCntId").text('0');
+					$("#prodListCnt").text('(0)');
+				}
+				if(typeof historyData.planningCount!='undefined' && historyData.planningCount!=''){
+					$("#planListCnt").text('('+historyData.planningCount.addComma()+')');
+				}else{
+					$("#planListCnt").text('(0)');
+				}
+				if(typeof historyData.eventCount!='undefined' && historyData.eventCount!=''){
+					$("#eventListCnt").text('('+historyData.eventCount.addComma()+')');
+				}else{
+					$("#eventListCnt").text('(0)');
 				}
 				if(gagajf.isNull($("#searchGoodsForm").find("input[name=unisex]").val())){
 					$("#unisex").attr('onclick','fnFilterOption(this,\'on\');');
@@ -828,6 +842,7 @@
 				$("#eventListCnt").text('(0)');
 			}else{
 				$("#eventListCnt").text('('+result.eventList.length.addComma()+')');
+				gagaInfiniteScroll.pageStatus.eventCount = result.eventList.length;
 			}
 
 			if(result.eventList != null && result.eventList.length>0){
@@ -869,6 +884,7 @@
 				$("#planListCnt").text('(0)');
 			}else{
 				$("#planListCnt").text('('+result.planList.length.addComma()+')');
+				gagaInfiniteScroll.pageStatus.planningCount = result.planList.length;
 			}
 			$("#planNodata").hide();
 			$("#planKeyword").text('');

+ 8 - 0
src/main/webapp/ux/plugins/gaga/gaga.infinite.scrollSession.js

@@ -55,6 +55,8 @@ var gagaInfiniteScroll = {
 		, filterStatHtml : ''
 		, totalCount : ''
 		, backScroll : ''
+		, planningCount : ''
+		, eventCount : ''
 	},
 	obj : {
 		  $ajaxBoxOuter : $('#listBoxOuter')
@@ -125,6 +127,8 @@ var gagaInfiniteScroll = {
 			this.pageStatus.filterStatHtml = historyData.filterStatHtml;
 			this.pageStatus.totalCount = historyData.totalCount;
 			this.pageStatus.backScroll = historyData.scroll;
+			this.pageStatus.planningCount = historyData.planningCount;
+			this.pageStatus.eventCount = historyData.eventCount;
 
 			gagaInfiniteScroll.draw(historyData.htm);
 		};
@@ -208,6 +212,8 @@ var gagaInfiniteScroll = {
 				, filterStatHtml : gagaInfiniteScroll.pageStatus.filterStatHtml
 				, totalCount : gagaInfiniteScroll.pageStatus.totalCount
 				, backScroll : sBackScroll
+				, planningCount : gagaInfiniteScroll.pageStatus.planningCount
+				, eventCount : gagaInfiniteScroll.pageStatus.eventCount
 		};
 		historyData = JSON.stringify(historyData);
 		sessionStorage.setItem(document.location.href, historyData);
@@ -233,6 +239,8 @@ var gagaInfiniteScroll = {
 					, filterStatHtml : gagaInfiniteScroll.pageStatus.filterStatHtml
 					, totalCount : gagaInfiniteScroll.pageStatus.totalCount
 					, backScroll : gagaInfiniteScroll.pageStatus.backScroll
+					, planningCount : gagaInfiniteScroll.pageStatus.planningCount
+					, eventCount : gagaInfiniteScroll.pageStatus.eventCount
 		};
 		historyData = JSON.stringify(historyData);
 		sessionStorage.setItem(document.location.href, historyData);