|
@@ -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();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// 카테고리 필터 생성
|
|
// 카테고리 필터 생성
|