/**
 * Created by KangHaeSeok on 2017-07-24.
 */
// 프로덕트를 클릭했을때 카테고리 예외처리 기능의 js
// 예를 들어 치마를 클릭했을때 바지, 드레스, 원피스, 점프슈트의 전역변수 값을 0으로 초기화하고 해당하는 페브릭목록들의 값을 비워준다
// variable_collection.js 의 sc.selectedFabricSetter() 부분에서 처리할수도 있지만 지저분해 보여서 따로 기능을 분리했다.
// 오직 프로덕트 오브젝트를 클릭했을때만 발생한다.

sc.productCategoryException = function (productCategory) {

    //남자
    if(productCategory == "boyVestCategory"){
        sc.overallBoyFabric = 0;
        $("#boyOverallCategoryFabric").html("");
    }else if(productCategory == "boyPantsCategory"){
        sc.overallBoyFabric = 0;
        $("#boyOverallCategoryFabric").html("");
    }else if(productCategory == "boyOverallCategory"){
        sc.pantsBoyFabric = 0;
        sc.vestBoyFabric = 0;
        $("#boyPantsCategoryFabric").html("");
        $("#boyVestCategoryFabric").html("");
    }

    //여자
    else if(productCategory == "girlShirtsCategory"){
        sc.onePieceGirlFabric = 0;
        $("#girlOnePieceCategoryFabric").html("");
    }else if(productCategory == "girlVestCategory"){
        sc.onePieceGirlFabric = 0;
        sc.overallGirlFabric = 0;
        sc.dressGirlFabric = 0;
        $("#girlOnePieceCategoryFabric").html("");
        $("#girlOverallCategoryFabric").html("");
        $("#girlDressCategoryFabric").html("");
    }else if(productCategory == "girlPantsCategory"){
        sc.skirtGirlFabric= 0;
        sc.onePieceGirlFabric = 0;
        sc.overallGirlFabric = 0;
        sc.dressGirlFabric = 0;
        $("#girlSkirtCategoryFabric").html("");
        $("#girlOnePieceCategoryFabric").html("");
        $("#girlOverallCategoryFabric").html("");
        $("#girlDressCategoryFabric").html("");
    }else if(productCategory == "girlSkirtCategory"){
        sc.pantsGirlFabric= 0;
        sc.onePieceGirlFabric = 0;
        sc.overallGirlFabric = 0;
        sc.dressGirlFabric = 0;
        $("#girlPantsCategoryFabric").html("");
        $("#girlOnePieceCategoryFabric").html("");
        $("#girlOverallCategoryFabric").html("");
        $("#girlDressCategoryFabric").html("");
    }else if(productCategory == "girlOnePieceCategory"){
        sc.shirtsGirlFabric= 0;
        sc.vestGirlFabric= 0;
        sc.pantsGirlFabric= 0;
        sc.skirtGirlFabric= 0;
        sc.overallGirlFabric = 0;
        sc.dressGirlFabric = 0;
        $("#girlShirtsCategoryFabric").html("");
        $("#girlVestCategoryFabric").html("");
        $("#girlPantsCategoryFabric").html("");
        $("#girlSkirtCategoryFabric").html("");
        $("#girlOverallCategoryFabric").html("");
        $("#girlDressCategoryFabric").html("");
    }else if(productCategory == "girlOverallCategory"){
        sc.vestGirlFabric= 0;
        sc.pantsGirlFabric= 0;
        sc.skirtGirlFabric= 0;
        sc.onePieceGirlFabric = 0;
        sc.dressGirlFabric = 0;
        $("#girlVestCategoryFabric").html("");
        $("#girlPantsCategoryFabric").html("");
        $("#girlSkirtCategoryFabric").html("");
        $("#girlOnePieceCategoryFabric").html("");
        $("#girlDressCategoryFabric").html("");
    }else if(productCategory == "girlDressCategory"){
        sc.vestGirlFabric= 0;
        sc.pantsGirlFabric= 0;
        sc.skirtGirlFabric= 0;
        sc.onePieceGirlFabric = 0;
        sc.overallGirlFabric = 0;
        $("#girlVestCategoryFabric").html("");
        $("#girlPantsCategoryFabric").html("");
        $("#girlSkirtCategoryFabric").html("");
        $("#girlOnePieceCategoryFabric").html("");
        $("#girlOverallCategoryFabric").html("");
    }

};
