|
|
@@ -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);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|