1/* 2 KT.com version 1.0 3 4 Copyright â 2017 kt corp. All rights reserved. 5 6 This is a proprietary software of kt corp, and you may not use this file except in 7 compliance with license agreement with kt corp. Any redistribution or use of this 8 software, with or without modification shall be strictly prohibited without prior written 9 approval of kt corp, and the copyright notice above does not evidence any actual or 10 intended publication of such software. 11*/ 12 13$j = jQuery.noConflict(), $=$j; 14 15 /* 16 // íë¡í ìì 17 <div id="cfmClFloatingCont" class="inner"> //ëí´í¸: ë«í, í¼ì¹¨ìíì¼ê²½ì°(shortstt class ì ê±°) 18 */ 19var cfmfloatingHtml = ` 20 <div class="floating-menu" data-nosnippet> 21 <div id="cfmClFloatingCont" class="inner shortstt"> 22 <div class="floating-menu-tit-area"> 23 <button type="button" class="floating-menu-btn floating-menu-btn-toggle"><span class="hidetxt">íµë©ë´ í¼ì¹ê¸°</span></button> 24 </div> 25 <div class="floating-menu-list-area floating-recommend-list"> 26 </div> 27 <div class="floating-menu-list-area floating-popular-list"> 28 </div>
29 </div> 30 </div>`; 31 32// DATA - ë°°í¬íì¼(cashing) 33var cfmFloatingNow = new Date(); 34var cfmFloatingVersion = '?version=' + cfmFloatingNow.getFullYear() +''+ (cfmFloatingNow.getMonth()+1) +''+ cfmFloatingNow.getDate() +''+ cfmFloatingNow.getHours(); 35 36if(kt.isLogin() == 'Y'){ 37 document.write('<script src="' + cfm_domain + '/js/json/'+ kt_common.pageType() +'_gnb_direct_after.js' + cfmFloatingVersion + '" charset="UTF-8"></script>'); //ë¡ê·¸ì¸í 38}else{ 39 document.write('<script src="' + cfm_domain + '/js/json/'+ kt_common.pageType() +'_gnb_direct_before.js' + cfmFloatingVersion + '" charset="UTF-8"></script>'); //ë¡ê·¸ì¸ì 40 document.write('<script src="' + cfm_domain + '/js/json/cl_gnb_recommend_new.js' + cfmFloatingVersion + '" charset="UTF-8"></script>'); //ê°í¸ìë¹ì¤ 41} 42 43var cfmFloatingAreaTarget = '#cfm'+ ktChannel +'Header '; 44var cfmFloatingAreaHtml = { 45 //ë ¸ì¶ì¬ë¶ 46 cfmFloatingAreaShowYN : true, 47 48 //ì´ê¸°í & ì¸í 49 init: function(){ 50 //기í Areadata 51 cfmGnbEtc_codeList = cfmCodeJsonData.codeDetailList; 52 53 //floating ë ¸ì¶ì¬ë¶ 54 if (cfmGnbEtc_codeList.length) { 55 var cfmFloatingNoList = $j.grep(cfmGnbEtc_codeList, function(element, index) { 56 return element.dtlCd == 'floatingNoMenu' && element.dtlCdDesc !== '' && element.dtlCdOpt3 == 'Y' 57 }); 58 if (cfmFloatingNoList.length > 0) { 59 if (cfmFloatingNoList[0].dtlCdDesc.includes(`,${ktMenuCode},`)) { 60 this.cfmFloatingAreaShowYN = false; 61 } 62 } 63 } 64 if (this.cfmFloatingAreaShowYN) { 65 //Html import 66 document.writeln(cfmfloatingHtml); 67 68 //ê°í¸ìë¹ì¤ 69 cfmFloatingAreaHtml.recommendMenu(); 70 71 //ì¸ê¸°ìë¹ì¤ 72 cfmFloatingAreaHtml.popularMenu(); 73 74 //ui ì²ë¦¬ kt_ui.js í¸ì¶ 75 cfmUi.COMMON.floating(); 76 } 77 }, 78 79 //ê°í¸ìë¹ì¤ 80 recommendMenu: function(){ 81 // ë¡ê·¸ì¸ì¬ë¶ 82 if(kt.isLogin() == 'Y'){ 83 kt_api.targetMenu(); //ìµê·¼ë³¸ ë©ë´ 84 }else{ 85 var isShow = false; 86 var html = $j(cfmFloatingAreaTarget + '.floating-recommend-list'); 87 html.append(` 88 <strong class="floating-menu-tit"></strong> 89 <button type="button" id="cfmFloatingInfoBtn" class="floating-menu-btn floating-menu-btn-simplesvc" style="display:none;"><span class="hidetxt">ìë´ íì´ì§ë¡ ì´ë</span></button> 90 <ul><li class="floating-menu-notext">ë©ë´ê° ììµëë¤.</li></ul>`); 91 try { 92 // title 93 var recomAreaData = cfmGnbRecommendJson[0]; 94 html.find('strong').text(recomAreaData.areaNm); 95 html.find('.hidetxt').text(`${recomAreaData.areaNm} ìë´ íì´ì§ë¡ ì´ë`); 96 97 //list 98 if (recomAreaData.cfmGnbRecommendlist.length > 0) { 99 var maxCnt = 1; 100 html.find('ul').html(''); 101 $j.each(recomAreaData.cfmGnbRecommendlist, function(i, item){ 102 if(item.title == 'ìê°' && item.urlInfo !== '') { 103 html.find('.floating-menu-btn').show(); 104 105 //ë©ë´ë§í¬ 106 kt_common.linkInfo('common', 'click', html.find('.floating-menu-btn'), item, item.floatTrgtType, item.floatPopupWdth, item.floatPopupVrtc); 107 } else { 108 var li = $j(`<li><a href="#"><span>${item.title}</span></a></li>`); 109 110 //ìì´ì½ 111 if(kt_common.isNull(item.imgPath) != ''){ 112 li.find('a').attr('style', 'background-image:url(\''+ cfm_domain + item.imgPath +'\');'); 113 } 114 115 //ë©ë´ë§í¬ 116 kt_common.linkInfo('common', 'recommend', li.find('a'), item, item.floatTrgtType, item.floatPopupWdth, item.floatPopupVrtc); 117 118 html.find('ul').append(li); 119 120 isShow = true; 121 122 //ê°í¸ìë¹ì¤ ìµë4ê° íì© 123 maxCnt++; 124 if (maxCnt > 4) {return false;} 125 } 126 }); 127 } 128 } catch (e) { 129 common_log.log('kt_floating.js recommendMenu() [' + e.message + ']'); 130 } 131 } 132 }, 133 134 //ìµê·¼ë³¸ë©ë´(ë¡ê·¸ì¸í) callback 135 callBackTargetMenu: function(type, result){ 136 var html = $j(cfmFloatingAreaTarget + '.floating-recommend-l
136ist'); 137 html.append(` 138 <strong class="floating-menu-tit">ìµê·¼ 본 ë©ë´</strong> 139 <ul><li class="floating-menu-notext">ìµê·¼ 본 ë©ë´ê° ììµëë¤.</li></ul>`); 140 141 try { 142 if(type === 'success'){ 143 if(kt_common.isNull(result.data) != ''){ 144 html.find('ul').html(''); 145 146 var maxCnt = 1; 147 var resultList = result.data.targetGnbMenus; 148 $j.each(resultList, function(i, item){ 149 if(i < 4){ //ìµë4ê±´ 150 var li = $j('<li><a href="#"><span>'+ item.gnbMenuNm +'</span></a></li>'); 151 152 //ìì´ì½ 153 var current = cfmGnbMenuJson.filter(function(element){ 154 return element.menuCd == item.menuCd; 155 }); 156 if(current.length > 0){ 157 var path = current[0].path.split(' > '); 158 var img = cfmGnbMenuJson.filter(function(element){ 159 return element.menuCd == path[0]; //1Depth 160 }); 161 162 if(img.length > 0){ 163 if(kt_common.isNull(img[0].imgUrl) != ''){ 164 li.find('a').attr('style', 'background-image:url(\''+ img[0].imgUrl +'\');'); 165 } 166 } 167 } 168 169 //ë©ë´ë§í¬ 170 kt_common.linkInfo('common', 'targetMenu', li.find('a'), item, item.newWndwType, '500', '500'); 171 172 html.find('ul').append(li); 173 174 //ìµê·¼ë³¸ë©ë´ ìµë4ê° íì© 175 maxCnt++; 176 if (maxCnt > 4) {return false;} 177 } 178 }); 179 } 180 } 181 } catch (e) { 182 common_log.log('kt_floating.js callBackTargetMenu() [' + e.message + ']'); 183 } 184 185 }, 186 187 //ì¸ê¸°ìë¹ì¤ 188 popularMenu: function(){ 189 var isShow = false; 190 var html = $j(cfmFloatingAreaTarget + '.floating-popular-list'); 191 html.append('<strong class="floating-menu-tit">ì¸ê¸°ë©ë´</strong>'+ 192 '<ul></ul>'); 193 194 try { 195 var maxCnt = 1; 196 $j.each(cfmGnbDirectJson, function(i, item){ 197 var li = $j('<li><a href="#"><span>'+ item.title +'</span></a></li>'); 198 199 //ìì´ì½ 200 if(kt_common.isNull(item.imgPath) != ''){ 201 li.find('a').attr('style', 'background-image:url(\''+ cfm_domain + item.imgPath +'\');'); 202 } 203 204 //ë©ë´ë§í¬ 205 kt_common.linkInfo('common', 'direct', li.find('a'), item, item.floatTrgtType, item.floatPopupWdth, item.floatPopupVrtc); 206 207 html.find('ul').append(li); 208 209 isShow = true; 210 211 //ì¸ê¸°ìë¹ì¤ ìµë4ê° íì© 212 maxCnt++; 213 if (maxCnt > 4) {return false;} 214 }); 215 } catch (e) { 216 common_log.log('kt_floating.js popularMenu() [' + e.message + ']'); 217 } 218 219 //ë ¸ì¶ 220 if(isShow){ 221 $j(cfmFloatingAreaTarget + '.floating-popular-list').append(html); 222 } 223 } 224}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.