|
|
@@ -294,9 +294,9 @@
|
|
|
<input type="hidden" name="cate3No" th:value="${cateInfo.cate3No}"/>
|
|
|
<input type="hidden" name="cate4No" th:value="${cateInfo.cate4No}"/>
|
|
|
<input type="hidden" name="sortingType" value="NEW"/>
|
|
|
-<!-- <input type="hidden" name="newGoods" th:value="${cateInfo.formalGb=='G009_20'?'':'40'}" />-->
|
|
|
+ <input type="hidden" name="newGoods" th:unless="${cateInfo.formalGb=='G009_20'}" th:value="${cateInfo.formalGb=='G009_20'?'':'40'}" />
|
|
|
<input type="hidden" name="keyword" value=""/>
|
|
|
- <input type="hidden" name="benefitArr" th:unless="${cateInfo.formalGb=='G009_20'}" th:value="${cateInfo.formalGb=='G009_20'?'':'40:신상'}"/>
|
|
|
+<!-- <input type="hidden" name="benefitArr" th:unless="${cateInfo.formalGb=='G009_20'}" th:value="${cateInfo.formalGb=='G009_20'?'':'40:신상'}"/>-->
|
|
|
</form>
|
|
|
|
|
|
<script src="/ux/plugins/gaga/gaga.infinite.scrollSession.js"></script>
|
|
|
@@ -322,6 +322,7 @@
|
|
|
$(".br_header").css('background-color','#fff');
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
//가격 슬라이드
|
|
|
//var custom_values = ['9,000원', '230,000원', '487,000원', '700,000원', '1,360,000원', '1,799,000원'];
|
|
|
|
|
|
@@ -559,11 +560,7 @@ console.log(allCateList);
|
|
|
if(formalGb=='G009_20'){
|
|
|
navNm += '<li class="bread_2depth" id="navNm1"><a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',\'\',\'\',\'\',\'\',\'\',\'' + formalGb + '\');">아울렛</a></li>\n';
|
|
|
}
|
|
|
- navNm += '<li class="bread_2depth" id="navNm1"><a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + cate1.cate1No + ' ';
|
|
|
- if(formalGb=='G009_20'){
|
|
|
- navNm += ' ,\'\',\'\',\'\',\'\',\'' + formalGb + '\' ';
|
|
|
- }
|
|
|
- navNm += ');">' + cate1.cate1Nm + '</a></li>\n';
|
|
|
+ navNm += '<li class="bread_2depth" id="navNm1">' + cate1.cate1Nm + '</li>\n';
|
|
|
if (brandGroupNo == 0) {
|
|
|
$("#navHome").attr('href', '/');
|
|
|
$("#navArea").append(navNm);
|
|
|
@@ -649,11 +646,7 @@ console.log(allCateList);
|
|
|
navNm += ' ,\'\',\'\',\'\',\'' + formalGb + '\' ';
|
|
|
}
|
|
|
navNm += ')";>' + cate2.cate2Nm + '</a></li>';
|
|
|
- navNm += '<li class="bread_2depth" id="navNm3"><a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + cate1.cate1No + ',' + cate2.cate2No + ',' + cate3.cate3No + ' ';
|
|
|
- if(formalGb=='G009_20'){
|
|
|
- navNm += ' ,\'\',\'\',\'' + formalGb + '\' ';
|
|
|
- }
|
|
|
- navNm += ')";>' + cate3.cate3Nm + '</a></li>';
|
|
|
+ navNm += '<li class="bread_2depth" id="navNm3">' + cate3.cate3Nm + '</li>';
|
|
|
$("#navArea").append(navNm);
|
|
|
$("#formTitle").text(cate3.cate3Nm);
|
|
|
}else if(cate3.cate3No == cate3No){
|
|
|
@@ -700,11 +693,7 @@ console.log(allCateList);
|
|
|
navNm += ' ,\'\',\'\',\'' + formalGb + '\' ';
|
|
|
}
|
|
|
navNm += ')";>' + cate3.cate3Nm + '</a></li>';
|
|
|
- navNm += '<li class="bread_2depth" id="navNm3"><a href="javascript:void(0);" onclick="cfnGoToGoodsList( ' + brandGroupNo + ',\'' + cateGb + '\',' + cate1.cate1No + ',' + cate2.cate2No + ',' + cate3.cate3No + ',' + cate4.cate4No + ' ';
|
|
|
- if(formalGb=='G009_20'){
|
|
|
- navNm += ' ,\'\',\'' + formalGb + '\' ';
|
|
|
- }
|
|
|
- navNm += ')";>' + cate4.cate4Nm + '</a></li>';
|
|
|
+ navNm += '<li class="bread_2depth" id="navNm3">' + cate4.cate4Nm + '</li>';
|
|
|
$("#navArea").append(navNm);
|
|
|
$("#formTitle").text(cate4.cate4Nm);
|
|
|
}
|
|
|
@@ -742,21 +731,25 @@ console.log(allCateList);
|
|
|
if(thisId == 'unisex'){
|
|
|
if(stat=='on'){
|
|
|
$(obj).attr('onclick','fnFilterOption(this,\'off\');');
|
|
|
+ $(obj).attr('checked', true);
|
|
|
tag += '<input type="hidden" name="unisex" value="G007_Z"/>\n';
|
|
|
$("#searchGoodsForm").append(tag);
|
|
|
}else{
|
|
|
$(obj).attr('onclick','fnFilterOption(this,\'on\');');
|
|
|
+ $(obj).attr('checked', false);
|
|
|
$("#searchGoodsForm input:hidden[name=unisex]").remove();
|
|
|
}
|
|
|
}else{
|
|
|
if(stat=='on'){
|
|
|
$(obj).attr('onclick','fnFilterOption(this,\'off\');');
|
|
|
- // tag += '<input type="hidden" name="newGoods" value="40"/>\n';
|
|
|
- tag += '<input type="hidden" name="benefitArr" value="40:신상"/>\n';
|
|
|
+ $(obj).attr('checked', true);
|
|
|
+ tag += '<input type="hidden" name="newGoods" value="40"/>\n';
|
|
|
+ // tag += '<input type="hidden" name="benefitArr" value="40:신상"/>\n';
|
|
|
$("#searchGoodsForm").append(tag);
|
|
|
}else{
|
|
|
$(obj).attr('onclick','fnFilterOption(this,\'on\');');
|
|
|
- // $("#searchGoodsForm input:hidden[name=newGoods]").remove();
|
|
|
+ $(obj).attr('checked', false);
|
|
|
+ $("#searchGoodsForm input:hidden[name=newGoods]").remove();
|
|
|
$("#searchGoodsForm input:hidden[name=benefitArr]").each(function(){
|
|
|
if($(this).val() == "40:신상"){
|
|
|
$(this).remove();
|
|
|
@@ -764,6 +757,7 @@ console.log(allCateList);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+ fnSetFilterHtml();
|
|
|
fnCategoryGoodsInfiniteScrollInit();
|
|
|
fnGoodsListSearch();
|
|
|
}
|
|
|
@@ -796,40 +790,10 @@ console.log(allCateList);
|
|
|
fnFilterSlider('dcrate' , custom_values02[min].replace('%',''), custom_values02[max].replace('%',''));
|
|
|
}
|
|
|
|
|
|
- // 필터 초기화
|
|
|
- var fnFilterReset = function (){
|
|
|
- //document.location.href = currUrl;
|
|
|
- $("#searchGoodsForm input:hidden[name=brandGroupArr]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=sizeArr]").remove();
|
|
|
- // $("#searchGoodsForm input:hidden[name=dcRateFrom]").remove();
|
|
|
- // $("#searchGoodsForm input:hidden[name=dcRateTo]").remove();
|
|
|
- // $("#searchGoodsForm input:hidden[name=priceFrom]").remove();
|
|
|
- // $("#searchGoodsForm input:hidden[name=priceTo]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=priceArr]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=dcRateArr]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=ageArr]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=seasonArr]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=colorArr]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=benefitArr]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=newGoods]").val('');
|
|
|
- $("#unisex").prop('checked',false);
|
|
|
- $("#unisex").attr('onclick','fnFilterOption(this,\'on\');');
|
|
|
- $("#searchGoodsForm input:hidden[name=unisex]").remove();
|
|
|
- $("#newGoods").prop('checked',false);
|
|
|
- $("#newGoods").attr('onclick','fnFilterOption(this,\'on\');');
|
|
|
- // $("#searchGoodsForm input:hidden[name=newGoods]").val('40');
|
|
|
-
|
|
|
- fnFilterSliderMove(0,5);
|
|
|
- fnDcRateFilterSliderMove(0,10);
|
|
|
- $('.filter_content .sort').find('input[type=checkbox]').each(function (idx){
|
|
|
- $(this).prop('checked',false);
|
|
|
- });
|
|
|
- $("#filterData").html('');
|
|
|
- fnCategoryGoodsInfiniteScrollInit();
|
|
|
- fnGoodsListSearch();
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
var fnGoodsListSearch = function (){
|
|
|
+ console.log('here6');
|
|
|
gagaInfiniteScroll.getHistory();
|
|
|
}
|
|
|
|
|
|
@@ -837,6 +801,7 @@ console.log(allCateList);
|
|
|
var idx = 1;
|
|
|
// 상품 검색
|
|
|
var fnGetInfiniteScrollDataList = function (pageNum){
|
|
|
+ console.log('here7');
|
|
|
$("#searchGoodsForm input[name=pageNo]").val(pageNum+1);
|
|
|
// if(idx==1 || totalCnt > Number($("#searchGoodsForm").find("input[name=pageSize]").val())){
|
|
|
// idx++;
|
|
|
@@ -845,6 +810,7 @@ console.log(allCateList);
|
|
|
}
|
|
|
|
|
|
var fnDrawInfiniteScrollData = function (result){
|
|
|
+ console.log('here8');
|
|
|
totalCnt = result.paging.totalCount;
|
|
|
$("#totCntId").text(totalCnt.addComma());
|
|
|
gagaInfiniteScroll.pageStatus.totalCount = totalCnt;
|
|
|
@@ -1404,10 +1370,12 @@ console.log(allCateList);
|
|
|
}
|
|
|
});
|
|
|
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);
|
|
|
if(historyData!=null){
|
|
|
- // console.log('historyData>>'+historyData);
|
|
|
+ console.log('historyData>>'+historyData);
|
|
|
historyData = JSON.parse(historyData);
|
|
|
}else{
|
|
|
historyData = {};
|
|
|
@@ -1426,7 +1394,7 @@ console.log(allCateList);
|
|
|
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=priceFrom]').val())){
|
|
|
$("#filterForm").find('input[name=hPriceFrom]').val($("#searchGoodsForm").find('input[name=priceFrom]').val());
|
|
|
@@ -1440,19 +1408,38 @@ console.log(allCateList);
|
|
|
if(!gagajf.isNull($("#searchGoodsForm").find('input[name=dcRateTo]').val())){
|
|
|
$("#filterForm").find('input[name=hDcRateTo]').val($("#searchGoodsForm").find('input[name=dcRateTo]').val());
|
|
|
}
|
|
|
+ idx++;
|
|
|
+ if(gagajf.isNull($("#searchGoodsForm").find("input[name=unisex]").val())){
|
|
|
+ $("#unisex").attr('onclick','fnFilterOption(this,\'on\');');
|
|
|
+ $("#unisex").attr('checked', false);
|
|
|
+ }else{
|
|
|
+ $("#unisex").attr('onclick','fnFilterOption(this,\'off\');');
|
|
|
+ $("#unisex").attr('checked', true);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(gagajf.isNull($("#searchGoodsForm").find("input[name=newGoods]").val())){
|
|
|
+ $("#newGoods").attr('onclick','fnFilterOption(this,\'on\');');
|
|
|
+ $("#newGoods").attr('checked', false);
|
|
|
+ }else{
|
|
|
+ $("#newGoods").attr('onclick','fnFilterOption(this,\'off\');');
|
|
|
+ $("#newGoods").attr('checked', true);
|
|
|
+ }
|
|
|
if(typeof historyData.sortingType!='undefined' && historyData.sortingType!=''){
|
|
|
$("#searchGoodsForm input:hidden[name=sortingType]").val(historyData.sortingType);
|
|
|
fnSortingChange(this,historyData.sortingType,'back');
|
|
|
$(".fillter").show();
|
|
|
+ console.log('here1');
|
|
|
}else{
|
|
|
$(".fillter").show();
|
|
|
fnGoodsListSearch();
|
|
|
fnSetPriceFilter();
|
|
|
fnImgOnoff();
|
|
|
+ console.log('here2');
|
|
|
// console.log('here*++ '+historyData.scroll);
|
|
|
// $('html, body').animate({scrollTop: historyData.backScroll});
|
|
|
}
|
|
|
}else{
|
|
|
+ console.log('here3');
|
|
|
fnCategoryGoodsInfiniteScrollInit();
|
|
|
var sortingType = $("#searchGoodsForm input:hidden[name=sortingType]").val();
|
|
|
if(sortingType=='BEST' || sortingType=='REVIEW'){
|
|
|
@@ -1462,8 +1449,10 @@ console.log(allCateList);
|
|
|
|
|
|
$(this).addClass("on");
|
|
|
fnSortingChange(this, sortingType);
|
|
|
+ console.log('here4');
|
|
|
}else{
|
|
|
fnGoodsListSearch();
|
|
|
+ console.log('here5');
|
|
|
}
|
|
|
}
|
|
|
});
|