1function vod_popVal(vi_viewcode,w,h){ 2 3 var url = "/pr_event/vod/vodinfo/vodViewAutoNew?popYn=Y&vi_viewcode="+vi_viewcode; 4 OpenPOPUP(url,"naverVod",(w+20),(h+20)); 5} 6 7/* 8alert ì²´í¬í ì¼ë ì°½ì´ ìì¼ë©´ íì ìì¼ë©´ ì¼ë 9*/ 10function alert_vod_popVal(vi_viewcode,w,h){ 11 12 jQuery.ajax({ 13 url : "/pr_event/vod/vodinfo/vodView_alert", 14 type : "post", 15 data : "vi_viewcode="+vi_viewcode, 16 dataType:"html", 17 success : function(data){ 18 var returnVal = jQuery.trim(data); 19 //$("#"+objectID).html(returnVal); 20 if(returnVal == "N"){ 21 var url = "/pr_event/vod/vodinfo/vodView?vi_viewcode="+vi_viewcode+"&w="+w+"&h="+h; 22 OpenPOPUP(url,"naverVod",(w+20),(h+20)); 23 }else{ 24 alert(returnVal); 25 } 26 27 }, 28 error : function(e){ 29 // console.log(e.responseText); 30 } 31 }); 32} 33 34 35//íì - íë©´ ì¤ìì ìì¹ 36function OpenPOPUP(url,name,width,height){ 37 var iWidth = width; 38 var iHeight = height; 39 var iLeft = (window.screen.availWidth - iWidth) / 2; 40 var iTop = (window.screen.availHeight - iHeight) / 2; 41 var nwin=window.open(url, name, "height="+ iHeight+ ",width=" + iWidth + ",top=" + iTop + ",left=" + iLeft + ",toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no"); 42 43 nwin.focus(); 44} 45 46 47 48// ìµì»¤ ì´ë ì¤í¬ë¦½í¸ 49function fnScrollLink(elementID) { 50 jQuery('html,body').animate({ scrollTop: jQuery(elementID).offset().top }, 500); 51} 52 53// ë ì´ì´ íì ëì°ê¸° : data-layer-class="í´ë¹íì í´ëì¤" data-position='{"bottom":"0","left":"50%"}' data-img-url="http://img.skyedu.com/imgs/event/201506/0102/popup01.png" 54function fnImgLayerPopup(pObj, pTop, pLeft){ 55 pTop = (typeof(pTop) != 'undefined') ? pTop : '0'; 56 pLeft = (typeof(pLeft) != 'undefined') ? pLeft : '0'; 57 58 jQuery(".event-layer-popup").hide(); 59 var $layerPopup = jQuery(".img-layer-popup"); 60 61 62 if( pObj.is("[data-layer-class]") ) $layerPopup = jQuery("." + pObj.attr("data-layer-class")); 63 64 if( pObj.is("[data-position]") ){ 65 $layerPopup.fadeIn(200).css(jQuery.extend({}, pObj.data("position"))); 66 } 67 else{ 68 $layerPopup.fadeIn(200).css({"margin-left": pLeft, "top":pTop, "left":"50%"}); 69 } 70 71 if( pObj.is("[data-img-url]") ) $layerPopup.find(".layer-contents").html("<img src='"+ pObj.attr("data-img-url") +"' />"); 72} 73 74 75 76 77 78function xhr_event_tab(event_code,view_type,item_typecode){ 79 $.ajax({ 80 url: "/common/pr_event/view/xhr_event_tab", 81 type: "GET", 82 data: { 83 event_code : event_code 84 ,view_type : view_type 85 ,item_typecode : item_typecode 86 }, 87 success: function(response){ 88 $("#tab_"+view_type).html(response); 89 90 jQuery('.box-tab li, .box-tab-fir li').click(function(){ 91 if( jQuery(this).parent('.box-tab-fir').is('.slide-tab')===false ){ 92 jQuery(this).addClass('selected').siblings('li').removeClass('selected'); 93 } 94 }); 95 } 96 }); 97} 98/* 99* ì´ë²¤í¸ ê°ì¢ë¦¬ì¤í¸ 100* event_code = ì´ë²¤í¸ì½ë 101* item_Typecode = ë¶ë¥ì½ë 102* divName = ê°ì¢ê° ë³´ì¼ ê°ì¢ë¦¬ì¤í¸ 103*/ 104function eventLectureList(event_code, item_typecode, divName, userId = ""){ 105 if (Array.isArray(event_code)) { 106 var post_data = {'event_code' : event_code}; 107 } else { 108 var post_data = "event_code="+event_code+"&item_typecode="+item_typecode+"&divName="+divName; 109 } 110 jQuery.ajax({ 111 url : "/common/pr_event/view/eventLectureList", 112 type : "post", 113 data : post_data, 114 dataType:"json", 115 success : function(data){ 116 if(data.event_gubun == "A") { 117 //- ê°ì¢ 리ì¤í¸ì ê²½ì° 118 pageViewLectureList(data.products, data.url, divName, data.device_type); 119 }else if(data.event_gubun == "C" || data.event_gubun == "D") { 120 //- êµì¬ 리ì¤í¸ì ê²½ì° 121 $("#" + divName).html(data.returnHTML); 122 } else if(data.event_gubun == 'saleinfo_ids') { 123 pageViewLectureList(data.products, data.url, divName, data.device_type); 124 } 125 }, 126 error : function(e){ 127 // alert(e.responseText); 128 } 129 }); 130} 131 132function old_eventLectureList(event_code, item_typecode, divName){ 133 jQuery.ajax({ 134 url : "/common/pr_event/view/eventLectureList", 135 type : "post", 136 data : "event_code="+event_code+"&item_typecode="+item_typecode+"&divName="+divName, 137 dataType:"json", 138 success : function(data){ 139 if(data.event_gubun == "A"){ 140 //- ê°ì¢ 리ì¤í¸ì ê²½ì° 141 pageViewLectureList(data.products,data.url, divName, data.device_type ); 142 }else if(data.event_gubun == "C"){ 143 //- êµì¬ 리ì¤í¸ì ê²½ì° 144 $("#"+divName).html(data.returnHTML); 145 }else{ 146 $("#"+divName).html("<div class='result_box'>"+data.returnHTML+"</div> <div id='sub_"+divName+"'></div>" ); 147 148 // ëë²ì§¸ í(과목) 149 $('.class_'+data.event_code+' li').click(function(e){ 150 var tab_num = $(this).index() + 1; 151 //과목 í on 152 $(this).siblings('li').removeClass('on'); 153 $(this).addClass('on'); 154 155 //ê°ì¢ ì´ê¸°í 156 $("#sub_"+divName).html(""); 157 158 pageViewStoreCategory($(this).data("store_category_id"), "sub_"+divName, ''); 159 }); 160 161 162 //- ìíì§ì´ì¹´í ê³ ë¦¬ì¸ê²½ì° 163 pageViewStoreCategory(data.key_first_store_category_id, "sub_"+divName,''); 164 } 165 }, 166 error : function(e){ 167 // alert(e.responseText); 168 } 169 }); 170} 171 172/* 173* ì´ë²¤í¸ ê°ì¢ë¦¬ì¤í¸
174* event_code = ì´ë²¤í¸ì½ë 175* item_Typecode = ë¶ë¥ì½ë 176* divName = ê°ì¢ê° ë³´ì¼ ê°ì¢ë¦¬ì¤í¸ 177* 모ë°ì¼ ê°ì¢ë¦¬ì¤í¸ 178*/ 179function eventLectureListM(event_code, item_typecode, divName, userId = ""){ 180 if (Array.isArray(event_code)) { 181 var post_data = {'event_code' : event_code}; 182 } else { 183 var post_data = "event_code="+event_code+"&item_typecode="+item_typecode+"&divName="+divName; 184 } 185 jQuery.ajax({ 186 url : "/common/pr_event/view/eventLectureListM", 187 type : "post", 188 data : post_data, 189 dataType:"json", 190 success : function(data){ 191 if(data.event_gubun == "A"){ 192 //- ê°ì¢ 리ì¤í¸ì ê²½ì° 193 pageViewLectureList(data.products,data.url, divName, 'MO'); 194 } else if(data.event_gubun == "C") { 195 //- êµì¬ 리ì¤í¸ì ê²½ì° 196 $("#" + divName).html(data.returnHTML); 197 } else if(data.event_gubun == 'saleinfo_ids') { 198 pageViewLectureList(data.products,data.url, divName, 'MO'); 199 } 200 }, 201 error : function(e){ 202 // alert(e.responseText); 203 } 204 }); 205} 206 207function old_eventLectureListM(event_code, item_typecode, divName){ 208 jQuery.ajax({ 209 url : "/common/pr_event/view/eventLectureListM", 210 type : "post", 211 data : "event_code="+event_code+"&item_typecode="+item_typecode+"&divName="+divName, 212 dataType:"json", 213 success : function(data){ 214 if(data.event_gubun == "A"){ 215 //- ê°ì¢ 리ì¤í¸ì ê²½ì° 216 pageViewLectureList(data.products,data.url, divName, 'M' ); 217 }else if(data.event_gubun == "C"){ 218 //- êµì¬ 리ì¤í¸ì ê²½ì° 219 $("#"+divName).html(data.returnHTML); 220 }else{ 221 $("#"+divName).html("<div class='result_box'>"+data.returnHTML+"</div> <div id='sub_"+divName+"'></div>" ); 222 223 // ëë²ì§¸ í(과목) 224 $('.slide_nav_'+data.event_code+' div > div').click(function(e){ 225 var tab_num = $(this).index() + 1; 226 //과목 í on 227 $(this).siblings('div').removeClass('on'); 228 $(this).addClass('on'); 229 230 //ê°ì¢ ì´ê¸°í 231 $("#sub_"+divName).html(""); 232 233 pageViewStoreCategory($(this).data("store_category_id"), "sub_"+divName, "M"); 234 }); 235 236 237 //- ìíì§ì´ì¹´í ê³ ë¦¬ì¸ê²½ì° 238 pageViewStoreCategory(data.key_first_store_category_id, "sub_"+divName, "M"); 239 } 240 }, 241 error : function(e){ 242 // alert(e.responseText); 243 } 244 }); 245} 246 247//Dev QA Server Check (1 : DEV, 2: QA , 3: Live) 248var _checkDevServer = function(){ 249 var _result = 3; 250 251 ax_get('/ajax/common/domain/ax_get_server_type', function(ret){ 252 _result = ret.result; 253 }, null, null, 'json', false); 254 255 return _result; 256}; 257 258var $pageViewLectureListCss = "N"; 259//- ìë²ìì í¸ì¶í기 260function pageViewLectureList(arrayProductList, url, divName, device_type){ 261 if( arrayProductList == 0){ 262 if (typeof _no_lecture !== 'undefined') { 263 $("#"+divName).html(_no_lecture()); 264 } else { 265 if (device_type == 'MO' || device_type == 'M') { 266 let html = ''; 267 html += '<aside class="flex sec-empty">'; 268 html += ' <div class="empty-tit">ë±ë¡ë ê°ì ì ë³´ê° ììµëë¤.</div>'; 269 html += '</aside>'; 270 $("#"+divName).html(html); 271 } else { 272 let html = ''; 273 html += '<div class="type_column_box contLec">'; 274 html += ' <div>'; 275 html += ' <div class="lecture_list_wrap">'; 276 html += ' <ul class="lecture_list">'; 277 html += ' <li class="lecture_saleinfo_id">'; 278 html += ' <div class="lecture_info" style="text-align: center;">'; 279 html += ' <div>ë±ë¡ë ê°ì ì ë³´ê° ììµëë¤.</div>'; 280 html += ' </div>'; 281 html += ' </li>'; 282 html += ' </ul>'; 283 html += ' </div>'; 284 html += ' </div>'; 285 html += '</div>'; 286 $("#"+divName).html(html); 287 } 288 } 289 }else{ 290 jQuery.ajax({ 291 url: url, 292 type: "post", 293 dataType: "json", 294 contentType: "application/json", 295 async : true, 296 xhrFields: { 297 withCredentials: true 298 }, 299 data: JSON.stringify({ 300 "biz_code": "GONG", 301 'page' : 20, 302 "view_type": device_type, 303 "condition": { 304 "saleinfo_ids": arrayProductList.join(','), 305 } 306 }), 307 success: function(r) { 308 // console.log(r); 309 if(r.status == 200){ 310 var result = r.result; 311 312 // 모ë°ì¼ 313 if(device_type=='M'){ 314 var _serverType = _checkDevServer(); 315 var _myConects = (_serverType == 3) ? "https://my.conects.com" : 'https://qa-p7-my.conects.com'; 316 317 $('#' + divName).html('<form name="pay_form" id="pay_form" class="pay_form" method="post"></form>'); 318 $('#' + divName + ' .pay_form').html(result.html); 319 $('.cart_proc').click(function(){ 320 $('#' + divName + ' .pay_form').one("submit",function(){ 321 this.target="_parent"; 322 this.action = _myConects + "/payment/cart/add_multiple/"; 323 }).trigger("submit"); 324 }); 325 $('.payment_proc').click(function(){ 326 $('#' + divName + ' .pay_form').one("submit",function(){ 327 this.target="_parent"; 328 this.action = _myConects + "/payment/order/add_multiple/"; 329 }).trigger("submit"); 330 }); 331 332 // 무ë£ê°ì íì´ì§ìì ë¹ë ¸ì¶ ì²ë¦¬ í기 ìí´ 333 if (result.html.indexOf('ììµëë¤') != -1) { 334 $('.free_content_online').removeClass('selected'); 335 $('.free_content_online').next().trigger('click'); 336 } else { 337 $('.free_content_online').addClass('selected'); 338 } 339 340 } else { 341 var html = result.html.replace("class-combine_layerpop-cart","class-combine_layerpop-cart11111"); 342 $("#"+divName).html( '<div class="class-combine_lecture-main">' + html + '</div>'); 343 lecture_checklist(); 344 //$(".class-combine_lecture-main").css("padding-top","40px"); 345 if($pageViewLectureListCss == "N"){ 346 $pageViewLectureListCss = "Y"; 347 348 // $("body").prepend("<link rel='stylesheet' href='//pr.conects.com/css/class_combine/main.css'>"); 349 // $("body").prepend("<link rel='stylesheet' href='//pr.conects.com/css/class_combine/sub.css'>"); 350 // $("body").prepend("<script type='text/javascript' src='//pr.conects.com/js/course/online.js'></script>"); 351 $("body").prepend("<script type='text/javascript' src='/js/common/course_
351common_player.js'></script>"); 352 353 //- ê°ì¢ë¦¬ì¤í¸ ì í í기 354 // _CONECTS_COMMON_PLAYER_.init(); 355 } 356 } 357 } 358 } 359 ,error : function(e){ 360 console.log(e.responseText); 361 } 362 }); 363 } 364} 365 366 367/* 368 * ê°ì¢ë¦¬ì¤í¸ ì¶ê°í¨. 369 */ 370function lecture_checklist(){ 371 372 //_CONECTS_COMMON_PLAYER_.init(); 373 374 $(".btn-popup-textbook").on("click", function () { 375 // newbookAjax($(this).data("saleinfo_id")); 376 }); 377 $(".cart_proc").click(function(){ 378 cart_products_bytag(); 379 }); 380 $(".payment_proc").click(function(){ 381 order_products_bytag(); 382 }); 383 $(".or_plat").click(function(){ 384 console.log(111); 385 }); 386 387 388 $(document).on("click", ".class-combine_popup-dim, .btn-popup-close", function () { 389 390 dimHide("#class-layerpop-textbook"); 391 dimHide(".class-combine_layerpop-list"); //ê°ì¢ë¦¬ì¤í¸ ë ì´ì´ íì ì¨ê¹ì²ë¦¬ 392 $(".class-combine_layerpop-cart").hide(); //ì¥ë°êµ¬ë ë ì´ì´ íì ì¨ê¹ì²ë¦¬ 393 }); 394 $(document).on("click", function (event) { 395 //console.log(event.target.className); 396 if (!(event.target.className == "class-combine_layerpop-cart" || event.target.className == "order-check order-lecture" || event.target.className == "order-check")) { 397 $(".class-combine_layerpop-cart").hide(); 398 } 399 }); 400} 401 402//- ìë²ìì í¸ì¶í기 403function pageViewStoreCategory(key_first_store_category_id, divName, device_type){ 404 if( key_first_store_category_id == 0){ 405 $("#"+divName).html( '<div class="clearfix lecture-list-area"><div class="clearfix lecture-division"><div class="lecture-summary" style="text-align:center">ì¡°íë ê²°ê³¼ê° ììµëë¤.</div></div></div>'); 406 }else{ 407 jQuery.ajax({ 408 url: "/pr_event/view/eventStoreCategory/"+key_first_store_category_id, 409 type: "post", 410 dataType: "json", 411 contentType: "application/json", 412 success: function(data) { 413 pageViewLectureList(data.products,data.url, divName , device_type); 414 } 415 ,error : function(e){ 416 // console.log(e.responseText); 417 } 418 }); 419 } 420} 421 422 423 424 425 426// ê°ì¢ 구매í기 427function order_products_bytag(){ 428 $.ajax({ 429 url: '/common/pr_event/view/whoami', 430 type: 'post', 431 data: {}, 432 success: function (data) { 433 if (data.is_login) { 434 /** form submit **/ 435 var items = $('input[name^=saleinfo_id]:checked'); 436 if (items.length < 1) { 437 alert('구매í ìíì ì íí´ì£¼ì¸ì.'); 438 return; 439 } 440 //- ê°ì¢ê° ì²´í¬ëìëì§ ì¬ë¶ë¥¼ ì²´í¬í¨. 441 var productBookCheck=0; 442 // $(items).each(function(){ 443 // if($(this).data("type") != "product_book"){ 444 // productBookCheck++; 445 // } 446 // }); 447 448 // $(".order-lecture").each(function(){ 449 // if($(this).prop("checked") == true){ 450 // productBookCheck++; 451 // } 452 // }); 453 454 455 var url = ""; 456 457 url = get_host_myclass()['shost'] + 'payment/order/add_multiple'; 458 459 window.f = document.createElement("form"); 460 f.setAttribute('method',"post"); 461 f.setAttribute('action', url); 462 463 items.each(function(i, item){ 464 var i = document.createElement("input"); //input element, text 465 i.setAttribute('type',"text"); 466 i.setAttribute('name',"saleinfo_id[]"); 467 i.setAttribute('value', $(item).attr('value')); 468 f.appendChild(i); 469 }); 470 document.body.appendChild(f); 471 f.submit(); 472 } else { 473 window.location = 'https://member.conects.com/member/login?redirect_url=' + window.location.href; 474 } 475 } 476 }); 477} 478 479 480 481// ê°ì¢ ì¥ë°êµ¬ëë´ê¸° 482// ** SKYEDU ì¬ì© (ìí리ì¤í¸ìì ê²°ì í기 ë²í¼ í´ë¦ì) 483function cart_products_bytag(){ 484 $.ajax({ 485 url: '/pr_event/view/whoami', 486 type: 'post', 487 data: {}, 488 success: function (data) { 489 if (data.is_login) { 490 var items = $('input[name^=saleinfo_id]:checked'); 491 if (items.length < 1) { 492 alert('ì¥ë°êµ¬ëì ë´ì ìíì ì íí´ì£¼ì¸ì.'); 493 return; 494 } 495 496 var items = $('input[name^=saleinfo_id]:checked'); 497 498 //- ê°ì¢ê° ì²´í¬ëìëì§ ì¬ë¶ë¥¼ ì²´í¬í¨. 499 var productBookCheck=0; 500 // $(items).each(function(){ 501 // if($(this).data("type") != "product_book"){ 502 // productBookCheck++; 503 // } 504 // }); 505 506 $(".order-lecture").each(function(){ 507 if($(this).prop("checked") == true){ 508 productBookCheck++; 509 } 510 }); 511 512 513 if ($('iframe[name=mycart]')) $('iframe[name=mycart]').remove(); 514 var url = ""; 515 var myform = document.createElement('form'); 516 myform.name = 'mycart'; 517 if(productBookCheck > 0 ){ 518 url = get_host_myclass()['shost'] + 'payment/cart/add_multiple'; 519 }else{ 520 521 var flg = document.createElement("input"); //input element, text 522 flg.setAttribute('type',"text"); 523 flg.setAttribute('name',"paycartSkyedu"); 524 flg.setAttribute('value',"Y"); 525 myform.appendChild(flg); 526 527 url = '/paycart/payment/payment_book'; 528 } 529 530 myform.action = url 531 myform.target = "cart"; 532 myform.method = "post"; 533 myform.style.display = 'none'; 534 535 items.each(function(i, item){ 536 var i = document.createElement("input"); //input element, text 537 i.setAttribute('type',"text");
538 i.setAttribute('name',"saleinfo_id[]"); 539 i.setAttribute('value', $(item).attr('value')); 540 myform.appendChild(i); 541 }); 542 543 544 545 546 if ($('iframe[name=cart]')) $('iframe[name=cart]').remove(); 547 var iframe = document.createElement('iframe'); 548 iframe.name = 'cart'; 549 // iframe.style.display = 'none'; 550 document.body.appendChild(iframe); 551 document.body.appendChild(myform); 552 myform.submit(); 553 554 if (confirm('ì ííì ìíì´ ì¥ë°êµ¬ëì ë´ê²¼ìµëë¤. ì¥ë°êµ¬ëë¡ ì´ëíìê² ìµëê¹?')) { 555 url = get_host_myclass()['shost'] + 'payment/cart'; 556 window.top.location.href = url; 557 } 558 return; 559 } else { 560 window.location = 'https://member.conects.com/member/login?redirect_url=' + window.location.href; 561 } 562 } 563 }); 564} 565 566 567 568//ë´ê°ìì¤ url 569function get_host_myclass(){ 570 var s = document.URL; 571 572 // ì ê·ìì íµí´ dev-, qa-, sg-ì ê°ì ìë¸ëë©ì¸ ì¶ì¶ 573 var match = s.match(/(https?:\/\/|\/\/)(dev-|qa-|qa-p7-|sg-|)([a-zA-Z0-9-]+)\.conects\.com/); 574 575 // ê¸°ë³¸ê° ì¤ìë²ë¡ ì¸í 576 var data = {'host' : 'http://my.conects.com/', 'shost' : 'https://my.conects.com/'}; 577 578 // íë¡í ì½ + ìë¸ëë©ì¸ + my.conects.com/ì¼ë¡ ë³í 579 if (match) { 580 data.host = match[1] + match[2] + 'my.conects.com/'; 581 data.shost = match[1] + match[2] + 'my.conects.com/'; 582 } 583 584 return data; 585} 586 587function text_copy(){ 588 var t = document.createElement("textarea"); 589 document.body.appendChild(t); 590 591 var text = document.URL; 592 593 t.value = text; 594 t.select(); 595 document.execCommand('copy'); 596 document.body.removeChild(t); 597 alert('ë³µì¬ëììµëë¤:)'); 598} 599 600 601 602jQuery(function(){ 603 //í ë©ë´ ì í 604 jQuery('.box-tab li, .box-tab-fir li').click(function(){ 605 if( jQuery(this).parent('.box-tab-fir').is('.slide-tab')===false ){ 606 jQuery(this).addClass('selected').siblings('li').removeClass('selected'); 607 } 608 }); 609 610 //í ë©ë´ ì í 611 jQuery('.box-tab-sed a, .box-tab-thi a, .tcc-tab a, .box-select-area .fr a, .box-tab-both a').click(function(){ 612 if(jQuery(this).siblings('a').length > 0 ){ 613 jQuery(this).addClass('selected').siblings('a').removeClass('selected'); 614 } 615 else{ 616 jQuery(this).addClass('selected').parents('ul').find('a').not($(this)).removeClass('selected'); 617 } 618 }); 619 620 /* ì¬ë¼ì´ë */ 621 jQuery(".event-layout-container .btn-up-down").click(function(){ 622 var f_children_expr = "img" 623 if( jQuery(this).is("[data-expr]") ) f_children_expr = jQuery(this).attr("data-expr"); 624 625 if( jQuery(this).is("[data-parent]") ){ 626 jQuery(this).children(f_children_expr).toggleClass("hide").parents(jQuery(this).attr("data-parent")).next().stop().slideToggle(); 627 } 628 else{ 629 jQuery(this).children(f_children_expr).toggleClass("hide").parent().next().stop().slideToggle(); 630 } 631 }); 632 633 //기존 ì¤ì¹´ì´ìë í ì ì´ ì¤í¬ë¦½í¸ 634 jQuery(".tab-container a").on('click', function(e){ 635 var $tab = jQuery(this).parents(".tab-container"); 636 var f_intIndex = -1; 637 var f_intPreIndex = -1; 638 639 if( $tab.is("[data-index-class]") ){ 640 if(!jQuery(this).is('[class*="'+ $tab.attr("data-index-class")+'"]')){ 641 return; 642 } 643 else{ 644 f_intIndex = $tab.children("ul").find("." + $tab.attr("data-index-class")).index(jQuery(this)); 645 } 646 } 647 else{ 648 f_intIndex = $tab.children("ul").find("a").index(jQuery(this)); 649 } 650 651 if( jQuery(this).is("[data-type]") ) f_intIndex = -1; 652 653 if(f_intIndex > -1){ 654 e.preventDefault(); 655 $tab.children("ul").find("li").removeClass("on").eq(f_intIndex).addClass("on"); 656 657 if( $tab.is("[data-contents-class]") ){ 658 if(jQuery($tab.attr("data-contents-class")).length > 0){ 659 var $tabContents = jQuery($tab.attr("data-contents-class")).find(".tab-contents-container"); 660 661 if($tab.children("ul").find("li").length == $tabContents.length){ 662 $tabContents.hide().eq(f_intIndex).show().children(".sub-tab").slideDown(); 663 } 664 } 665 } 666 else{ 667 if($tab.children("ul").find("li").length == $tab.parent().children(".tab-contents-container").length){ 668 $tab.parent().children(".tab-contents-container").hide().eq(f_intIndex).show().children(".sub-tab").slideDown(); 669 } 670 } 671 } 672 }); 673 674/* input file */ 675 if($('.input-file').length > 0){ 676 $('.input-file .placeholder').prev().on('keyup',function(){ 677 if($(this).val() != ""){ 678 $(this).css('display','none').removeClass('state-none'); 679 }else{ 680 $(this).css('display','block').addClass('state-none'); 681 } 682 }); 683 684 $('.input-file .btn-select').on('click',function(){ 685 $(this).parents('.input-file').find('input[type="file"]').trigger('click'); 686 }); 687 688 $('.input-file input[type="file"]').change(function(e){ 689 var str = $(this).val(); 690 var strArr = str.split('\\'); 691 var filename = strArr[strArr.length-1]; 692 693 if(! $(this).is("[placeholder]") ) $(this).attr('placeholder', $(this).next('label').find('span').text()); 694 695 if(filename != ""){ 696 $(this).next('label').find('span').text(filename); 697 $(this).next('label').find('span').removeClass('state-none'); 698 } 699 else{ 700 $(this).next('label').find('span').text($(this).attr('placeholder')); 701 $(this).next('label').find('span').addClass('state-none'); 702 } 703 }); 704 } 705/* input file */ 706 707}); 708 709 710//cycle2 slider ì¬ì´í´ ì¬ë¼ì´ëì© (ì¬ë¼ì´ë ì´ë¯¸ì§ ëì´ ê°ê° ë¤ë¥¼ê²½ì° ì¬ë¼ì´ë 컨í ì´ë를 ê°ì¥ 긴 ì¬ë¼ì´ë ëì´ì ë§ì¶° ë³ê²½) 711function getSlideMaxHeight(){ 712 $('.layout-contents-container .slide-container').each(function(idx){ 713 var slideImgHeight; 714 var maxHeight; 715 slideImgHeight = $(this).find('.slide img').one('load', function(){}) 716 .map(function(){ 717 return $(this).prop('naturalHeight'); 718 }).get(); 719 maxHeight = Math.max.apply(null, slideImgHeight ); 720 if(maxHeight == 0){ 721 setTimeout(getSlideMaxHeight,1000); 722 }else{ 723 $(this).css({'height':maxHeight}); 724 } 725 $(this).find($('.cycle-slideshow')).css({'height': 100 + '%'}); 726 }); 727} 728 729 730 731 732/* 733 ìì ajaxë¡ í¸ì¶íë ë¶ë¶ 734*/ 735function fnVodOnloadAutoAjax(vi_viewcode, classname){ 736 jQuery.ajax({ 737 url : "/pr_event/vod/vodinfo/vodViewAuto", 738 type : "post", 739 data : "vi_viewcode="+vi_viewcode, 740 dataType:"json", 741 success : function(data){ 742 if(data.alert=="Y"){ 743 if(data.chkImg == "Y"){ 744 $(classname).html("<img src='"+data.vi_thum_img+"' style='position:absolute;top:0;left:0;cursor:pointer' WIDTH='100%' HEIGHT='100%'>"); 745 746 $(classname).find("img").attr("onclick","alert('"+data.html+"')"); 747 }else{ 748 alert(data.html); 749 } 750 }else{ 751 if(data.chkImg == "Y"){ 752 $(classname).html(data.html); 753 $(classname).find("img").attr("onclick","fnVodOnloadAutoAjax_new('"+vi_viewcode+"', '"+classname+"')") 754 }else{ 755 $(classname).html(data.html); 756 } 757 } 758 // console.log(data.html); 759 }, 760 error : function(e){ 761 // console.log(e.responseText); 762 } 763 }); 764 765} 766 767/* 768 ìì ajaxë¡ í¸ì¶íë ë¶ë¶ 769*/ 770function fnVodOnloadAutoAjax_new(vi_viewcode, classname){ 771 jQuery.ajax({ 772 url : "/pr_event/vod/vodinfo/vodViewAutoNew", 773 type : "post", 774 data : "vi_viewcode="+vi_viewcode, 775 dataType:"json", 776 success : function(data){ 777 $(classname).html(data.html); 778 // console.log(data.html); 779 }, 780 error : function(e){ 781 // console.log(e.responseText); 782 } 783 }); 784 785} 786 787/* 788 ìì ajaxë¡ í¸ì¶íë ë¶ë¶ 789*/ 790function fnVodViewAutoLayer(vi_viewcode, classname){ 791 jQuery.ajax({ 792 url : "/pr_event/vod/vodinfo/vodViewAutoLayer", 793 type : "post", 794 data : "vi_viewcode="+vi_viewcode, 795 dataType:"json", 796 success : function(data){ 797 $(classname).html(data.html); 798 // console.log(data.html); 799
800 /* ìì ë ì´ì´ íì í¸ì¶ */ 801 $('.popMovie').click(function() { 802 _movieId = $(this).data('movie'); 803 _movieId = _movieId.replace('http://pmp.st-company.net/', 'https://d2j2rcmrtco9nl.cloudfront.net/'); 804 805 _movieType = (_movieId.indexOf('.mp4') != -1) ? 'video' : 'iframe'; 806 autoplay = $(this).data('autoplay'); 807 808 $('.dimMovie').html(''); 809 810 if(_movieId.indexOf('player/kollus/open/main') !== -1) { 811 open_win(_movieId, 'lec_player', 800, 600); 812 } else if(_movieId) { 813 _popShow(); 814 } else { 815 alert('ìì ì¤ë¹ ì¤ì ëë¤.'); 816 } 817 }); 818 819 }, 820 error : function(e){ 821 // console.log(e.responseText); 822 } 823 }); 824 825} 826 827 828/* 829 ìì ajaxë¡ í¸ì¶íë ë¶ë¶ mp4ì¶ê°í¨ 830*/ 831function fnVodView(vi_viewcode, classname,w,h){ 832 jQuery.ajax({ 833 url : "/pr_event/vod/vodinfo/fnVodView", 834 type : "post", 835 data : "vi_viewcode="+vi_viewcode+"&w="+w+"&h="+h, 836 dataType:"json", 837 success : function(data){ 838 $(classname).html(data.html); 839 // console.log(data.html); 840 }, 841 error : function(e){ 842 // console.log(e.responseText); 843 } 844 }); 845} 846function fnVodHTML(obj,w,h){ 847 $(obj).html("<iframe src='"+$(obj).data("viurl")+"' frameborder='no' scrolling='no' marginwidth='0' marginheight='0' WIDTH='"+w+"' HEIGHT='"+h+"' allowfullscreen></iframe>") 848 849} 850 851 852 853/* 854ìì idë¡ ì ì´í¨ 855*/ 856function fnVodOnloadObjectIDAjax(vi_viewcode, objectID,w,h){ 857 jQuery.ajax({ 858 url : "/pr_event/vod/vodinfo/vodView", 859 type : "post", 860 data : "vi_viewcode="+vi_viewcode+"&w="+w+"&h="+h, 861 dataType:"html", 862 success : function(data){ 863 var returnVal = jQuery.trim(data); 864 $("#"+objectID).html(returnVal); 865 }, 866 error : function(e){ 867 // console.log(e.responseText); 868 } 869 }); 870 871} 872 873//- í´ë¹ ììì ì´ë¯¸ì§ë¥¼ ë°ê³ í´ë¦íë©´ íì ì¼ë¡ ììì ë³´ì¬ì£¼ê² íë ë¶ë¶ 874function fnVodOnloadObjectIDAjaxPop(vi_viewcode, objectID,w,h){ 875 jQuery.ajax({ 876 url : "/pr_event/vod/vodinfo/vodView_thumPop", 877 type : "post", 878 data : "vi_viewcode="+vi_viewcode+"&w="+w+"&h="+h, 879 dataType:"html", 880 success : function(data){ 881 var returnVal = jQuery.trim(data); 882 $("#"+objectID).html(returnVal); 883 }, 884 error : function(e){ 885 // console.log(e.responseText); 886 } 887 }); 888} 889 890/** 891 * QA ëë©ì¸ììë§ ì¤íëë í¨ì 892 * ë¤ë¥¸ í¨ìììë ì´ í¨ì를 í¸ì¶í´ì QA íê²½ììë§ ì¤íëê² í ì ìì 893 */ 894function check_qa_environment(callback) { 895 const hostname = window.location.hostname; 896 897 // ëë©ì¸ì´ 'qa-'ë¡ ììíë©´ callback ì¤í 898 if (hostname.startsWith('dev-') || hostname.startsWith('qa-') || hostname.startsWith('sg-')) { 899 callback(); 900 } 901} 902 903// 1ê°ìí 구매 (ì.í리í¨ì¤) 904// cash_id: ìºì ìí ID (ì í ì í리í¨ì¤ IDì í¨ê» saleinfo_id[]ë¡ ì ë¬) 905function purchase_one(saleinfo_id, series_of_class, cash_id) { 906 check_qa_environment(() => { 907 alert(`ìíì ë³´ íì¸ì ìí´ì QA/SG íê²½ììë§ ì¤íë©ëë¤!\n\nìí ID : ${saleinfo_id}\nì§ë ¬ ì½ë : ${series_of_class}\nìºì ìí ID : ${cash_id || 'ìì'}`); 908 }); 909 910 var request_uri = jQuery(location).attr('pathname')+jQuery(location).attr('search'); 911 var p_query_string=""; 912 if (request_uri.indexOf("?")>=0){ 913 p_query_string=request_uri.split('?')[1]; 914 } 915 916 var url = ""; 917 if(p_query_string != ""){ 918 url = get_host_myclass()['shost'] + 'payment/order/add_multiple?'+ p_query_string ; 919 // url = 'https://qa-my.conects.com/payment/order/add_multiple?'+ p_query_string ; 920 }else{ 921 url = get_host_myclass()['shost'] + 'payment/order/add_multiple'; 922 } 923 924 925 var f = document.createElement("form"); 926 f.setAttribute('method',"post"); 927 f.setAttribute('target',"_blank"); 928 f.setAttribute('action', url); 929 f.setAttribute('style', "display:none;"); 930 931 // í리í¨ì¤ ìí ID 932 var i = document.createElement("input"); //input element, text 933 i.setAttribute('type',"text"); 934 i.setAttribute('name',"saleinfo_id[]"); 935 i.setAttribute('value', saleinfo_id); 936 f.appendChild(i); 937 938 // ìºì ìí ID (ì íë ê²½ì° í¨ê» ì ë¬) 939 if (cash_id) { 940 var c = document.createElement("input"); 941 c.setAttribute('type',"text");
942 c.setAttribute('name',"saleinfo_id[]"); 943 c.setAttribute('value', cash_id); 944 f.appendChild(c); 945 } 946 947 if (series_of_class) { 948 var i = document.createElement("input"); //input element, text 949 i.setAttribute('type',"text"); 950 i.setAttribute('name',"series_of_class"); 951 i.setAttribute('value', series_of_class); 952 f.appendChild(i); 953 } 954 955 document.body.appendChild(f); 956 f.submit(); 957} 958 959// TESTì© ljb 20220810 960function purchase_one_old(saleinfo_id, series_of_class) { 961 var request_uri = jQuery(location).attr('pathname')+jQuery(location).attr('search'); 962 var p_query_string=""; 963 if (request_uri.indexOf("?")>=0){ 964 p_query_string=request_uri.split('?')[1]; 965 } 966 967 var url = ""; 968 if(p_query_string != ""){ 969 url = get_host_myclass()['shost'] + 'payment/order/add_multiple_old?'+ p_query_string ; 970 }else{ 971 url = get_host_myclass()['shost'] + 'payment/order/add_multiple_old'; 972 } 973 974 975 var f = document.createElement("form"); 976 f.setAttribute('method',"post"); 977 f.setAttribute('target',"_blank"); 978 f.setAttribute('action', url); 979 980 var i = document.createElement("input"); //input element, text 981 i.setAttribute('type',"text"); 982 i.setAttribute('name',"saleinfo_id[]"); 983 i.setAttribute('value', saleinfo_id); 984 f.appendChild(i); 985 986 if (series_of_class) { 987 var i = document.createElement("input"); //input element, text 988 i.setAttribute('type',"text"); 989 i.setAttribute('name',"series_of_class"); 990 i.setAttribute('value', series_of_class); 991 f.appendChild(i); 992 } 993 994 document.body.appendChild(f); 995 f.submit(); 996} 997 998 999 1000// ë¤ì¤ìí 구매 (ì.purchase_orders([ìíì½ë,ìíì½ë])) 1001function purchase_orders(saleinfo_ids) { 1002 var url = get_host_myclass()['shost'] + 'payment/order/add_multiple' ; 1003 1004 var f = document.createElement("form"); 1005 f.setAttribute('method',"post"); 1006 f.setAttribute('target',"_blank"); 1007 f.setAttribute('action', url); 1008
1009 saleinfo_ids.forEach(function(saleinfo_id, i){ 1010 var i = document.createElement("input"); //input element, text 1011 i.setAttribute('type',"text"); 1012 i.setAttribute('name',"saleinfo_id[]"); 1013 i.setAttribute('value', saleinfo_id); 1014 f.appendChild(i); 1015 }); 1016 1017 document.body.appendChild(f); 1018 f.submit(); 1019} 1020 1021// ë¤ì¤ìí 구매 (ì.purchase_orders([ìíì½ë,ìíì½ë])) 1022function purchase_orders_self(saleinfo_ids) { 1023 var url = get_host_myclass()['shost'] + 'payment/order/add_multiple' ; 1024 1025 var f = document.createElement("form"); 1026 f.setAttribute('method',"post"); 1027 f.setAttribute('target',"_self"); 1028 f.setAttribute('action', url); 1029 1030 saleinfo_ids.forEach(function(saleinfo_id, i){ 1031 var i = document.createElement("input"); //input element, text 1032 i.setAttribute('type',"text"); 1033 i.setAttribute('name',"saleinfo_id[]"); 1034 i.setAttribute('value', saleinfo_id); 1035 f.appendChild(i); 1036 }); 1037 1038 document.body.appendChild(f); 1039 f.submit(); 1040} 1041 1042// ìí ë´ê¸° : ìì cart_products([9275,4618]) 1043function cart_products(saleinfo_ids) { 1044 1045 $.ajax({ 1046 url: '/common/pr_event/view/whoami', 1047 type: 'post', 1048 data: {}, 1049 success: function (data) { 1050 if (data.is_login) { 1051 var items = $('input[name^=saleinfo_id]:checked'); 1052 1053 if ($('iframe[name=mycart]')) $('iframe[name=mycart]').remove(); 1054 var myform = document.createElement('form'); 1055 myform.name = 'mycart'; 1056 myform.action = get_host_myclass()['shost'] + 'payment/cart/add_multiple';; 1057 myform.target = "cart"; 1058 myform.method = "post"; 1059 myform.style.display = 'none'; 1060 1061 saleinfo_ids.forEach(function(saleinfo_id, i){ 1062 var i = document.createElement("input"); //input element, text 1063 i.setAttribute('type',"text"); 1064 i.setAttribute('name',"saleinfo_id[]"); 1065 i.setAttribute('value', saleinfo_id); 1066 myform.appendChild(i); 1067 }); 1068 1069 if ($('iframe[name=cart]')) $('iframe[name=cart]').remove(); 1070 var iframe = document.createElement('iframe'); 1071 iframe.name = 'cart'; 1072 iframe.style.display = 'none'; 1073 document.body.appendChild(iframe); 1074 document.body.appendChild(myform); 1075 myform.submit(); 1076 1077 if (confirm('ì ííì ìíì´ ì¥ë°êµ¬ëì ë´ê²¼ìµëë¤. ì¥ë°êµ¬ëë¡ ì´ëíìê² ìµëê¹?')) { 1078 url = get_host_myclass()['shost'] + 'payment/cart'; 1079 window.top.location.href = url; 1080 } 1081 } else { 1082 window.location = 'https://member.dangi.co.kr/authorize/login?redirect_url=' + window.location.href; 1083 } 1084 } 1085 }); 1086} 1087 1088 1089 1090 1091// ë´ ê³µë¶ë°©ì ìíë´ê¸° 1092function my_products(saleinfo_id) { 1093 1094 $.ajax({ 1095 url: '/pr_event/view/whoami', 1096 type: 'post', 1097 data: {}, 1098 success: function (data) { 1099 if (data.is_login) { 1100 $.ajax({ 1101 type:'POST', 1102 url:'/pr_admin/my_page/mypage', 1103 data:"saleinfo_id="+saleinfo_id, 1104 dataType:"json", 1105 success:function(data){ 1106 // console.log(data); 1107 if(data.code==0){ 1108 if (confirm('ì ííì ìíì´ ë´ë³´ê´í¨ì ë´ê²¼ìµëë¤. ë´ë³´ê´í¨ì ì´ëíìê² ìµëê¹?')) { 1109 url = get_host_myclass()['shost'] ; 1110 window.top.location.href = url; 1111 } 1112 }else{ 1113 alert(data.msg); 1114 } 1115 }, 1116 error:function(e){ 1117 console.log("ìíí¸ì¶ì¤í¨"); 1118 } 1119 }); 1120 1121 1122 1123 1124 } else { 1125 window.location = 'https://member.dangi.co.kr/authorize/login?redirect_url=' + window.location.href; 1126 } 1127 } 1128 }); 1129} 1130 1131 1132 1133 1134 // ì¸ì¦ ì ì¥í기 1135 function goUrlSubmitClass(urlGubun){ 1136 1137 $.ajax({ 1138 url: '/pr_event/view/whoami', 1139 type: 'post', 1140 data: {}, 1141 success: function (data) { 1142 if (data.is_login) { 1143 var urlVal = jQuery.trim(jQuery("#urlVal").val()); 1144 1145 var myform = document.createElement('form'); 1146 myform.setAttribute('id',"myForm"); 1147 1148 var flg = document.createElement("input"); //input element, text 1149 flg.setAttribute('type',"text"); 1150 flg.setAttribute('name',"urlVal"); 1151 flg.setAttribute('value',urlVal); 1152 1153 myform.appendChild(flg); 1154 1155 var gubun = document.createElement("input"); //input element, text 1156 gubun.setAttribute('type',"text"); 1157 gubun.setAttribute('name',"gubun"); 1158 gubun.setAttribute('value',urlGubun); 1159 1160 myform.appendChild(gubun); 1161 1162 if (urlVal == ""){ 1163 alert("URLì ì ë ¥í´ì£¼ì¸ì"); 1164 jQuery("#urlVal").focus(); 1165 return; 1166 } 1167 1168 1169 if (urlVal.length >= 8) { 1170 if (!(urlVal.substr(0,7).toLowerCase() == "http://" || url
1170Val.substr(0,8).toLowerCase() == "https://")) { 1171 alert("URLì ë°ëì http://를 í¬í¨íë 주ìì¬ì¼ ì ìì ì¸ ì°¸ì¬ê° ê°ë¥í©ëë¤."); 1172 jQuery("#urlVal").focus(); 1173 return; 1174 } 1175 } else { 1176 alert("URL 주ì 길ì´ê° ë무 ì ìµëë¤"); 1177 jQuery("#urlVal").focus(); 1178 return; 1179 } 1180 1181 jQuery.ajax({ 1182 url : "/pr_event/view/url_auth_action", 1183 type : "post", 1184 data : $(myform).serialize(), 1185 dataType:"text", 1186 success : function(data){ 1187 var returnVal = jQuery.trim(data); 1188 1189 // ë¡ê·¸ì¸ ì²´í¬ 1190 if (returnVal == "LOGIN_NO") { 1191 window.location = 'https://member.dangi.co.kr/authorize/login?redirect_url=' + window.location.href; 1192 return; 1193 //- url ì²´í¬ 1194 }else if (returnVal == "URL_NO"){ 1195 alert("URLì ì ë ¥í´ì£¼ì¸ì.2"); 1196 return; 1197 //- ì¸ì¦ë§ë£ 1198 }else if (returnVal == "CNT_END"){ 1199 alert("ì´ë¯¸ ì¸ì¦ ìë£ëììµëë¤."); 1200 jQuery("#urlVal").val(""); 1201 return; 1202 //- ìë£ 1203 }else if (returnVal == "OK" ){ 1204 alert("ì¸ì¦ì´ ìë£ ëììµëë¤."); 1205 jQuery("#urlVal").val(""); 1206 //- ì¤ë¥ 1207 }else if (returnVal == "URL_AUTH_NO"){ 1208 alert("ì´ë¯¸ ì¸ì¦í URLì ëë¤."); 1209 jQuery("#urlVal").val(""); 1210 return; 1211 }else if (returnVal == "False"){ 1212 alert("ì¸ì¦ì ì¤í¨íìµëë¤ ê³ ê°ì¼í°ì 문ì주ì¸ì."); 1213 return; 1214 }else{ 1215 // console.log(data); 1216 // console.log("ì ì¥ì ì¤ë¥ê° ë°ìëììµëë¤."); 1217 } 1218 1219 }, 1220 error : function(e){ 1221 // console.log(e.responseText); 1222 } 1223 }); 1224 1225 1226 1227 } else { 1228 window.location = 'https://member.dangi.co.kr/authorize/login?redirect_url=' + window.location.href; 1229 } 1230 } 1231 }); 1232 } 1233 1234 1235 1236 /* 1237 ì ìì¬í ë£ê¸° 1238 param 1 pageUrlì´ë¼ê³ íê³ í¤ë¼ê³ íë¤. 1239 param 2 objectì´ë¼ê³ íê³ ì ìì¬í ë¶ë ë¶ë¶ 1240 */ 1241 function eventNoticeHTML(pageUrl, object) { 1242 $.ajax({ 1243 url : "/st_lib/event/page_ajax/notice", 1244 type : "post", 1245 dataType:"html", 1246 data: "pageUrl="+pageUrl, 1247 success : function(data){ 1248 $(object).html(data) 1249 }, 1250 error : function(e){ 1251 // console.log(e.responseText); 1252 } 1253 }); 1254 } 1255 1256 1257 /* 1258 문구 í¸ì¶ 1259 param 1 pageUrlì´ë¼ê³ íê³ í¤ë¼ê³ íë¤. 1260 param 2 objectì´ë¼ê³ íê³ ì ìì¬í ë¶ë ë¶ë¶ 1261 */ 1262 function eventNoticeContent(pageUrl, object){ 1263 1264 $.ajax({ 1265 url : "/gong/event/page_ajax/ment_content_detail", 1266 type : "post", 1267 dataType:"html", 1268 data: "pageUrl="+pageUrl, 1269 success : function(data){ 1270 1271 $(object).html(data) 1272 }, 1273 error : function(e){ 1274 // console.log(e.responseText); 1275 } 1276 }); 1277 } 1278 1279 1280 1281 /* 1282 ì¿ í° ì§ê¸ 1283 */ 1284 function set_discount_coupon(discount_coupon_id,msg){ 1285 1286 if(_loginCheck("ë¡ê·¸ í ì°¸ì¬ ê°ë¥í©ëë¤.")){ 1287 return; 1288 } 1289 if(msg == ""){ 1290 // msg = "20ë§ì í ì¸ì¿ í°ì´ ë°ê¸ëììµëë¤\në°ê¸ë ì¿ í°ì ì¤ë ì멸ë©ëë¤." 1291 msg = "ì¿ í°ì´ ì§ê¸ëììµëë¤." 1292 } 1293 1294 var _data = {}; 1295 1296 _data = { 1297 "discount_coupon_id": discount_coupon_id, 1298 "coupon_limit" : 1, 1299 }; 1300 1301 ax_post("/ajax/common/coupon/ax_set_discount_coupon", _data, function(ret){ 1302 if(ret.status==200) 1303 { 1304 alert(msg); 1305 } 1306 else 1307 { 1308 alert(ret.systemMsg); 1309 } 1310 1311 }, null, null, 'json'); 1312 } 1313 1314 /* 1315 * ì´ë²¤í¸ ì¿ í° ë° ë¬´ë£ìí ì§ê¸ 1316 * division_code = ì§ê¸ ì½ë 1317 */ 1318 var getDiscount = { 1319 init : function(division_code) { 1320 var status = 500; 1321 var systemMsg = ''; 1322 1323 jQuery.ajax({ 1324 url : "/pr_event/discount", 1325 type : "post", 1326 data : {"division_code": division_code}, 1327 dataType:"json", 1328 async : false, 1329 success : function(data) { 1330 status = data.status; 1331 systemMsg = data.systemMsg; 1332 }, 1333 error : function(e){ 1334 // alert(e.responseText); 1335 } 1336 }); 1337 1338 return { 1339 'status': status, 1340 'systemMsg': systemMsg, 1341 } 1342 }, 1343 issue : function(division_code) { 1344 var result = getDiscount.init(division_code); 1345 alert(result.systemMsg); 1346 }, 1347 url : function(division_code, url) { 1348 var result = getDiscount.init(division_code); 1349 if (result.status == 200) { 1350 document.location.href(url); 1351 } 1352 } 1353 };
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.