/** * * @file : supportList.js * @Description : Get support list by AJAX call * * 수정일 수정자 수정내용 * ---------- ----------- -------------------------------- * 2017.01.02 이경주 최초작성 * 2017.12.15 김경수 M-00104 NBrand Type 추가 * 2022.12.13 이진선 #59252 Vehicle > Select your country 국가명 주소 생성 로직 수정 * 2022.12.21 이진선 #59252 path 생성 로직 오류 수정 */ var themeClass = ""; function fn_get_support_list($target, modelYear){ if(modelYear == "undefined" || modelYear == null || modelYear == "" || modelYear == '-'){ modelYear = "GF-2011" //set default value just in case } var rootPathCountry = ($('#siteRootPathCounty').val()); if($target && modelYear){ $.ajax({ url : '/wsvc/ww/findacar.support.do', type : 'post', data : "modelYear=" + modelYear, dataType : 'json', success : function(resData){ //console.log(resData); var html = ""; if(resData.data){ var items = resData.data; var onClass = "", strStyle=""; for(var i=0; i < items.length; i++){ var item = items[i]; if (i < 1) { //onClass = ' on'; strStyle = "display:block;"; }else { onClass = strStyle = ""; } html += '
\n' + ' \n' + '
\n' + '
\n'; var countries = item.countries; for(var j=0; j < countries.length; j++){ var country = countries[j]; var path = rootPathCountry; if(path.includes(".html")){ // 어써인 경우 path = path.replace(".html", country.code.toLowerCase()+".html"); }else{ path = path + country.code.toLowerCase(); } var flagImg = ' ' + '' + country.code + '\n'; html += ' \n'; }//for(j) html += '
\n' + '
\n' + '
\n'; }// for(i) $target.html(html); } //if(retData.data) }//success function(){} });//ajax }//if($target) }//function