1/** 2 * ë©ì¸íì´ì§ì© 3 **/ 4Mainpage = { 5 /** 6 * ìë¨ Hot Keyword ì´ë 7 **/ 8 hotKeywordCurrentIndex: 1, 9 hotKeywordBoxCount: null, 10 hotKeywordMove: function(direction){ 11 if(this.hotKeywordBoxCount == null){ 12 this.hotKeywordBoxCount = $('div.best_lst').length; 13 } 14 if(direction == 0){ 15 this.hotKeywordCurrentIndex = (this.hotKeywordCurrentIndex == 1) ? this.hotKeywordBoxCount : --this.hotKeywordCurrentIndex; 16 } 17 else{ // next 18 this.hotKeywordCurrentIndex = (this.hotKeywordCurrentIndex == this.hotKeywordBoxCount) ? 1 : ++this.hotKeywordCurrentIndex; 19 } 20 $('div.best_lst').hide(); 21 $('#hotkeyword'+ this.hotKeywordCurrentIndex).show(); 22 }, 23 gnbCategoryBoxToggle: function(){ 24 var box = $('#gnbAllCategories'); 25 box.toggle(); 26 if(box.css('display') == 'none'){ 27 $('#gnbMoreButton').removeClass('on'); 28 } 29 else{ 30 if(typeof closeFlashBanner == 'function'){ 31 closeFlashBanner('video'); 32 } 33 $('#gnbMoreButton').addClass('on'); 34 } 35 }, 36 /** 37 * 문ìëª©ë¡ í ì í íì±í 38 * @param categorySeq 39 */ 40 activeDocList: function(categorySeq){ 41 $('.doc_tab > ul > li[id^=docListLabel]').removeClass('active'); 42 $('#docListLabel' + categorySeq).addClass('active'); 43 $('div.content02[id^=docListContent]').hide(); 44 $('#docListContent' + categorySeq).show(); 45 }, 46 /** 47 * ëììê°ì¢ í ì í íì±í 48 * @param categorySeq 49 */ 50 activeElearningList: function(categorySeq){ 51 $('#id_lecture_sections > li[id^=elearningListLabel]').removeClass('active'); 52 $('#elearningListLabel' + categorySeq).addClass('active'); 53 $('div.research_data[id^=elearningListContent]').hide(); 54 $('#elearningListContent' + categorySeq).show(); 55 }, 56 /** 57 * ìì í ì í íì±í 58 * @param categorySeq 59 */ 60 activeFormList: function(categorySeq){ 61 $('#formLabels > li[id^=formListLabel]').removeClass('active'); 62 $('#formListLabel' + categorySeq).addClass('active'); 63 $('div[id^=formListContent]').hide(); 64 $('#formListContent' + categorySeq).show(); 65 }, 66 categories: [], // ìë 롤ë§ì ê´ë¦¬ë ì¹´í ê³ ë¦¬ ëª©ë¡ 67 pauseCategories: [], // ì¼ì ì ì§ ì¹´í ê³ ë¦¬ ëª©ë¡ 68 categoryIndex: [], // íì¬ ë³´ì¬ì§ë ì¹´í ê³ ë¦¬ ë²í¸ 69 categorySubIndex: 0, // ì¹´í ê³ ë¦¬ íì íì´ì§ ë²í¸ 70 /** 71 * ìë í ë¡¤ë§ ìì 72 * @param type 73 * @param initCategories 74 */ 75 startRollingList: function(type, initCategories){ 76 this.categories[type] = initCategories; 77 this.categoryIndex[type] = 0; 78 this.pauseCategories[type] = false; 79 setInterval("Mainpage.nextList('" + type + "', true)", 5000); 80 }, 81 /** 82 * ìë í ë¡¤ë§ ì¼ìì ì§ 83 * @param type 84 */ 85 pauseRollingList:function(type){ 86 this.pauseCategories[type] = true; 87 var targetBoxId = (type == 'elearning') ? 'mainElearningBox' : 'mainFormBox'; 88 $('#'+targetBoxId).mouseleave(function(){ Mainpage.resumeRollingList(type); }); 89 }, 90 /** 91 * ì´ìì ì§ ëìë í ë¡¤ë§ ì¬ê° 92 * @param type 93 */ 94 resumeRollingList:function(type){ 95 this.pauseCategories[type] = false; 96 }, 97 /** 98 * ë¤ì í 목ë¡ì¼ë¡ ì´ë 99 * @param type 100 * @param auto 101 */ 102 nextList: function(type,auto){ 103 if(auto === true && this.pauseCategories[type] == true){ // ìëë³ê²½ì¸ë° ì¼ìì ì§ ì¸í ì¤ì´ë©´ ì¤ë¨ 104 return; 105 } 106 ++this.categoryIndex[type]; 107 if(this.categoryIndex[type] == this.categories[type].length){ 108 this.categoryIndex[type] = 0; 109 } 110 if(type == 'elearning'){ 111 this.activeElearningList(this.categories[type][this.categoryIndex[type]]); 112 } 113 else if(type == 'form'){ 114 this.activeFormList(this.categories[type][this.categoryIndex[type]]); 115 } 116 }, 117 /** 118 * í ë´ë¶ ì´ì íì íì´ì§ë¡ ì´ë 119 * @param categorySeq 120 */ 121 prevSubList: function(categorySeq){ 122 var maxLength = $('ul[id^=docListContentSub' + categorySeq + ']').length; 123 if(this.categorySubIndex <= 0){ 124 this.categorySubIndex = (maxLength-1); 125 } 126 else{ 127 --this.categorySubIndex; 128 } 129 $('ul[id^=docListContentSub' + categorySeq + ']').hide(); 130 $('#docListContentSub' + categorySeq + '_' + this.categorySubIndex).show(); 131 }, 132 /** 133 * í ë´ë¶ ë¤ì íì íì´ì§ë¡ ì´ë 134 * @param categorySeq 135 */ 136 nextSubList: function(categorySeq){ 137 var maxLength = $('ul[id^=docListContentSub' + categorySeq + ']').length; 138 ++this.categorySubIndex; 139 if(this.categorySubIndex >= maxLength){ 140 this.categorySubIndex = 0; 141 } 142 $('ul[id^=docListContentSub' + categorySeq + ']').hide(); 143 $('#docListContentSub' + categorySeq + '_' + this.categorySubIndex).show(); 144 }, 145 /** 146 * í매ì ì´ë©ì¼ ì¸ì¦ ìë£ ë©ì¸ì§ 147 */ 148 popEmailVerifySuccess: function() { 149 Common.showHelp('', 'emailVerifySuccessMsg', '/help/?p=emailVerifySuccessMsg', 391, 166, null, 'center', 'bottom'); 150 }, 151 /** 152 * í매ì 미ì¸ì¦ ë기ìë£ ìë´ ë©ì¸ì§ 153 */ 154 popEmailVerifyMember: function() { 155 Common.showHelp('', 'emailVerifyMsg', '/help/?p=emailVerifyMsg', 391, 166, null, 'center', 'bottom'); 156 }, 157 /** 158 * í´í¼ìëí° ìëë³í ìë´ ë©ì¸ì§ 159 */ 160 openAutoNoteNoti: function(){ 161 Common.showHelp('', 'autoNoteNotiPop', '/help/?p=autoNoteNotiPop', 352, 299, null, 'center', 'bottom'); 162 }, 163 /** 164 * íì´ì¤ë¶ íë³´ ìë´ íì 165 */ 166 openPromotionFacebookPopup: function(){ 167 Common.showHelp('', 'promotionFacebookPop', '/help/?p=promotionFacebookPop', 900, 700, null, 'center', 'bottom'); 168 }, 169 /** 170 * í매ì ì¸ì¦ íì ìë´ ë«ê¸° 171 */ 172 closeAuthForm: function(){ 173 $('#id_user_mail_auth').hide(); 174 }, 175 /** 176 * 2016 í매ì ì´ë²¤í¸ íì ë©ì¸ì§ 177 */ 178 openAdieu2016: function() { 179 Common.showHelp('', 'adieu2016', '/help/?p=adieu2016', 593, 461, null, 'center', 'bottom'); 180 }, 181 /** 182 * 2016 í매ì ì´ë²¤í¸ íì ë«ê¸° 183 */ 184 closeAdieu2016: function(){ 185 $('#adieu2016').hide(); 186 }, 187 /** 188 * 2016 í매ì ì´ë²¤í¸ í루ëì ì´ì§ ì기 189 */ 190 closeTodayAdieu2016: function(){ 191 Common.setCookie('adieu2016', 'y' , 1, '/'); // 1 = í루 ëì ì´ ë¬¸ì ì´ì§ ìì. 192 $('#adieu2016').hide(); 193 }, 194 /** 195 * 2016 í매ì ì´ë²¤í¸ íì ë©ì¸ì§(모ë°ì¼) 196 */ 197 openAdieu2016m: function() { 198 Common.showHelp('', 'adieu2016', '/help/?p=adieu2016m', 290, 260, null, 'center', 'bottom'); 199 }, 200 /** 201 * 2016 í매ì ì´ë²¤í¸ í루ëì ì´ì§ ì기(모ë°ì¼) 202 */ 203 closeTodayAdieu2016m: function(){ 204 Common.setCookie('adieu2016m', 'y' , 1, '/'); // 1 = í루 ëì ì´ ë¬¸ì ì´ì§ ìì. 205 $('#adieu2016Pop').hide(); 206 }, 207 208 currentCatetoryType: 'themeSquare', // íì¬ ì íë ì¹´í ê³ ë¦¬ ì í 209 /** 210 * ë¡ê·¸ì¸ í ìëë³í ìë´ íì ë«ì 211 */ 212 closeAutoHcDocNotiPopup : function() { 213 if($('#doNotOpen').prop('checked')) { 214 Common.setCookie('autoHcDocPopupFlag', 'close' , 365, '/'); 215 } 216 $('#autoNoteNotiPop').hide(); 217 }, 218 /** 219 * ë¡ê·¸ì¸ í íì´ì¤ë¶ íë³´ íì ë«ì 220 */ 221 closePromotionFacebookPopup : function() { 222 $('#closeSmallPop').hide(); 223 $('#promotionFacebookPop').hide(); 224 }, 225 /** 226 * ë¡ê·¸ì¸ í íì´ì¤ë¶ íë³´ íì í루 ë«ì 227 */ 228 entireClosePromotionFacebookPopup : function(){ 229 Common.setCookie('promotionFacebookPopupFlag', 'close' , 1, '/'); 230 $('#closeSmallPop').hide(); 231 $('#promotionFacebookPop').hide(); 232 }, 233 /** 234 * ë¡ê·¸ì¸ í ì 목 ì¼ê´ë 리ì¤í¸ìì ë³´ë¥ë 리ì¤í¸ ìë´ íì ë«ì 235 */ 236 closeTempTitleNotiPopup : function() { 237 if($('#doNotOpenTempTitleList').prop('checked')) { 238 //Common.setCookie('tempDocTitlePopupFlag', 'close' , 365, '/'); 239 $.ajax({ 240 type: 'post', 241 url: '/site/checkDeniedTempTitle/', 242 data: {}, 243 async: false, 244 dataType: 'json', 245 success: function (json) { 246 if(json.code <= 0){ 247 alert(json.msg); 248 return false;
249 } 250 }, 251 error: function () { 252 alert('XHR í¸ì¶ ì¤ë¥'); 253 } 254 }); 255 } 256 $('#tempTitleNotiPop').hide(); 257 }, 258 /** 259 * íë¨ ì¹´í ê³ ë¦¬ ì íì ë³ê²½íë¤. 260 * @param type 261 */ 262 changeBottomCategory: function(type){ 263 if(type == 'themeSquare'){ 264 $('#site_map_tab1').removeClass('off'); 265 $('#site_map_tab1').addClass('selected'); 266 267 $('#site_map_tab2').removeClass('selected'); 268 $('#site_map_tab2').addClass('off'); 269 270 $('#site_map_theme_list').show(); 271 $('#site_map_kndata_list').hide(); 272 } 273 else{ // kndata 274 $('#site_map_tab1').removeClass('selected'); 275 $('#site_map_tab1').addClass('off'); 276 277 $('#site_map_tab2').removeClass('off'); 278 $('#site_map_tab2').addClass('selected'); 279 280 $('#site_map_theme_list').hide(); 281 $('#site_map_kndata_list').show(); 282 } 283 this.currentCatetoryType = type; 284 }, 285 /** 286 * íì¬ ì íë ì¹´í ê³ ë¦¬ ë©ë´ë¡ ì´ë 287 */ 288 goCurrentCategory: function(){ 289 Common.goUrl('/' + this.currentCatetoryType + '/?viewAll=on', null); 290 }, 291 /** 292 * íë¨ ì¹´í ê³ ë¦¬ ë ¸ì¶ ìí를 ë³ê²½íë¤. 293 */ 294 toggleBottomCategory: function(){ 295 $('#sitemapBox').toggle(); 296 if($('#sitemapBox').css('display') == 'none'){ 297 $('#site_map_button_icon').attr('src', '/images/common/bullet/2009_bul_arrow08.gif'); 298 } 299 else{ 300 $('#site_map_button_icon').attr('src', '/images/common/bullet/2009_bul_arrow07.gif'); 301 } 302 }, 303 304 /** 305 * ë¡ê·¸ì¸ í¼ê²ì¦ 306 * @returns {boolean} 307 */ 308 'loginFormValidation':function(){ 309 if( Common.trim($("input#memberId").val()) == '' ){ 310 alert("ìì´ë를 ì ë ¥íì¸ì"); 311 $("input#memberId").focus(); 312 return false; 313 } 314 if( Common.trim($("input#passwd").val()) == '' ){ 315 alert("ë¹ë°ë²í¸ë¥¼ ì ë ¥íì¸ì"); 316 $("input#passwd").focus(); 317 return false; 318 } 319 return true; 320 }, 321 322 /** 323 * ë©ì¸ ë¡ê·¸ì¸ ì ë ¥í¼ í¬ì»¤ì¤ ì´ëì BG ì¡°ì 324 */ 325 loginFormFocus:function (obj, type) { 326 if (type == 'focus') { 327 if (obj.id == 'memberId') { 328 $('#labelMemberId').text(''); 329 } 330 else if (obj.id == 'passwd') { 331 $('#labelPasswd').text(''); 332 } 333 } 334 else { 335 if (obj.id == 'memberId') { 336 if ($(obj).val() == '') { 337 $('#labelMemberId').text('ìì´ë'); 338 } 339 } 340 else if (obj.id == 'passwd') { 341 if ($(obj).val() == '') { 342 $('#labelPasswd').text('ë¹ë°ë²í¸'); 343 } 344 } 345 if ($('#passwd').val()) $('#labelPasswd').text(''); 346 } 347 Common.clearSearchBoxAutoFocus(); 348 }, 349 /** 350 * ë°©ì¡íµì ë í매ì íì ë ¸ì¶ 351 */ 352 popNewCategoryNotice: function() { 353 Common.showHelp('', 'newCategoryNotice', '/help/?p=newCategoryNotice', 540, 750, null, 'center', 'bottom'); 354 }, 355 /** 356 * ë°©ì¡íµì ë í매ì íì ë ¸ì¶ ë«ê¸° 357 */ 358 closeNewCategoryNotice : function() { 359 if($('#checkNewCategoryNotice').is(":checked") == true) { 360 Common.setCookie("cookieNewCategoryNoticePop", "done" , 7); //1=í루 ëì ì´ ë¬¸ì ì´ì§ ìì. 361 } 362 $('#newCategoryNotice').hide(); 363 }, 364 /** 365 * ë©ì¸íì´ì§ ë¡ê·¸ì¸ ë°©ì í ê¸ 366 */ 367 toggleLoginType : function(type) { 368 if (type == 'happycampus') { 369 $('#tabHappycampus').attr('class', 'on'); 370 $('#tabNaver').attr('class', 'off'); 371 $('#loginHappycampus').show(); 372 $('#loginNaver').hide(); 373 } else { 374 $('#tabNaver').attr('class', 'on'); 375 $('#tabHappycampus').attr('class', 'off'); 376 $('#loginNaver').show(); 377 $('#loginHappycampus').hide(); 378 } 379 }, 380 /** 381 * ë¡ê·¸ì¸ í¬ì»¤ì¤ ë ì´ë¸ ì¨ê¹ 382 */ 383 'loginInputLabelView':function(){ 384 if( $("#memberId").val() != "" ){ 385 $("#label_id").hide(); 386 } else { 387 $("#label_id").show(); 388 } 389 if( $("#passwd").val() != "" ){ 390 $("#label_pw").hide(); 391 } else { 392 $("#label_pw").show(); 393 } 394 }, 395 396 /** 397 * ì 체보기 문ìê´ì¥ ë¸ë°ì¹ ì¤ë²ì íì ì¹´í ê³ ë¦¬ ë ¸ì¶ 398 * @param code 399 */ 400 'docSubCateChange':function(code){ 401 $('#docCateBranchSet ul li a').removeClass('on'); 402 $('#docCateBranchSet ul li a.'+code).addClass('on'); 403 $('#docCateSubSet ul').hide(); 404 $('#cateListSub_'+code).show(); 405 }, 406 'themeSubCateChange':function(code){ 407 $('#themeCateBranchSet ul li a').removeClass('on'); 408 $('#themeCateBranchSet ul li a.on_'+code).addClass('on'); 409 $('#themeCateSubSet ul').hide(); 410 $('#themeCateListSub_'+code).show(); 411 }, 412 /** 413 * í´ë¹ code ì ì¹´í ê³ ë¦¬ ë°ì¤ë¥¼ ì¤ííë¤. 414 * @param code 415 */ 416 OPENSUBIMTE : null, 417 'openSubCateBox':function(code){ 418 if( $('#totalCateW .total_cate_con:visible').length == 0 ){ 419 if( Mainpage.OPENSUBIMTE == null ){ 420 Mainpage.OPENSUBIMTE = window.setTimeout(function(){ 421 $('#totalCateW .total_cate_con').hide(); 422 $('#slideToggleBox ul li a').removeClass('on'); 423 $('#totalCateContent').hide(); 424 $('#slideToggleBox .total_cate').removeClass('on'); 425 $('#subCate_'+code).stop().slideDown(100); 426 $('#cateBtn_'+code+' a').addClass('on'); 427 $('#totalCateBtn .total_cate').attr('onclick', 'Mainpage.allCateOpen(); return false;'); 428 }, 350); 429 } 430 } else { 431 $('#totalCateW .total_cate_con').hide(); 432 $('#slideToggleBox ul li a').removeClass('on'); 433 $('#totalCateContent').hide(); 434 $('#slideToggleBox .total_cate').removeClass('on'); 435 $('#subCate_'+code).stop().show(); 436 $('#cateBtn_'+code+' a').addClass('on'); 437 } 438 }, 439 /** 440 * ì ì²´ ì¹´í ê³ ë¦¬ ì´ê¸° 441 */ 442 'allCateOpen':function(){ 443 $('#totalCateW .total_cate_con').hide(); 444 $('#slideToggleBox ul li a').removeClass('on'); 445 446 $('#totalCateContent').stop().slideDown(100); 447 $('#slideToggleBox .total_cate').addClass('on'); 448 449 $('#totalCateBtn .total_cate').attr('onclick', 'Mainpage.allCate
449Close(); return false;'); 450 }, 451 /** 452 * ì ì²´ ì¹´í ê³ ë¦¬ ë«ê¸° 453 */ 454 'allCateClose':function(){ 455 Mainpage.OPENSUBIMTE = null; 456 $('#totalCateContent').stop().slideUp(100); 457 $('#slideToggleBox .total_cate').removeClass('on'); 458 $('#totalCateBtn .total_cate').attr('onclick', 'Mainpage.allCateOpen(); return false;'); 459 }, 460 fileHandlerForFacebook : null, //íì´ì¤ë¶ í보를 ìí´ íìë¤ì´ ì ë¡ëíë íì¼ì ì ì¥í기 ìí ë³ì 461 /** 462 * íì´ì¤ë¶ íë³´ íì¼ ìì ë¤ì´ë¡ë 463 */ 464 'downloadFormForFacebook' : function() { 465 $.ajax({ 466 url:'/site/promotionFacebookFormDownload', 467 dataType:'json', 468 type:'POST', 469 success:function(result){ 470 if(result.code < 0){ 471 alert(result.msg); 472 return false; 473 }else{ 474 Common.goUrl(result.downloadInfo,'_blank'); 475 } 476 } 477 }); 478 }, 479 /** 480 * íì´ì¤ë¶ íë³´ íì¼ ì ë¡ë íì 481 */ 482 'openPromotionFacebookFilePop' : function() { 483 var html = ""; 484 html += '<div id="closeSmallPop" class="popupFrame" style="border: 1px solid rgb(36, 45, 67); border-image: none; width: 400px;">'; 485 html += '<div class="p_ntop">'; 486 html += '<h1 class="ptit">íì´ì¤ë¶ì íë³´ìë£ ë±ë¡</h1>'; 487 html += '<a class="p_nclose" href="javascript:;" onclick="$(\'#closeSmallPop\').hide();">ë«ê¸°</a>'; 488 html += '</div>'; 489 html += '<div class="containerPopup">'; 490 html += '<dl class="reply_dell">'; 491 html += '<dt class="noline">ììì ì ë¡ë íì¸ì.</dt>'; 492 html += '<dd><input style="width: 350px; height: 26px;" onchange="Mainpage.temporarilyRegisterFile(event)" id="file" type="file"></dd>'; 493 html += '<dt class="noline">ìë£ ìì¸íì´ì§ URLì ì ë ¥íì¸ì.</dt>'; 494 html += '<dd><input style="width: 350px; height: 26px;" type="text" id="url" class="input_b"></dd>'; 495 html += '</dl>'; 496 html += '</div>'; 497 html += '<div class="cBtns">'; 498 html += '<a class="btn_fun_b" href="javascript:;" onclick="Mainpage.registerPromotionContent();">ë±ë¡</a>'; 499 html += '<a class="btn_fun_w" href="javascript:;" onclick="$(\'#closeSmallPop\').hide();">ì·¨ì</a>'; 500 html += '</div>'; 501 html += '</div>'; 502 503 Common.openLayerBox('registerPopup', html, 352, 200); 504 }, 505 /** 506 * íì´ì¤ë¶ íë³´ íì¼ì ìì ì ì¥ 507 * @param event 508 */ 509 'temporarilyRegisterFile' :function(event) { 510 var files = event.target.files; 511 if (files.length == 1) { 512 this.fileHandlerForFacebook = files[0]; 513 } 514 }, 515 /** 516 * íì´ì¤ë¶ íë³´ íì¼ ì ë¡ë 517 */ 518 'registerPromotionContent' : function() { 519 var inputFile = new FormData(); 520 inputFile.append('inputFile',this.fileHandlerForFacebook); 521 522 $.ajax({ 523 type: 'post', 524 url: '/site/registerPromotionContent/', 525 data: inputFile, 526 cache: false, 527 async: true, 528 processData: false, 529 contentType: false, 530 dataType: 'json', 531 success: function (json) { 532 if(json.code < 0){ 533 alert(json.msg); 534 }else{ 535 $.ajax({ 536 type: 'post', 537 url: '/site/registerPromotionUrl/', 538 data: {'url': $('#url').val(), 'key' : json.code}, 539 cache: false, 540 async: true, 541 dataType: 'json', 542 success: function (json) { 543 if(json.code < 0){ 544 alert(json.msg); 545 }else{ 546 alert("ë±ë¡ ëììµëë¤."); 547 $('#closeSmallPop').hide(); 548 } 549 }, 550 error: function () { 551 alert('XHR í¸ì¶ ì¤ë¥[2]'); 552 } 553 }); 554 } 555 this.fileHandlerForFacebook = null; 556 inputFile.append('inputFile',this.fileHandlerForFacebook); 557 }, 558 error: function () { 559 alert('XHR í¸ì¶ ì¤ë¥'); 560 } 561 }); 562 }, 563}; 564 565$(document).ready(function(){ 566 /* ë¡ê·¸ì¸ í¬ì»¤ì¤ */ 567 $("#label_id").hide(); 568 $("#label_pw").hide(); 569 Mainpage.loginInputLabelView(); 570 $("form .login input").keyup(function(){ 571 Mainpage.loginInputLabelView(); 572 }); 573 $("form .login input").change(function(){ 574 Mainpage.loginInputLabelView(); 575 }); 576 // ì¹´í ê³ ë¦¬ë¥¼ ë²ì´ë«ìë 577 $('#leaveCheckBox').bind('mouseleave', function(){ 578 window.clearTimeout(Mainpage.OPENSUBIMTE); 579 Mainpage.OPENSUBIMTE = null; 580 $('#totalCateW .total_cate_con').stop().slideUp(100); 581 $('#slideToggleBox ul li a.c_btn').removeClass('on'); 582 }); 583 584 585 // ë©ì¸ ê²ìë° START 586 const searchInput = document.getElementById('inputQu'); 587 const recentSearchesContainer = document.getElementById('searchFront'); 588 const btnClose = document.querySelector('#searchKeywordAreaClose.BtnClose button'); 589 const noRecentSearches = document.getElementById('NoRecentSearches'); 590
591 // ê²ìì°½ìì focusê° ë¹ ì ¸ëê°ì ë, RecentSearchesê° ë³´ì´ì§ ìì¼ë©´ border ì ë³ê²½ 592 searchInput.addEventListener('blur', function () { 593 if (recentSearchesContainer.style.display === 'none') { 594 searchInput.closest('.TextInput_2').classList.remove('Focused'); 595 searchInput.closest('.TextInput_2').classList.add('NoFocused'); 596 } 597 }); 598 599 // ë«ê¸° ë²í¼ í´ë¦ ì ìµê·¼ ê²ìì´ ëª©ë¡ ë«ê¸° 600 btnClose.addEventListener('click', function () { 601 recentSearchesContainer.style.display = 'none'; 602 searchInput.closest('.TextInput_2').classList.remove('Focused'); 603 searchInput.closest('.TextInput_2').classList.add('NoFocused'); 604 }); 605 606 // ë°ê¹¥ ìì í´ë¦ ì ê²ìì°½ì ë³´ë ìì ìëëë¡, ìµê·¼ ê²ìì´ ëª©ë¡ ë«ê¸° 607 document.addEventListener('click', function (event) { 608 if (!searchInput.contains(event.target) && !recentSearchesContainer.contains(event.target)) { 609 recentSearchesContainer.style.display = 'none'; 610 searchInput.closest('.TextInput_2').classList.remove('Focused'); 611 searchInput.closest('.TextInput_2').classList.add('NoFocused'); 612 } 613 }); 614 // ë©ì¸ ê²ìë° END 615 616 // ë©ì¸ ê²ì íì ë©ë´ START 617 const btnOpenMenu = document.querySelector('.BtnOpenMenu'); 618 const mainMenu = document.querySelector('.MainMenu'); 619 const subMenu = document.querySelector('#MainSubMenu'); 620 621 function openMenu() { 622 btnOpenMenu.style.fontWeight = '700'; 623 mainMenu.classList.add('On'); 624 subMenu.style.display = 'block'; 625 } 626 627 function closeMenu() { 628 btnOpenMenu.style.fontWeight = '500'; 629 mainMenu.classList.remove('On'); 630 subMenu.style.display = 'none'; 631 } 632 633 btnOpenMenu.addEventListener('click', function(e) { 634 e.preventDefault(); 635 636 if(mainMenu.classList.contains('On')) { 637 closeMenu(); 638 } else { 639 openMenu(); 640 } 641 }); 642 643 document.addEventListener('click', function(e) { 644 if(!btnOpenMenu.contains(e.target) && !mainMenu.contains(e.target) && !subMenu.contains(e.target)) { 645 closeMenu(); 646 } 647 }); 648 // ë©ì¸ ê²ì íì ë©ë´ END 649 650 //ë©ì¸ ì°ì¸¡ìì ì¤í¬ë¡¤ START 651 const sticky = new Sticky('.StickyBox-B1GV3TJO'); 652 //ë©ì¸ ì°ì¸¡ìì ì¤í¬ë¡¤ END 653});
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.