1var sampleName = document.getElementById('sample-name'); 2 3if (sampleName.innerHTML == 'ë°ëë©' || sampleName.innerHTML == 'moa' || sampleName.innerHTML == '모ì' || sampleName.innerHTML == 'moa-studio') { 4 var fakeLogin = document.querySelectorAll('.fake-sns-login'); 5 fakeLogin[0].classList.remove('displaynone'); 6 if(fakeLogin[1]) fakeLogin[1].classList.remove('displaynone'); 7} 8 9$(function () { 10 11 $('.jsSampleBtn').on('click', function (e) { 12 alert('ê´ë¦¬ì ì¤ì ì íµí´ ê°í¸ ë¡ê·¸ì¸ ì¬ì©ì´ ê°ë¥í©ëë¤.'); 13 e.preventDefault(); 14 }); 15 16}); 17 18window.onload = function() { 19 document.getElementById('member_passwd').setAttribute('placeholder', 'ë¹ë°ë²í¸'); 20} 21// placeholder 22$(document).ready(function() { 23 function loginPlaceholder(){ 24 if ($('.xans-member-login').val() != undefined) { 25 var loginId = $('#member_id').parent().attr('title'); 26 $('#member_id').attr('placeholder', loginId); 27 $('#member_passwd').attr('placeholder', 'Password'); 28 $('#order_name').attr('placeholder', '주문ìëª '); 29 $('#order_id').attr('placeholder', '주문ë²í¸ (íì´í "-" í¬í¨)'); 30 $('#order_password').attr('placeholder', 'ë¹íì주문 ë¹ë°ë²í¸'); 31 } 32 }loginPlaceholder(); 33}); 34 35// keyboard 36$('.keyboard button').click(function(){ 37 if($(this).hasClass('selected')==true){ 38 $('.keyboard .btnKey').removeClass('selected'); 39 $('.view div').hide(); 40 } 41 else{ 42 $('.keyboard .btnKey').removeClass('selected'); 43 $('.view div').hide(); 44 $(this).addClass('selected'); 45 var key=$(this).attr('title'); 46 $(this).parent().next().children('.'+key+'').show(); 47 } 48}); 49 50// toggle 51$('.ec-base-tab').each(function(){ 52 var selected = $(this).find('> ul > li.selected > a'); 53}); 54 55$('body').delegate('.ec-base-tab a', 'click', function(e){ 56 var _target = $(this).attr('href'); 57 if (_target == '#member') { 58 $('#member_login_module_id').show();
59 $('#order_history_nologin_id').hide(); 60 } else { 61 $('#member_login_module_id').hide(); 62 $('#order_history_nologin_id').show(); 63 } 64 e.preventDefault(); 65}); 66/** 67 * hasClass 68 */ 69function hasClass(element, className){ 70 return (' ' + element.className + ' ').indexOf(' ' + className+ ' ') > -1; 71}; 72 73/** 74 * toggle 75 */ 76function toggleClassAll(element, handler, className){ 77 var _handler = document.querySelector(handler); 78 document.querySelectorAll(handler).forEach(function(item){ 79 item.addEventListener('click', function(){ 80 var _element = item.parentNode; 81 if ( hasClass( _element, className ) ) { 82 _element.classList.remove( className ); 83 } else { 84 _element.classList.add( className ); 85 } 86 }) 87 }) 88}; 89 90/** 91 * findElements 92 */ 93function findElements(element, findElement){ 94 var resultElements = []; 95 document.querySelectorAll(element).forEach(function(item){ 96 var findElementList = item.querySelectorAll(findElement); 97 findElementList = Array.prototype.slice.call(findElementList); 98 resultElements = resultElements.concat(findElementList); 99 }) 100 return resultElements; 101}; 102 103/** 104 * setAttributeAl 105 */ 106function setAttributeAll(elements, name, value){ 107 elements.forEach(function(item){ 108 item.setAttribute(name, value); 109 }) 110}; 111 112/** 113 * ìí ì¬ë¤ì¼ ë¡ëëì§ ìì ê²½ì°, ê¸°ë³¸ê° ì¤ì 114 */ 115function setDefaultImage(element) { 116 document.querySelectorAll(element).forEach(function(item){ 117 var $img = new Image(); 118 $img.onerror = function () { 119 item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 120 } 121 $img.src = item.src; 122 }); 123}; 124 125/** 126 * tooltip 127 */ 128function setTooltipEvent(){ 129 var input = findElements('.eTooltip', 'input'); 130 input.forEach(function(item){ 131 item.addEventListener('focusin', function(event){ 132 var targetName = returnTargetName(event.target); 133 targetName.nextElementSibling.style.display = 'block' 134 }); 135 item.addEventListener('focusout', function(event){ 136 var targetName = returnTargetName(event.target); 137 targetName.nextElementSibling.style.display = 'none' 138 }); 139 }); 140} 141 142/** 143 * tooltip input focus 144 */ 145function returnTargetName(_this){ 146 var ePlacename = _this.parentElement.getAttribute("class"); 147 var targetName; 148 if(ePlacename == "ePlaceholder"){ //ePlaceholder supported 149 targetName = _this.parentElement; 150 }else{ 151 targetName = _this; 152 } 153 return targetName; 154} 155 156/** 157 * window load 158 */ 159window.addEventListener('load', function(){ 160 if (document.querySelector('.thumbnail')){ 161 setDefaultImage('.thumbnail img'); 162 } 163 if (document.querySelector('.eTooltip')){ 164 setAttributeAll(findElements('.eTooltip', '.btnClose'),'tabIndex','-1'); 165 setTooltipEvent(); 166 } 167 if (document.querySelector('div.eToggle')){ 168 toggleClassAll(false, 'div.eToggle .title', 'selected'); 169 } 170}); 171//window popup script 172function winPop(url) { 173 window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); 174} 175/** 176 * document.location.href split 177 * return array Param 178 */ 179function getQueryString(sKey) 180{ 181 var sQueryString = document.location.search.substring(1); 182 var aParam = {}; 183 184 if (sQueryString) { 185 var aFields = sQueryString.split("&"); 186 var aField = []; 187 for(var i=0; i<aFields.length; i++){ 188 aField = aFields[i].split('='); 189 aParam[aField[0]] = aField[1]; 190 } 191 } 192 193 aParam.page = aParam.page ? aParam.page : 1; 194 return sKey ? aParam[sKey] : aParam; 195}; 196 197/** 198 * 구매ë²í¼ 199*/ 200var globalBuyBtnScrollFunc = function() { 201 // 구매ë²í¼ ê´ë ¨ë³ì 202 var sFixId = $('#orderFixItem').length > 0 ? 'orderFixItem' : 'fixedActionButton', 203 $area = $('#orderFixArea'), 204 $item = $('#' + sFixId + '').not($area); 205 206 $(window).scroll(function(){ 207 try { 208 // 구매ë²í¼ ê´ë ¨ë³ì
209 var iCurrentHeightPos = $(this).scrollTop() + $(this).height(), 210 iButtonHeightPos = $item.offset().top; 211 212 if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) { 213 if (iButtonHeightPos < $(this).scrollTop() - $item.height()) { 214 $area.fadeIn('fast'); 215 } else { 216 $area.hide(); 217 } 218 } else { 219 $area.fadeIn('fast'); 220 } 221 } catch(e) { } 222 }); 223}; 224 225$(function(){ 226 // tab 227 $.eTab = function(ul) { 228 $(ul).find('a').on('click', function() { 229 var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'), 230 _target = $(this).attr('href'), 231 _siblings = '.' + $(_target).attr('class'); 232 $(_target).show().siblings(_siblings).hide(); 233 return false 234 }); 235 } 236 if ( window.call_eTab ) { 237 call_eTab(); 238 }; 239 globalBuyBtnScrollFunc(); 240}); 241/** 242 * ì¹´í ê³ ë¦¬ ë§ì°ì¤ ì¤ë² ì´ë¯¸ì§ 243 * ì¹´í ê³ ë¦¬ ìë¸ ë©ë´ ì¶ë ¥ 244 */ 245 246$(document).ready(function () { 247 248 var cateData; 249 var methods = { 250 aCategory: [], 251 aSubCategory: {}, 252 253 get: function () { 254 $.ajax({ 255 url: '/exec/front/Product/SubCategory', 256 dataType: 'json', 257 success: function (aData) { 258 259 cateData = aData; 260 261 if (aData == null || aData == 'undefined') return; 262 for (var i = 0; i < aData.length; i++) { 263 var sParentCateNo = aData[i].parent_cate_no; 264 265 if (!methods.aSubCategory[sParentCateNo]) { 266 methods.aSubCategory[sParentCateNo] = []; 267 } 268 269 methods.aSubCategory[sParentCateNo].push(aData[i]); 270 } 271 272 var eventMenu = $('.category__item.jsMenuEvent'); 273 var eventMenuSide = $('.aside-category__item.jsMenuEvent'); 274 var hasEventChild = false; 275 var childData = ''; 276 277 if(eventMenu.length > 0) { 278 cateData.forEach(function (val, idx) { 279 if (val.name.indexOf('ì´ë²¤í¸') != -1) { 280 if(val.parent_cate_no != 1) { 281 if(val.name.indexOf('ì§í') != -1) { 282 var eventName = eventMenu.find('a').text(); 283 var eventURL = '/event/list.html' + val.param; eventMenu.find('a').attr('href', eventURL).text(eventName); 284 eventMenu.removeClass('displaynone'); 285 eventMenuSide.find('a').attr('href', eventURL).text(eventName); 286 eventMenuSide.removeClass('displaynone'); 287 } 288 } 289 hasEventChild = true; 290 } 291 }); 292 } 293 294 } 295 }); 296 }, 297 298 getParam: function (sUrl, sKey) { 299 300 var aUrl = sUrl.split('?'); 301 var sQueryString = aUrl[1]; 302 var aParam = {}; 303 304 if (sQueryString) { 305 var aFields = sQueryString.split("&"); 306 var aField = []; 307 for (var i = 0; i < aFields.length; i++) { 308 aField = aFields[i].split('='); 309 aParam[aField[0]] = aField[1]; 310 } 311 } 312 return sKey ? aParam[sKey] : aParam; 313 }, 314 315 getParamSeo: function (sUrl) { 316 var aUrl = sUrl.split('/'); 317 return aUrl[3] ? aUrl[3] : null; 318 }, 319 320 show: function (overNode, iCateNo) { 321 322 if(methods.aSubCategory[iCateNo]) { 323 if (methods.aSubCategory[iCateNo].length == 0) { 324 return; 325 } 326 327 328 var aHtml = []; 329 aHtml.push('<ul class="sub-category__list">'); 330 $(methods.aSubCategory[iCateNo]).each(function () { 331 aHtml.push('<li class="sub-category__item"><a class="sub-category__link jsChildTwo" href="' + this.link_product_list + '">' + this.name + '</a></li>'); 332 }); 333 aHtml.push('</ul>'); 334 335 336 var offset = $(overNode).offset(); 337 $('<div class="sub-category"></div>') 338 .appendTo(overNode) 339 .html(aHtml.join('')).addClass('on'); 340 setTimeout(function() { 341 $(overNode).find('.sub-category').removeClass('on'); 342 },200); 343 } 344 }, 345 346 close: function () { 347 $('.sub-category').remove(); 348 } 349 }; 350 351 methods.get(); 352
353 $('.xans-layout-category.category li.jsPrdCate').mouseenter(function (e) { 354 var $this = $(this).addClass('on'), 355 iCateNo = Number(methods.getParam($this.find('a').attr('href'), 'cate_no')); 356 357 if (!iCateNo) { 358 iCateNo = Number(methods.getParamSeo($this.find('a').attr('href'))); 359 } 360 361 if (!iCateNo) { 362 return; 363 } 364 if ($(this).find('.sub-category').length < 1) { 365 methods.show($this, iCateNo); 366 } 367 }); 368 369 370}); 371function depthThree(target, cateNo) { 372 var $cate = ''; 373 $.ajax({ 374 url: '/exec/front/Product/SubCategory', 375 dataType: 'json', 376 success: function (data) { 377 $.each(data, function (m, key) { 378 if (key.parent_cate_no == cateNo) { 379 $cate += '<li class="sub-category__item"><a class="sub-category__link jsChildThree" href="/product/list.html' + key.param + '">' + key.name + '</a></li>'; 380 }; 381 }); 382 383 if (target.next().length < 1 && $cate != '') { 384 target.each(function () { 385 $(this).after('<div class="sub-category sub-category--depth-three"><ul class="sub-category__list sub-category__list">' + $cate + '</ul></div>'); 386 }); 387 target.next('.sub-category').addClass('on'); 388 setTimeout(function () { 389 target.next('.sub-category').removeClass('on'); 390 }, 100); 391 } 392 } 393 }); 394} 395 396$(function () { 397 398 $(document).on('mouseenter', '.jsChildTwo', function () { 399 var getCateNo = $(this).attr('href').split('/')[3]; 400 depthThree($(this), getCateNo); 401 }); 402 403 $(document).on('mouseenter', '.jsChildThree', function () { 404 var getCateNo = $(this).attr('href').split('cate_no=')[1]; 405 depthThree($(this), getCateNo); 406 }); 407 408}); 409var isInIFrame = (window.location != window.parent.location); 410 411if(document.getElementById('chkMoa')) { 412 var sampleChk = document.getElementById('chkMoa').dataset.chk; 413} 414 415if(document.getElementById('login-popup-sample')) var sampleName = document.getElementById('login-popup-sample'); 416var header = $('.jsHeader'); 417var todayBtn = document.querySelector('.jsTodayBtn'); 418var closeBtn = document.querySelector('.jsTodayClose'); 419var todayPopup = document.querySelector('.today-view'); 420var todayBG = document.querySelector('.jsTodayBG'); 421 422if(document.getElementById('login-popup-sample')) { 423 if (sampleName.innerHTML == '모ìì¤íëì¤' || sampleName.innerHTML == 'moa' || sampleName.innerHTML == '모ì' || sampleName.innerHTML == 'moa-studio') { 424 425 if(document.querySelectorAll('.fakeSnsLoginPop').length > 0) { 426 var fakeLogin = document.querySelectorAll('.fakeSnsLoginPop'); 427 fakeLogin[0].classList.remove('displaynone'); 428 fakeLogin[1].classList.remove('displaynone'); 429 } 430 window.addEventListener('resize', function() { 431 var resizeFlag = sessionStorage.getItem('reload'); 432 if(isInIFrame==true) { 433 if(document.body.clientWidth <= 768 && !resizeFlag) { 434 sessionStorage.setItem('reload', true); 435 location.reload(); 436 } 437 if(document.body.clientWidth > 768 && resizeFlag) { 438 sessionStorage.removeItem('reload'); 439 } 440 } 441 }); 442 443 } 444} 445 446// IE Check 447function checkIE() { 448 var agent = navigator.userAgent.toLowerCase(); 449 if ((navigator.appName == 'Netscape' && agent.indexOf('trident') != -1) || (agent.indexOf("msie") != -1)) { 450 $('.jsIEPopup').addClass('on'); 451 $('.jsIEPopupClose').on('click', function () { 452 window.close(); 453 }); 454 } 455} 456 457if(document.getElementById('chkMoa')) { 458 if (sampleChk == '9999') { 459 window.addEventListener('resize', function() { 460 var resizeFlag = sessionStorage.getItem('reload'); 461 if(isInIFrame==true) { 462 if(document.body.clientWidth <= 768 && !resizeFlag) { 463 sessionStorage.setItem('reload', true); 464 location.reload(); 465 } 466 if(document.body.clientWidth > 768 && resizeFlag) { 467 sessionStorage.removeItem('reload'); 468 } 469 } 470 console.log(isInIFrame); 471 }); 472 $('.sub-category__list--global .sub-category__item').last().find('a').attr('href', 'http://skin-skin14--shop3.ecudemo215459.cafe24.com/'); 473 $('.aside-global__item').last().find('a').attr('href', 'http://skin-skin14--shop3.ecudemo215459.cafe24.com/'); 474 } 475} 476 477// Run load Effect 478function loadEft() { 479 $('html').addClass('loaded'); 480} 481 482// Top banner setting 483function runTopbanner() { 484 485 var closeChk = sessionStorage.getItem('bannerClose'); 486 487 if (!closeChk) { 488 $('.jsTopBanner').addClass('on'); 489 } 490 491 $('.jsTopBannerClose').on('click', function () { 492 $('.jsTopBanner').slideUp(); 493 sessionStorage.setItem('bannerClose', true); 494 }); 495} 496 497// Scroll header fixed 498function scrollHeaderFixed() { 499 var getScroll = $(window).scrollTop(); 500 if ($('.jsTopBanner').length > 0 || $('.jsTopBanner').css('display') != 'none') { 501 var loss = $('.jsTopBanner').outerHeight(); 502 } 503 if ($('.jsTopBanner').length < 1 || $('.jsTopBanner').css('display') == 'none') { 504 var loss = 0; 505 } 506 if (getScroll >= loss) { 507 $('.jsHeader').addClass('fixed'); 508 $('.jsScrollUp').addClass('on'); 509 } 510 if (getScroll < loss) { 511 $('.jsHeader').removeClass('fixed'); 512 $('.jsScrollUp').removeClass('on'); 513 } 514} 515 516function handleSearchOn() { 517 $('.jsHeader').addClass('search-on'); 518 $('.search').addClass('on'); 519 $('.search #keyword').focus(); 520} 521 522function handleSearchOff() { 523 $('.jsHeader').removeClass('search-on'); 524 $('.search').removeClass('on'); 525} 526 527function handleCartClose() { 528 var cartData = $('#cart-data'); 529 cartData.removeClass('on'); 530 setTimeout(function() { 531 cartData.remove(); 532 $('#cart-script').remove(); 533 },700); 534} 535 536function handleCartOpen(e) { 537 $.ajax({ 538 url: '/moa/import/popup/cart_data.html', 539 dataType: 'html', 540 success: function (result) { 541 $('body').append(result); 542 $('#cart-data').addClass('on'); 543 }, 544 complete: function() { 545 $('.cart-loading').addClass('stop'); 546 $('.jsCartClose, .cart-data-bg').on('click', handleCartClose); 547 } 548 }); 549 e.preventDefault(); 550} 551 552function policyDropdown() { 553 if ($(window).width() > 1023) { 554 // Footer menu hover
555 $('.jsPolicy').hover(function () { 556 $(this).children('.policy__list').stop(true, true).slideDown(); 557 }, function () { 558 $(this).children('.policy__list').stop(true, true).slideUp(); 559 }); 560 } else { 561 $('.jsPolicy').on('click', function () { 562 $(this).toggleClass('on').children('.policy__list').slideToggle(); 563 }); 564 } 565} 566 567function pageScrollUp() { 568 $('html, body').animate({ 569 scrollTop: 0 570 }, 400); 571} 572 573function handleLoginPopupOn(e) { 574 $('.jsLoginPopup, .jsLoginPopupBG').fadeIn(300).addClass('on'); 575 e.preventDefault(); 576} 577 578function handleLoginPopupOff() { 579 $('.jsLoginPopup, .jsLoginPopupBG').fadeOut(300).removeClass('on'); 580} 581 582$(function () { 583 584 loadEft(); 585 runTopbanner(); 586 policyDropdown(); 587 $(window).on('load scroll', scrollHeaderFixed); 588 $('.jsSearchOpen').on('click', handleSearchOn); 589 $('.jsSearchClose, .search-bg').on('click', handleSearchOff); 590 $('.jsScrollUp').on('click', pageScrollUp); 591 $('.jsLoginPopBtn').on('click', handleLoginPopupOn); 592 $('.icon-menu__item--cart').on('click', handleCartOpen); 593 $('.jsSampleBtnLoginPopup').on('click', function (e) { 594 alert('ê´ë¦¬ì ì¤ì ì íµí´ ê°í¸ ë¡ê·¸ì¸ ì¬ì©ì´ ê°ë¥í©ëë¤.'); 595 e.preventDefault(); 596 }); 597 $('.jsLoginPopupClose').on('click', handleLoginPopupOff); 598 $(document).on('click', function(e) { 599 if (!$(e.target).is('.jsLoginPopBtn, .jsLoginPopBtn *, #type-popup, #type-popup *')) { 600 handleLoginPopupOff(); 601 } 602 }); 603 checkIE(); 604}); 605var aCategory = []; 606$(document).ready(function(){ 607 var methods = { 608 aCategory : [], 609 aSubCategory : {}, 610 get: function() { 611 $.ajax({ 612 url : '/exec/front/Product/SubCategory', 613 dataType: 'json', 614 success: function(aData) { 615 if (aData == null || aData == 'undefined') { 616 methods.checkSub(); 617 return; 618 } 619 for (var i=0; i<aData.length; i++) 620 { 621 var sParentCateNo = aData[i].parent_cate_no; 622 var sCateNo = aData[i].cate_no; 623 if (!methods.aSubCategory[sParentCateNo]) { 624 methods.aSubCategory[sParentCateNo] = []; 625 } 626 if (!aCategory[sCateNo]) { 627 aCategory[sCateNo] = []; 628 } 629 methods.aSubCategory[sParentCateNo].push( aData[i] ); 630 aCategory[sCateNo] = aData[i]; 631 632 } 633 methods.checkSub(); 634// 635 $.each(aData, function(idx, item) { 636 if(item.design_page_url != "product/list.html") { 637 $('#cate'+item.cate_no).find('.view').attr('href', '/'+item.design_page_url+item.param); 638 } 639 }); 640 641 642 } 643 }); 644 }, 645 getParam: function(sUrl, sKey) { 646 if (typeof sUrl !== 'string') return; 647 var aUrl = sUrl.split('?'); 648 var sQueryString = aUrl[1]; 649 var aParam = {}; 650 if (sQueryString) { 651 var aFields = sQueryString.split("&"); 652 var aField = []; 653 for (var i=0; i<aFields.length; i++) { 654 aField = aFields[i].split('='); 655 aParam[aField[0]] = aField[1]; 656 } 657 } 658 return sKey ? aParam[sKey] : aParam; 659 }, 660 661 show: function(overNode, iCateNo) { 662 var oParentNode = overNode; 663 var aHtml = []; 664 var sMyCateList = localStorage.getItem("myCateList"); 665 if (methods.aSubCategory[iCateNo] != undefined) { 666 aHtml.push('<ul class="aside-child">'); 667 $(methods.aSubCategory[iCateNo]).each(function() { 668 var sNextParentNo = this.cate_no; 669 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 670 if (methods.aSubCategory[sNextParentNo] == undefined) { 671 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 672 var sHref = '/'+this.design_page_url+this.param; 673 } else { 674 aHtml.push('<li id="cate'+this.cate_no+'">'); 675 var sHref = '#none'; 676 } 677 aHtml.push('<a href="/'+this.design_page_url+this.param+'" class="view" cate="'+this.param+'" data-i18n="LIST.PRD_CATE_NO_'+this.cate_no+'" data-i18n-new>'+this.name+'</a>'); 678 if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('<a href="'+sHref+'"'+this.param+'" onclick="subMenuEvent(this);" class="cate"><svg xmlns="http://www.w3.org/2000/svg" width="11.001" height="6.208" viewBox="0 0 11.001 6.208">
678<path id="chevron-down" d="M7.646,14.646a.5.5,0,0,0,.708.708ZM13,10l.354.354L13.707,10l-.353-.354ZM8.354,4.646a.5.5,0,0,0-.708.708Zm0,10.708,5-5-.708-.708-5,5Zm5-5.708-5-5-.708.708,5,5Z" transform="translate(15.501 -7.499) rotate(90)"></path></svg></a>'); 679 680 if (methods.aSubCategory[sNextParentNo] != undefined) { 681 aHtml.push('<ul class="aside-child-third">'); 682 $(methods.aSubCategory[sNextParentNo]).each(function() { 683 var sNextParentNo2 = this.cate_no; 684 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 685 if (methods.aSubCategory[sNextParentNo2] == undefined) { 686 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 687 var sHref = '/'+this.design_page_url+this.param; 688 } else { 689 aHtml.push('<li id="cate'+this.cate_no+'">'); 690 var sHref = '#none'; 691 } 692 aHtml.push('<a href="/'+this.design_page_url+this.param+'" class="view" cate="'+this.param+'" data-i18n="LIST.PRD_CATE_NO_'+this.cate_no+'" data-i18n-new>'+this.name+'</a>'); 693 if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('<a href="'+sHref+'"'+this.param+'" onclick="subMenuEvent(this);" class="cate"><svg xmlns="http://www.w3.org/2000/svg" width="11.001" height="6.208" viewBox="0 0 11.001 6.208"><path id="chevron-down" d="M7.646,14.646a.5.5,0,0,0,.708.708ZM13,10l.354.354L13.707,10l-.353-.354ZM8.354,4.646a.5.5,0,0,0-.708.708Zm0,10.708,5-5-.708-.708-5,5Zm5-5.708-5-5-.708.708,5,5Z" transform="translate(15.501 -7.499) rotate(90)"></path></svg></a>'); 694 695 if (methods.aSubCategory[sNextParentNo2] != undefined) { 696 aHtml.push('<ul>'); 697 698 $(methods.aSubCategory[sNextParentNo2]).each(function() { 699 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 700 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 701 aHtml.push('<a href="/'+this.design_page_url+this.param+'" class="view" cate="'+this.param+'" onclick="subMenuEvent(this);" data-i18n="LIST.PRD_CATE_NO_'+this.cate_no+'" data-i18n-new>'+this.name+'</a>'); 702 aHtml.push('</li>'); 703 }); 704 aHtml.push('</ul>'); 705 } 706 aHtml.push('</li>'); 707 }); 708 aHtml.push('</ul>'); 709 } 710 aHtml.push('</li>'); 711 }); 712 aHtml.push('</ul>'); 713 } 714 if($(oParentNode).children('ul').length < 1) { 715 $(oParentNode).append(aHtml.join('')); 716 } 717 if (window.i18nextCafe24) { 718 i18nextCafe24.translate('data-i18n-new'); 719 } 720 }, 721 close: function() { 722// $('.aside-child').remove(); 723 }, 724 checkSub: function() { 725 $('.cate').each(function(){ 726 var sParam = $(this).attr('cate'); 727 if (!sParam) return; 728 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 729 var result = methods.aSubCategory[iCateNo]; 730 if (result == undefined) { 731 if ($(this).closest('#slideProjectList').length) { 732 var sHref = '/product/project.html'+sParam; 733 } else { 734 var sHref = '/product/list.html'+sParam; 735 } 736 737 $(this).attr('href', sHref); 738 $(this).parent().attr('class', 'noChild aside-category__item'); 739 } 740 }); 741 } 742 }; 743 744 methods.get(); 745 746 function asideOn() { 747 $('.aside').addClass('on'); 748 } 749 750 function asideOff() { 751 $('.aside').removeClass('on'); 752 setTimeout(function() { 753 $('.aside a.cate').removeClass('on');
754 $('.aside-child, .aside-child-third').slideUp(); 755 },600); 756 } 757 758 $('.jsHamburger').on('click', asideOn); 759 $('.aside-bg').on('click', asideOff); 760 761 $(document).on('click', '#slideCateList > ul > li > a.cate', function(e) { 762 var sParam = $(this).attr('cate'); 763// if (!sParam) return; 764 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 765 var hasClass = $(this).parent().hasClass('selected'); 766 767 //if ($(this).parent().attr('class') == 'xans-record- selected') { 768 if(sParam) { 769 if (!iCateNo) return; 770 $('#aside #slideCateList li').removeClass('selected'); 771 methods.close(); 772 methods.show(this.parentNode, iCateNo); 773 } 774 if(!$(this).hasClass('on')) { 775 $('#slideCateList > ul > li > a.cate').removeClass('on'); 776 $(this).addClass('on'); 777 $('.aside-child').slideUp(); 778 $(this).next('.aside-child').slideDown(); 779 } else { 780 $('#slideCateList > ul > li > a.cate').removeClass('on'); 781 $('.aside-child').slideUp(); 782 } 783 e.preventDefault(); 784 }); 785 786 $(document).on('click', '.aside-child > li > a.cate', function(e) { 787 if(!$(this).hasClass('on')) { 788 $('.aside-child > li > a.cate').removeClass('on'); 789 $(this).addClass('on'); 790 $('.aside-child-third').slideUp(); 791 $(this).next('.aside-child-third').slideDown(); 792 } else { 793 $('.aside-child > li > a.cate').removeClass('on'); 794 $('.aside-child-third').slideUp(); 795 } 796 e.preventDefault(); 797 }) 798 799 $('#aside ul a.cate').click(function(e){ 800 $(this).parent().find('li').removeClass('selected'); 801 $(this).parent().toggleClass('selected'); 802 if (!$(this).parent('li').hasClass('noChild')){ 803 e.preventDefault(); 804 } 805 }); 806 807 $('#slideCateList h2').click(function() { 808 var oParentId = $(this).parent().attr('id'); 809 if (oParentId == 'slideCateList' || oParentId == 'slideMultishopList' || oParentId == 'slideProjectList') { 810 ($(this).attr('class') == 'selected') ? $(this).next().hide() : $(this).next().show(); 811 } 812 $(this).toggleClass('selected'); 813 }); 814 815 $('#slideProjectList .icoCategory').click(function() { 816 var target = $(this).parents('#slideProjectList'); 817 if(target.find('.categoryList').css("display") == "none"){ 818 target.find('.categoryList').show(); 819 }else{ 820 target.find('.categoryList').hide(); 821 } 822 823 $(this).parents('.title').toggleClass('selected'); 824 }); 825 826// $(document).on('click', '.aside-category__link', function(e) { 827// if($(this).next('.cate').length > 0) { 828// $(this).next('.cate').trigger('click'); 829// e.preventDefault(); 830// } 831// }); 832 833}); 834function subMenuEvent(obj) { 835 $(obj).parent().find('li').removeClass('selected'); 836 $(obj).parent().toggleClass('selected'); 837} 838 839function checkInArray(sBookmarkList, iCateNo) { 840 if (sBookmarkList == null) return false; 841 var aBookmarkList = sBookmarkList.split("|"); 842 for (var i = 0; i < aBookmarkList.length; i++) { 843 if (aBookmarkList[i] == iCateNo) { 844 return true; 845 } 846 } 847 return false; 848} 849$(document).ready(function(){ 850 if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") { 851 var sShippingCountryCode4Cookie = 'shippingCountryCode'; 852 var bShippingCountryProc = false; 853 854 // ë°°ì¡êµê° ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 855 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) { 856 $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide(); 857 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide(); 858 } else { 859 $('.thumb .xans-layout-multishoplistitem').hide(); 860 var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)'); 861 if (typeof(aShippingCountryCode) != 'undefined' && aS
861hippingCountryCode != null && aShippingCountryCode.length > 2) { 862 var sShippingCountryValue = aShippingCountryCode[2]; 863 } 864 865 // query stringì¼ë¡ ëì´ ì¨ ë°°ì¡êµê° ê°ì´ ìë¤ë©´, ê·¸ ê°ì ì ì©í¨ 866 var aHrefCountryValue = decodeURIComponent(location.href).split("/?country="); 867 868 if (aHrefCountryValue.length == 2) { 869 var sShippingCountryValue = aHrefCountryValue[1]; 870 } 871 872 // ë©ì¸ íì´ì§ìì êµê°ì íì ìí ê²½ì°, ê·¸ ì¸ì íì´ì§ìì ì í ë ê°ì´ ì ëì¤ë íì ì²ë¦¬ 873 if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) { 874 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 875 876 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 877 $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 878 } 879 } 880 if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) { 881 sShippingCountryValue = sShippingCountryValue.split("#")[0]; 882 var bShippingCountryProc = true; 883 884 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 885 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 886 var expires = new Date(); 887 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 888 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 889 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 890 $("#f_country").val(sShippingCountryValue).change();; 891 } 892 } 893 } 894 // ì¸ì´ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 895 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) { 896 $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide(); 897 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide(); 898 } else { 899 $('.thumb .xans-layout-multishoplistitem').hide(); 900 } 901 902 // ë°°ì¡êµê° ë° ì¸ì´ ì¤ì ì´ ë ë¤ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 903 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) { 904 $(".xans-layout-multishopshipping").hide(); 905 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide(); 906 } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // ë°°ì¡êµê° ê°ì ì²ë¦¬í ì ì´ ìê³ , ë©ì¸íë©´ì¼ ëë§ ì í ë ì´ì´ë¥¼ ëì 907 var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(); 908 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 909 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 910 // ë°°ì¡êµê° ì íì ì¬ì©í´ì¼ ë ì´ì´ë¥¼ ë³´ì´ê² í¨ 911 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) { 912 $(".xans-layout-multishopshipping").show(); 913 } 914 } 915 916 $(".xans-layout-multishopshipping .btnClose").bind("click", function() { 917 $(".xans-layout-multishopshipping").hide(); 918 }); 919 920 $(".xans-layout-multishopshipping .ec-base-button a").bind("click", function() { 921 var expires = new Date(); 922 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 923 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 924 925 // ëë©ì¸ 문ì ë¡ ì¿ í¤ë¡ ë°°ì¡êµê° ì¤ì ì´ ì ëë ê²½ì°ë¥¼ ìí´ query stringì¼ë¡ ë°°ì¡êµê° ê°
925ì ëê¹ 926 var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 927 928 location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting; 929 }); 930 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").bind("click", function() { 931 $(".xans-layout-multishopshipping").show(); 932 }); 933 } 934});
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.