1jQuery(document).ready(function() { 2 var s_width = 60; 3 var l_width = 200; 4 if (document.URL.match("cart.aspx")) { 5 return false; 6 } 7 var $btn_cart = jQuery(".js-animation-add-cart"); 8 $btn_cart.off("click"); 9 $btn_cart.on("click", function(e) { 10 var loadStart = function(elem) { 11 jQuery(elem).addClass("js-animation-add-cart-in-progress"); 12 jQuery(elem).html('<i class="fa fa-spinner fa-pulse fa-fw"></i><span class="sr-only">ãå¾ ã¡ãã ãã...</span>'); 13 return elem; 14 }; 15 var loadEnd = function(elem, iserror) { 16 if (!iserror) { 17 eclib.ui.showToolTip(jQuery(elem), { tooltip : "è²·ãç©ããã«å ¥ãã¾ãã", diptimeSec : 1 }); 18 setTimeout(function() { 19 jQuery(elem).removeClass("js-animation-add-cart-in-progress"); 20 jQuery(elem).html('è²·ãç©ããã«å ¥ãã'); 21 }, 1400); 22 } else { 23 jQuery(elem).removeClass("js-animation-add-cart-in-progress"); 24 jQuery(elem).html('è²·ãç©ããã«å ¥ãã'); 25 } 26 }; 27 var addCart = function(b, g) { 28 var o = loadStart(b); 29 jQuery.ajax({ 30 async: true, 31 type: "POST", 32 url: EC_WWW_ROOT + "/shop/js/addcart.aspx", 33 data: { 34 "goods": goods, 35 "crsirefo_hidden": crsirefo_jscart 36 }, 37 cache: false, 38 ifModified: false, 39 dataType: "json", 40 success: function(msg) { 41 if ("loadABtest" in window) { 42 saveBlockClickLog("jscart"); 43 } 44 if (typeof(ga) == "function") { 45 ga('send', 'pageview', { 46 'page': EC_WWW_ROOT + '/shop/cart/addcart.aspx?goods=' + goods, 47 'title': 'AddCart' 48 }); 49 } 50 if (msg && msg.length > 0) { 51 alert(msg.join("\r\n").replace(/<\/?[^>]+>/gi, "")); 52 loadEnd(o, true); 53 return false; 54 } 55 if (jQuery("#jscart_replace_").length > 0) { 56 var self = function(isDelete) { 57 jQuery("#jscart_replace_").load(EC_WWW_ROOT + "/shop/js/cart.aspx", function() { 58 jQuery(".js-jscart-delete-btn").each(function() { 59 var cart = jQuery(this).attr("data-cart"); 60 jQuery(this).bind("click", function() { 61 jQuery("#js_jscart_items_" + cart).slideUp("normal", function() { 62 jQuery(this).remove(); 63 jQuery.ajax({ 64 type: "POST", 65 url: EC_WWW_ROOT + "/shop/js/delcart.aspx", 66 data: { 67 "cart": cart, 68 "crsirefo_hidden": crsirefo_jscart 69 }, 70 cache: false, 71 success: function() { 72 self(true); 73 } 74 }); 75 }); 76 }); 77 }); 78 if (!isDelete) { 79 setTimeout(function() { 80 loadEnd(o, false); 81 }, 400); 82 } 83 }); 84 }; 85 self(false); 86 } else { 87 setTimeout(function() { 88 loadEnd(o, false); 89 }, 400); 90 } 91 }, 92 error: function(xhr, status, thrown) { 93 loadEnd(o, true); 94 alert("ã»ãã·ã§ã³ã®æå¹æéãããã¾ããã\n" + "èª ã«æãå ¥ãã¾ããå度ããããã¼ã¸ããã®ã¢ã¯ã»ã¹ããé¡ããããã¾ãã\n\n" + "â»å½ãµã¤ãã§ã¯ã客æ§ã®æ å ±ä¿è·ã®ãããä¸å®æéçµéå¾ã«æ¥ç¶æ å ±ãè§£é¤ããã¦ããã ãã¦ããã¾ãã"); 95 return false; 96 } 97 }); 98 return true; 99 }; 100 if (jQuery(this).hasClass("js-animation-add-cart-in-progress")) { 101 return false; 102 } 103 var href = jQuery(this).attr("href"); 104 var re = new RegExp("goods=([0-9A-Za-z_\-]+)"); 105 var matches = href.match(re); 106 var goods = ""; 107 if (matches && matches.length == 2) { 108 goods = matches[1]; 109 } else { 110 return true; 111 } 112 if (jQuery("#agree_" + goods).length > 0) { 113 var btn = this; 114 eclib.ui.dialog('agree_' + goods, { 115 width : '400px', 116 buttons : { 117 'btnAgree' : function(action) { 118 addCart(btn, goods); 119 action.close(); 120 } 121 ,'btnNotAgree' : function(action) { 122 action.close(); 123 } 124 } 125 }); 126 127 } else { 128 addCart(this, goods); 129 return false; 130 } 131 return false; 132 });
vendor: 3 bytes, line 133
133});
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.