Przeglądaj źródła

Merge remote-tracking branch 'origin/ST24PRJ-578' into develop

card007 4 lat temu
rodzic
commit
d8c303cd99

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

@@ -405,74 +405,6 @@
 	// 상품리스트 페이지 확인용
 	// 상품리스트 페이지 확인용
 	var listIdx = 1;
 	var listIdx = 1;
 
 
-	$(window).on("pageshow", function(event) {
-		$('#filterForm input[name=brandGroup]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=size]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=dcRate]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=age]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=season]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=color]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=benefit]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=price]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		if ( (event.originalEvent && event.originalEvent.persisted) || (window.performance && window.performance.navigation.type == 2)) {
-			var historyData = sessionStorage.getItem(document.location.href);
-			// console.log(historyData);
-			if(historyData!=null){
-				// console.log('historyData>>'+historyData);
-				historyData = JSON.parse(historyData);
-			}else{
-				historyData = {};
-			}
-			// if(typeof historyData.filterHtml!='undefined' && historyData.filterHtml!=''){
-			// 	//console.log('historyData.filterHtml>>>'+historyData.filterHtml);
-			// 	$("#searchGoodsForm").append(historyData.filterHtml);
-			// 	filterHtml = historyData.filterHtml;
-			// }
-			// if(typeof historyData.filterStatHtml!='undefined' && historyData.filterStatHtml!=''){
-			// 	$("#filterForm").append(historyData.filterStatHtml);
-			// 	filterStatHtml = historyData.filterStatHtml;
-			// }
-			fnReCheckFilterList();
-			if(typeof historyData.totalCount!='undefined' && historyData.totalCount!=''){
-				$("#totCntId").text(historyData.totalCount.addComma());
-			}
-			if(typeof historyData.sortingType!='undefined' && historyData.sortingType!=''){
-				$("#searchGoodsForm input:hidden[name=sortingType]").val(historyData.sortingType);
-				fnSortingChange(this,historyData.sortingType,'back','Mob');
-			}else{
-				listIdx++;
-				fnSearchGoodsListSearch();
-			}
-		}else{
-			fnCategoryGoodsInfiniteScrollInit();
-
-			var sortingType = $("#searchGoodsForm input:hidden[name=sortingType]").val();
-			if(sortingType=='NEW' || sortingType=='REVIEW' || sortingType=='ROWPRICE'){
-				fnSortingChange(this,sortingType,'','Mob');
-			}else{
-				fnSearchGoodsListSearch();
-				fnGetSearchPlanningList();
-				fnGetSearchEventList();
-			}
-		}
-	});
-
 	var fnSearchGoodsListSearch = function (){
 	var fnSearchGoodsListSearch = function (){
 		gagaInfiniteScroll.getHistory();
 		gagaInfiniteScroll.getHistory();
 	}
 	}
@@ -891,6 +823,81 @@
 			$("#htopTitle").text(brandNm);
 			$("#htopTitle").text(brandNm);
 		}
 		}
 
 
+		// 크롬 mobile device 
+	    var chromeHistoryBack = false;
+	    if(window.performance && window.performance.navigation.type == 2){
+	    	chromeHistoryBack = true;
+	    }
+	    
+		$(window).on("pageshow", function(event) {
+			$('#filterForm input[name=brandGroup]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=size]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=dcRate]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=age]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=season]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=color]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=benefit]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=price]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			
+			if ( (event.originalEvent && event.originalEvent.persisted) || (window.performance && window.performance.navigation.type == 2) || chromeHistoryBack) {
+				var historyData = sessionStorage.getItem(document.location.href);
+				// console.log(historyData);
+				if(historyData!=null){
+					// console.log('historyData>>'+historyData);
+					historyData = JSON.parse(historyData);
+				}else{
+					historyData = {};
+				}
+				if(typeof historyData.filterHtml!='undefined' && historyData.filterHtml!=''){
+				 	//console.log('historyData.filterHtml>>>'+historyData.filterHtml);
+					$("#searchGoodsForm").append(historyData.filterHtml);
+					filterHtml = historyData.filterHtml;
+				}
+				if(typeof historyData.filterStatHtml!='undefined' && historyData.filterStatHtml!=''){
+				 	$("#filterForm").append(historyData.filterStatHtml);
+				 	filterStatHtml = historyData.filterStatHtml;
+				}
+				
+				fnReCheckFilterList();
+				if(typeof historyData.totalCount!='undefined' && historyData.totalCount!=''){
+					$("#totCntId").text(historyData.totalCount.addComma());
+				}
+				if(typeof historyData.sortingType!='undefined' && historyData.sortingType!=''){
+					$("#searchGoodsForm input:hidden[name=sortingType]").val(historyData.sortingType);
+					fnSortingChange(this,historyData.sortingType,'back','Mob');
+				}else{
+					listIdx++;
+					fnSearchGoodsListSearch();
+				}
+			}else{
+				fnCategoryGoodsInfiniteScrollInit();
+
+				var sortingType = $("#searchGoodsForm input:hidden[name=sortingType]").val();
+				if(sortingType=='NEW' || sortingType=='REVIEW' || sortingType=='ROWPRICE'){
+					fnSortingChange(this,sortingType,'','Mob');
+				}else{
+					fnSearchGoodsListSearch();
+					fnGetSearchPlanningList();
+					fnGetSearchEventList();
+				}
+			}
+		});
 	});
 	});
 
 
 	// 카테고리 필터 생성
 	// 카테고리 필터 생성

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

@@ -723,7 +723,13 @@
 			fnCategoryGoodsInfiniteScrollInit();
 			fnCategoryGoodsInfiniteScrollInit();
 			fnGoodsListSearch();
 			fnGoodsListSearch();
 		}
 		}
-
+		
+		// 크롬 mobile device 
+	    var chromeHistoryBack = false;
+	    if(window.performance && window.performance.navigation.type == 2){
+	    	chromeHistoryBack = true;
+	    }
+	    
 		// 사파리 - event.persisted || 크롬 - window.performance.navigation.type 이 1이면 새로고침, 2면 페이지 이동을 통한 캐쉬페이징
 		// 사파리 - event.persisted || 크롬 - window.performance.navigation.type 이 1이면 새로고침, 2면 페이지 이동을 통한 캐쉬페이징
 		$(window).on("pageshow", function(event) {
 		$(window).on("pageshow", function(event) {
 			if( history.scrollRestoration ) window.history.scrollRestoration = 'manual';
 			if( history.scrollRestoration ) window.history.scrollRestoration = 'manual';
@@ -751,7 +757,8 @@
 			$('#filterForm input[name=price]:checked').each(function(){
 			$('#filterForm input[name=price]:checked').each(function(){
 				$(this).attr('checked', true);
 				$(this).attr('checked', true);
 			});
 			});
-			if ( (event.originalEvent && event.originalEvent.persisted) || (window.performance && window.performance.navigation.type == 2)) {
+			
+			if ( (event.originalEvent && event.originalEvent.persisted) || (window.performance && window.performance.navigation.type == 2) || chromeHistoryBack) {
 				if( history.scrollRestoration ) window.history.scrollRestoration = 'manual';
 				if( history.scrollRestoration ) window.history.scrollRestoration = 'manual';
 				$("#searchGoodsForm input:hidden[name=unisex]").remove();
 				$("#searchGoodsForm input:hidden[name=unisex]").remove();
 				$("#searchGoodsForm input:hidden[name=newGoods]").remove();
 				$("#searchGoodsForm input:hidden[name=newGoods]").remove();

+ 100 - 93
src/main/webapp/WEB-INF/views/mob/display/SearchGoodsListFormMob.html

@@ -468,99 +468,7 @@
 	// 상품리스트 페이지 확인용
 	// 상품리스트 페이지 확인용
 	var listIdx = 1;
 	var listIdx = 1;
 
 
-	$(window).on("pageshow", function(event) {
-		if( history.scrollRestoration ) window.history.scrollRestoration = 'manual';
-		$('#filterForm input[name=brandGroup]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=size]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=dcRate]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=age]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=season]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=color]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=benefit]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		$('#filterForm input[name=price]:checked').each(function(){
-			$(this).attr('checked', true);
-		});
-		if ( (event.originalEvent && event.originalEvent.persisted) || (window.performance && window.performance.navigation.type == 2)) {
-			$("#searchGoodsForm input:hidden[name=unisex]").remove();
-			$("#searchGoodsForm input:hidden[name=newGoods]").remove();
-			if( history.scrollRestoration ) window.history.scrollRestoration = 'manual';
-			var historyData = sessionStorage.getItem(document.location.href);
-			// console.log(historyData);
-			if(historyData!=null){
-				// console.log('historyData>>'+historyData);
-				historyData = JSON.parse(historyData);
-			}else{
-				historyData = {};
-			}
-			if(gagajf.isNull($("#searchGoodsForm").find("input[name=unisex]").val())){
-				$("#unisex").attr('onclick','fnResetListIdx();fnFilterOption(this,\'on\');');
-				$("#unisex").attr('checked', false);
-			}else{
-				$("#unisex").attr('onclick','fnResetListIdx();fnFilterOption(this,\'off\');');
-				$("#unisex").attr('checked', true);
-			}
-
-			if(gagajf.isNull($("#searchGoodsForm").find("input[name=newGoods]").val())){
-				$("#newGoods").attr('onclick','fnResetListIdx();fnFilterOption(this,\'on\');');
-				$("#newGoods").attr('checked', false);
-			}else{
-				$("#newGoods").attr('onclick','fnResetListIdx();fnFilterOption(this,\'off\');');
-				$("#newGoods").attr('checked', true);
-			}
-			// if(typeof historyData.filterHtml!='undefined' && historyData.filterHtml!=''){
-			// 	//console.log('historyData.filterHtml>>>'+historyData.filterHtml);
-			// 	$("#searchGoodsForm").append(historyData.filterHtml);
-			// 	filterHtml = historyData.filterHtml;
-			// }
-			// if(typeof historyData.filterStatHtml!='undefined' && historyData.filterStatHtml!=''){
-			// 	$("#filterForm").append(historyData.filterStatHtml);
-			// 	filterStatHtml = historyData.filterStatHtml;
-			// }
-			fnReCheckFilterList();
-			if(typeof historyData.totalCount!='undefined' && historyData.totalCount!=''){
-				$("#totCntId").text(historyData.totalCount.addComma());
-				$("#prodListCnt").text('('+historyData.totalCount.addComma()+')');
-			}else{
-				$("#totCntId").text('0');
-				$("#prodListCnt").text('(0)');
-			}
-			if(typeof historyData.sortingType!='undefined' && historyData.sortingType!=''){
-				$("#searchGoodsForm input:hidden[name=sortingType]").val(historyData.sortingType);
-				fnSortingChange(this,historyData.sortingType,'back','Mob');
-			}else{
-				listIdx++;
-				fnSearchGoodsListSearch();
-				fnGetSearchPlanningList();
-				fnGetSearchEventList();
-			}
-		}else{
-			fnCategoryGoodsInfiniteScrollInit();
-
-			var sortingType = $("#searchGoodsForm input:hidden[name=sortingType]").val();
-			if(sortingType=='NEW' || sortingType=='REVIEW' || sortingType=='ROWPRICE'){
-				fnSortingChange(this,sortingType,'','Mob');
-			}else{
-				fnSearchGoodsListSearch();
-				fnGetSearchPlanningList();
-				fnGetSearchEventList();
-			}
-		}
-	});
-
+	
 	var fnSearchGoodsListSearch = function (){
 	var fnSearchGoodsListSearch = function (){
 		gagaInfiniteScroll.getHistory();
 		gagaInfiniteScroll.getHistory();
 	}
 	}
@@ -970,6 +878,105 @@
 		if ($('#sizeLi2').find('label').length == 0) $('#sizeLi2').hide();
 		if ($('#sizeLi2').find('label').length == 0) $('#sizeLi2').hide();
 		if ($('#sizeLi3').find('label').length == 0) $('#sizeLi3').hide();
 		if ($('#sizeLi3').find('label').length == 0) $('#sizeLi3').hide();
 
 
+		// 크롬 mobile device 
+	    var chromeHistoryBack = false;
+	    if(window.performance && window.performance.navigation.type == 2){
+	    	chromeHistoryBack = true;
+	    }
+	    
+		$(window).on("pageshow", function(event) {
+			if( history.scrollRestoration ) window.history.scrollRestoration = 'manual';
+			$('#filterForm input[name=brandGroup]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=size]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=dcRate]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=age]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=season]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=color]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=benefit]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			$('#filterForm input[name=price]:checked').each(function(){
+				$(this).attr('checked', true);
+			});
+			
+			if ( (event.originalEvent && event.originalEvent.persisted) || (window.performance && window.performance.navigation.type == 2) || chromeHistoryBack) {
+				$("#searchGoodsForm input:hidden[name=unisex]").remove();
+				$("#searchGoodsForm input:hidden[name=newGoods]").remove();
+				if( history.scrollRestoration ) window.history.scrollRestoration = 'manual';
+				var historyData = sessionStorage.getItem(document.location.href);
+				// console.log(historyData);
+				if(historyData!=null){
+					// console.log('historyData>>'+historyData);
+					historyData = JSON.parse(historyData);
+				}else{
+					historyData = {};
+				}
+				if(gagajf.isNull($("#searchGoodsForm").find("input[name=unisex]").val())){
+					$("#unisex").attr('onclick','fnResetListIdx();fnFilterOption(this,\'on\');');
+					$("#unisex").attr('checked', false);
+				}else{
+					$("#unisex").attr('onclick','fnResetListIdx();fnFilterOption(this,\'off\');');
+					$("#unisex").attr('checked', true);
+				}
+
+				if(gagajf.isNull($("#searchGoodsForm").find("input[name=newGoods]").val())){
+					$("#newGoods").attr('onclick','fnResetListIdx();fnFilterOption(this,\'on\');');
+					$("#newGoods").attr('checked', false);
+				}else{
+					$("#newGoods").attr('onclick','fnResetListIdx();fnFilterOption(this,\'off\');');
+					$("#newGoods").attr('checked', true);
+				}
+				if(typeof historyData.filterHtml!='undefined' && historyData.filterHtml!=''){
+					//console.log('historyData.filterHtml>>>'+historyData.filterHtml);
+					$("#searchGoodsForm").append(historyData.filterHtml);
+					filterHtml = historyData.filterHtml;
+				}
+				if(typeof historyData.filterStatHtml!='undefined' && historyData.filterStatHtml!=''){
+					$("#filterForm").append(historyData.filterStatHtml);
+					filterStatHtml = historyData.filterStatHtml;
+				}
+				fnReCheckFilterList();
+				if(typeof historyData.totalCount!='undefined' && historyData.totalCount!=''){
+					$("#totCntId").text(historyData.totalCount.addComma());
+					$("#prodListCnt").text('('+historyData.totalCount.addComma()+')');
+				}else{
+					$("#totCntId").text('0');
+					$("#prodListCnt").text('(0)');
+				}
+				if(typeof historyData.sortingType!='undefined' && historyData.sortingType!=''){
+					$("#searchGoodsForm input:hidden[name=sortingType]").val(historyData.sortingType);
+					fnSortingChange(this,historyData.sortingType,'back','Mob');
+				}else{
+					listIdx++;
+					fnSearchGoodsListSearch();
+					fnGetSearchPlanningList();
+					fnGetSearchEventList();
+				}
+			}else{
+				fnCategoryGoodsInfiniteScrollInit();
+
+				var sortingType = $("#searchGoodsForm input:hidden[name=sortingType]").val();
+				if(sortingType=='NEW' || sortingType=='REVIEW' || sortingType=='ROWPRICE'){
+					fnSortingChange(this,sortingType,'','Mob');
+				}else{
+					fnSearchGoodsListSearch();
+					fnGetSearchPlanningList();
+					fnGetSearchEventList();
+				}
+			}
+		});
 	});
 	});
 
 
 	// 카테고리 필터 생성
 	// 카테고리 필터 생성