bin2107 4 years ago
parent
commit
415431eec8

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

@@ -287,7 +287,7 @@
 							<li class="categori chkFilter" id="categoryFilterDiv">
 								<a href="javascript:void(0)" class="daps1">카테고리<span class="pic"></span></a>
 								<ul class="daps2" id="categoryArea">
-
+									<li><a href="javascript:void(0);" onclick="fnSetMobCateFilter(this, 'ALL');">전체</a></li>
 								</ul>
 							</li>
 							<li class="brand chkFilter" th:if="${filterBrandList != null and !filterBrandList.empty}" id="brandGroupFilterDiv">

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

@@ -360,7 +360,7 @@
 							<li class="categori chkFilter" id="categoryFilterDiv">
 								<a href="javascript:void(0)" class="daps1">카테고리<span class="pic"></span></a>
 								<ul class="daps2" id="categoryArea">
-
+									<li><a href="javascript:void(0);" onclick="fnSetMobCateFilter(this, 'ALL');">전체</a></li>
 								</ul>
 							</li>
 							<li class="brand chkFilter" th:if="${filterBrandList != null and !filterBrandList.empty}" id="brandGroupFilterDiv">
@@ -1090,21 +1090,21 @@
 		let tag = '';
 		if(cate1 != null){
 			tag += '<li>\n';
-			tag += '	<a href="javascript:void(0)" data-depth="1" onclick="fnSetMobCateFilter(this, \''+cate1.cate1No+'\');" cateFullNm="'+cate1.cate1Nm+'">'+cate1.cate1Nm+'</a>';
+			tag += '	<a href="javascript:void(0)" data-depth="1" onclick="fnSetMobCateFilter(this, \'\', \''+cate1.cate1No+'\');" cateFullNm="'+cate1.cate1Nm+'">'+cate1.cate1Nm+'</a>';
 			if(cate1.leafYn == 'N' && cate1.cate2List.length > 0){
 				tag += '	<ul class="daps3">\n';
 				$.each(cate1.cate2List, function (idx2,cate2){
 					tag += '		<li>\n';
-					tag += '			<a href="javascript:void(0)" data-depth="2" onclick="fnSetMobCateFilter(this, \''+cate1.cate1No+'\',\''+cate2.cate2No+'\');" cateFullNm="'+cate1.cate1Nm+'>'+cate2.cate2Nm+'">'+cate2.cate2Nm+'</a>';
+					tag += '			<a href="javascript:void(0)" data-depth="2" onclick="fnSetMobCateFilter(this,\'\', \''+cate1.cate1No+'\',\''+cate2.cate2No+'\');" cateFullNm="'+cate1.cate1Nm+'>'+cate2.cate2Nm+'">'+cate2.cate2Nm+'</a>';
 					if(cate2.leafYn == 'N' && cate2.cate3List.length > 0){
 						tag += '	<ul class="daps4">\n';
 						$.each(cate2.cate3List, function (idx3,cate3){
 							tag += '<li>\n';
-							tag += '<a href="javascript:void(0)" data-depth="3" onclick="fnSetMobCateFilter(this,\''+cate1.cate1No+'\',\''+cate2.cate2No+'\',\''+cate3.cate3No+'\');" cateFullNm="'+cate1.cate1Nm+'>'+cate2.cate2Nm+'>'+cate3.cate3Nm+'">'+cate3.cate3Nm+'</a>\n';
+							tag += '<a href="javascript:void(0)" data-depth="3" onclick="fnSetMobCateFilter(this,\'\',\''+cate1.cate1No+'\',\''+cate2.cate2No+'\',\''+cate3.cate3No+'\');" cateFullNm="'+cate1.cate1Nm+'>'+cate2.cate2Nm+'>'+cate3.cate3Nm+'">'+cate3.cate3Nm+'</a>\n';
 							if(cate3.leafYn == 'N' && cate3.cate4List.length >0){
 								tag += '<ul class="daps5">\n';
 								$.each(cate3.cate4List, function (idx4,cate4){
-									tag += '<li><a href="javascript:void(0)" data-depth="4" onclick="fnSetMobCateFilter(this,\''+cate1.cate1No+'\',\''+cate2.cate2No+'\',\''+cate3.cate3No+'\',\''+cate4.cate4No+'\');" cateFullNm="'+cate1.cate1Nm+'>'+cate2.cate2Nm+'>'+cate3.cate3Nm+'>'+cate4.cate4Nm+'">'+cate4.cate4Nm+'</a></li>\n';
+									tag += '<li><a href="javascript:void(0)" data-depth="4" onclick="fnSetMobCateFilter(this,\'\',\''+cate1.cate1No+'\',\''+cate2.cate2No+'\',\''+cate3.cate3No+'\',\''+cate4.cate4No+'\');" cateFullNm="'+cate1.cate1Nm+'>'+cate2.cate2Nm+'>'+cate3.cate3Nm+'>'+cate4.cate4Nm+'">'+cate4.cate4Nm+'</a></li>\n';
 								});
 								tag += '</ul>\n';
 							}

+ 17 - 19
src/main/webapp/WEB-INF/views/web/common/fragments/FooterWeb.html

@@ -1226,22 +1226,21 @@
 							tag += '	<div class="itemsGrp">\n';
 							
 							$.each(result, function (idx, item) {
-								tag += '	<div class="item_prod">';	
-								if (item.stockQtySum>0 && item.stockQtySum<=5) {
-									tag += '		<div class="item_state soldout">';	
-									tag += '			<div class="shape"><span>곧 품절돼요!</span></div>';
+								tag += '<div class="item_prod">\n';
+								tag += '	<div class="item_state ';
+								if(item.stockQtySum < 1){
+									tag += 'soldout';
 								}
-								if (item.stockQtySum<=0) {
-									tag += '		<div class="item_state soldout">';	
-								}else{
-									tag += '		<div class="item_state soldout">';	
+								tag += ' ">\n';
+								if(item.stockQtySum>0 && item.stockQtySum<=5){
+									tag += '		<div class="shape"><span>곧 품절돼요!</span></div>\n';
 								}
-								tag += '			<button type="button" class="itemLike active" goodsCd="'+item.goodsCd+'" onclick="fnWishDelete(this);">관심상품 추가</button>';
-								tag += '			<a href="javascript:void(0);" onclick="cfnGoToGoodsDetail(\''+item.goodsCd+'\',\'\',\'IN22_02\')" class=" itemLink">';	
-								tag += '				<div class="itemPic">';		
-								tag += '					<img class="vLHTC pd_img" src="' + _uploadGoodsUrl + '/' + item.sysImgNm + '" alt="이미지설명"/>';		
-								tag += '				</div>';	
-								tag += '			</a>';	
+								tag += '			<button type="button" class="itemLike active" goodsCd="'+item.goodsCd+'" onclick="fnWishDelete(this);">관심상품 추가</button>\n';
+								tag += '			<a href="javascript:void(0);" onclick="cfnGoToGoodsDetail(\''+item.goodsCd+'\',\'\',\'IN22_02\')" class=" itemLink">\n';
+								tag += '			<div class="itemPic">\n';
+								tag += '			<img class="vLHTC pd_img" src="' + _uploadGoodsUrl + '/' + item.sysImgNm + '" alt="이미지설명"/>\n';
+								tag += '			</div>\n';
+								tag += '		</a>\n';
 								tag += '			<div class="hover_con">';
 								if (item.stockQtySum>0) {
 									if (item.goodsType == 'G056_N') {
@@ -1251,12 +1250,11 @@
 									}else{
 										tag += '			<button type="button" class="btn btn_sm cart_btn on" afLinkCd="'+item.afLinkCd+'" compsGoodsCd=\''+item.compsGoodsCd+'\' goodsCd="'+item.goodsCd+'" optCd="'+item.optCd+'" minOrdQty="'+item.minOrdQty+'" goodsType="'+item.goodsType+'" contentsLoc="'+item.contentLoc+'" onclick="wishCardSetAdd(this)"><span>쇼핑백 담기</span></button>';
 									}
-									
+
 								}
-								tag += '			</div>';	    
-								tag += '		</div>';	    
-								tag += '	</div>	';		
-								
+								tag += '		</div>\n';
+								tag += '	</div>\n';
+								tag += '</div>\n';
 							});
 							tag += '	</div>\n';
 							

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

@@ -23,7 +23,7 @@
 		<div class="breadcrumb">
 			<ul>
 				<li class="bread_home"><a href="javascript:void(0);" id="navHome">홈</a></li>
-				<li class="bread_home" id="brandLi" th:if="${lbInfo.lookbookGb=='BL'}" th:text="${brandGroupInfo.brandGroupNm}"></li>
+				<li class="bread_home" id="brandLi" th:if="${lbInfo.lookbookGb=='BL'}"><a href="javascript:void(0);" th:onclick="cfnGoToBrandMain([[${brandGroupInfo.brandGroupNo}]]);" th:text="${brandGroupInfo.brandGroupNm}"></a></li>
 				<li class="bread_2depth">룩북</li>
 			</ul>
 		</div>

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

@@ -249,6 +249,7 @@
 							</div>
 							<div class="lnb_category">
 								<ul class="category" id="ulAllCate">
+									<li><a href="javascript:void(0);" id="cateAll" onclick="fnSetSearchCate(this, 'off');" class="on">전체</a></li>
 								</ul>
 							</div>
 						</div>

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

@@ -251,6 +251,7 @@
 							</div>
 							<div class="lnb_category">
 								<ul class="category" id="ulAllCate">
+									<li><a href="javascript:void(0);" id="cateAll" onclick="fnSetSearchCate(this, 'off');" class="on">전체</a></li>
 								</ul>
 							</div>
 						</div>

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

@@ -487,7 +487,7 @@
 					if(idx<5) {
 						tag += '<div class="item_prod">\n';
 						tag += '	<div class="item_state">\n';
-						tag += '		<a href="javascript:void(0);" class="itemLink">\n';
+						tag += '		<a href="javascript:void(0);" class="itemLink" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\',\'' + item.colorCd + '\');">\n';
 						tag += '			<div class="itemPic">\n';
 						tag += '				<img alt="" class="vLHTC pd_img" src="' + item.sysImgNm + '">\n';
 						tag += '			</div>\n';

+ 117 - 88
src/main/webapp/biz/search.js

@@ -554,26 +554,28 @@ var fnSetSearchCate = function (obj, status, cate1No, cate2No, cate3No, cate4No,
 		}
 		let tag = '';
 		let cateNm = '';
-		tag += '<span id="categorySpan">\n';
-		if(!gagajf.isNull(cate1No)){
-			cateFullNm = $(obj).attr("cateFullNm");
-			cateNm  = cateFullNm;
-		}
-		if(!gagajf.isNull(cate2No)){
-			cateFullNm = $(obj).attr("cateFullNm");
-			cateNm  = cateFullNm;
-		}
-		if(!gagajf.isNull(cate3No)){
-			cateFullNm = $(obj).attr("cateFullNm");
-			cateNm  = cateFullNm;
-		}
-		if(!gagajf.isNull(cate4No)){
-			cateFullNm = $(obj).attr("cateFullNm");
-			cateNm  = cateFullNm;
+		if(!gagajf.isNull(cate1No) || !gagajf.isNull(cate2No) || !gagajf.isNull(cate3No) || !gagajf.isNull(cate4No)){
+			tag += '<span id="categorySpan">\n';
+			if(!gagajf.isNull(cate1No)){
+				cateFullNm = $(obj).attr("cateFullNm");
+				cateNm  = cateFullNm;
+			}
+			if(!gagajf.isNull(cate2No)){
+				cateFullNm = $(obj).attr("cateFullNm");
+				cateNm  = cateFullNm;
+			}
+			if(!gagajf.isNull(cate3No)){
+				cateFullNm = $(obj).attr("cateFullNm");
+				cateNm  = cateFullNm;
+			}
+			if(!gagajf.isNull(cate4No)){
+				cateFullNm = $(obj).attr("cateFullNm");
+				cateNm  = cateFullNm;
+			}
+			tag += cateNm;
+			tag += '<a href="javascript:void(0);" class="filter_delete" onclick="fnDeleteCategoryFilter(this);"></a>\n';
+			tag += '</span>\n';
 		}
-		tag += cateNm;
-		tag += '<a href="javascript:void(0);" class="filter_delete" onclick="fnDeleteCategoryFilter(this);"></a>\n';
-		tag += '</span>\n';
 
 		$("#filterData").append(tag);
 		filterStatHtml += tag;
@@ -611,22 +613,24 @@ var fnSetCateFilter = function (cate1No, cate2No, cate3No, cate4No, cate5No){
 	$("#searchGoodsForm input:hidden[name=cate4No]").remove();
 	$("#searchGoodsForm input:hidden[name=cate5No]").remove();
 	let tag = '';
-
-	if(!gagajf.isNull(cate1No)){
-		tag += '<input type="hidden" name="cate1No" value="'+cate1No+'"/>';
-	}
-	if(!gagajf.isNull(cate2No)){
-		tag += '<input type="hidden" name="cate2No" value="'+cate2No+'"/>';
-	}
-	if(!gagajf.isNull(cate3No)){
-		tag += '<input type="hidden" name="cate3No" value="'+cate3No+'"/>';
-	}
-	if(!gagajf.isNull(cate4No)){
-		tag += '<input type="hidden" name="cate4No" value="'+cate4No+'"/>';
-	}
-	if(!gagajf.isNull(cate5No)){
-		tag += '<input type="hidden" name="cate5No" value="'+cate5No+'"/>';
+	if(!gagajf.isNull(cate1No) || !gagajf.isNull(cate2No) || !gagajf.isNull(cate3No) || !gagajf.isNull(cate4No)){
+		if(!gagajf.isNull(cate1No)){
+			tag += '<input type="hidden" name="cate1No" value="'+cate1No+'"/>';
+		}
+		if(!gagajf.isNull(cate2No)){
+			tag += '<input type="hidden" name="cate2No" value="'+cate2No+'"/>';
+		}
+		if(!gagajf.isNull(cate3No)){
+			tag += '<input type="hidden" name="cate3No" value="'+cate3No+'"/>';
+		}
+		if(!gagajf.isNull(cate4No)){
+			tag += '<input type="hidden" name="cate4No" value="'+cate4No+'"/>';
+		}
+		if(!gagajf.isNull(cate5No)){
+			tag += '<input type="hidden" name="cate5No" value="'+cate5No+'"/>';
+		}
 	}
+
 	$("#searchGoodsForm").append(tag);
 
 	fnSetFilterHtml();
@@ -799,72 +803,97 @@ var fnSelectFilerMob = function (obj, gubun, staus, sizeGb){
 	fnFilterSet(gubun, sizeGb, 'Mob');
 }
 
-var fnSetMobCateFilter = function (obj, cate1No, cate2No, cate3No, cate4No, cate5No){
+var fnSetMobCateFilter = function (obj, gubun, cate1No, cate2No, cate3No, cate4No, cate5No){
 	// 활성화 되었을때
 	if($(obj).hasClass("on")) {
-		if($(obj).attr('data-depth')==1){
+		if(gubun == 'ALL'){
 			$('#categoryFilterDiv').find('.daps1').find('span').html('');
 			fnSetCateFilter();
-		}else if($(obj).attr('data-depth')==2){
-			$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).parent().parent().parent().find('[data-depth=1]').attr('cateFullNm'));
-			fnSetCateFilter(cate1No);
-		}else if($(obj).attr('data-depth')==3){
-			$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).parent().parent().parent().find('[data-depth=2]').attr('cateFullNm'));
-			fnSetCateFilter(cate1No, cate2No);
-		}else if($(obj).attr('data-depth')==4){
-			$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).parent().parent().parent().find('[data-depth=3]').attr('cateFullNm'));
-			fnSetCateFilter(cate1No, cate2No, cate3No);
 		}else{
-			$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).parent().parent().parent().find('[data-depth=4]').attr('cateFullNm'));
-			fnSetCateFilter(cate1No, cate2No, cate3No, cate4No);
+			if($(obj).attr('data-depth')==1){
+				$('#categoryFilterDiv').find('.daps1').find('span').html('');
+				fnSetCateFilter();
+			}else if($(obj).attr('data-depth')==2){
+				$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).parent().parent().parent().find('[data-depth=1]').attr('cateFullNm'));
+				fnSetCateFilter(cate1No);
+			}else if($(obj).attr('data-depth')==3){
+				$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).parent().parent().parent().find('[data-depth=2]').attr('cateFullNm'));
+				fnSetCateFilter(cate1No, cate2No);
+			}else if($(obj).attr('data-depth')==4){
+				$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).parent().parent().parent().find('[data-depth=3]').attr('cateFullNm'));
+				fnSetCateFilter(cate1No, cate2No, cate3No);
+			}else{
+				$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).parent().parent().parent().find('[data-depth=4]').attr('cateFullNm'));
+				fnSetCateFilter(cate1No, cate2No, cate3No, cate4No);
+			}
 		}
-
 	}else{
-		if($(obj).attr('data-depth')==1){
-			$("#categoryFilterDiv").find('[data-depth=1]').each(function (){
-				$("#categoryFilterDiv").find('.daps4').each(function (idx){
-					$(this).parent().find('a').removeClass('on');
-					$(this).css('display','none');
-				});
-				$("#categoryFilterDiv").find('.daps3').each(function (idx){
-					$(this).parent().find('a').removeClass('on');
-					$(this).css('display','none');
-				});
-				$("#categoryFilterDiv").find('.daps2').each(function (idx){
-					$(this).parent().find('a').removeClass('on');
-				});
-				$(this).removeClass("on");
-				$(this).parent().find('ul').css('display','none');
+		if(gubun == 'ALL'){
+			$("#categoryFilterDiv").find('.daps4').each(function (idx){
+				$(this).parent().find('a').removeClass('on');
+				$(this).css('display','none');
 			});
-			$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).attr('cateFullNm'));
-			fnSetCateFilter(cate1No);
-		}else if($(obj).attr('data-depth')==2) {
-			$("#categoryFilterDiv").find('[data-depth=2]').each(function (){
-				$("#categoryFilterDiv").find('.daps4').each(function (idx){
-					$(this).parent().find('a').removeClass('on');
-					$(this).css('display','none');
-				});
-				$(this).removeClass("on");
-				$(this).parent().find('ul').css('display','none');
+			$("#categoryFilterDiv").find('.daps3').each(function (idx){
+				$(this).parent().find('a').removeClass('on');
+				$(this).css('display','none');
 			});
-			$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).attr('cateFullNm'));
-			fnSetCateFilter(cate1No, cate2No);
-		}else if($(obj).attr('data-depth')==3) {
-			$("#categoryFilterDiv").find('[data-depth=3]').each(function (){
-				$(this).removeClass("on");
-				$(this).parent().find('ul').css('display','none');
+			$("#categoryFilterDiv").find('.daps2').each(function (idx){
+				$(this).parent().find('a').removeClass('on');
 			});
-			$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).attr('cateFullNm'));
-			fnSetCateFilter(cate1No, cate2No, cate3No);
-		}else if($(obj).attr('data-depth')==4) {
-			$("#categoryFilterDiv").find('[data-depth=4]').each(function (){
-				$(this).removeClass("on");
-				$(this).parent().find('ul').css('display','none');
+			$("#categoryFilterDiv").find('.daps1').each(function (idx){
+				$(this).parent().find('a').removeClass('on');
 			});
-			$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).attr('cateFullNm'));
-			fnSetCateFilter(cate1No, cate2No, cate3No, cate4No);
+			$(this).removeClass("on");
+			$(this).parent().find('ul').css('display','none');
+			$('#categoryFilterDiv').find('.daps1').find('span').html('');
+			fnSetCateFilter();
 		}else{
-			fnSetCateFilter(cate1No, cate2No, cate3No, cate4No, cate5No);
+			if($(obj).attr('data-depth')==1){
+				$("#categoryFilterDiv").find('[data-depth=1]').each(function (){
+					$("#categoryFilterDiv").find('.daps4').each(function (idx){
+						$(this).parent().find('a').removeClass('on');
+						$(this).css('display','none');
+					});
+					$("#categoryFilterDiv").find('.daps3').each(function (idx){
+						$(this).parent().find('a').removeClass('on');
+						$(this).css('display','none');
+					});
+					$("#categoryFilterDiv").find('.daps2').each(function (idx){
+						$(this).parent().find('a').removeClass('on');
+					});
+					$(this).removeClass("on");
+					$(this).parent().find('ul').css('display','none');
+				});
+				$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).attr('cateFullNm'));
+				fnSetCateFilter(cate1No);
+			}else if($(obj).attr('data-depth')==2) {
+				$("#categoryFilterDiv").find('[data-depth=2]').each(function (){
+					$("#categoryFilterDiv").find('.daps4').each(function (idx){
+						$(this).parent().find('a').removeClass('on');
+						$(this).css('display','none');
+					});
+					$(this).removeClass("on");
+					$(this).parent().find('ul').css('display','none');
+				});
+				$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).attr('cateFullNm'));
+				fnSetCateFilter(cate1No, cate2No);
+			}else if($(obj).attr('data-depth')==3) {
+				$("#categoryFilterDiv").find('[data-depth=3]').each(function (){
+					$(this).removeClass("on");
+					$(this).parent().find('ul').css('display','none');
+				});
+				$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).attr('cateFullNm'));
+				fnSetCateFilter(cate1No, cate2No, cate3No);
+			}else if($(obj).attr('data-depth')==4) {
+				$("#categoryFilterDiv").find('[data-depth=4]').each(function (){
+					$(this).removeClass("on");
+					$(this).parent().find('ul').css('display','none');
+				});
+				$('#categoryFilterDiv').find('.daps1').find('span').html($(obj).attr('cateFullNm'));
+				fnSetCateFilter(cate1No, cate2No, cate3No, cate4No);
+			}else{
+				fnSetCateFilter(cate1No, cate2No, cate3No, cate4No, cate5No);
+			}
 		}
 	}
 }