1/** 2 * æåã³ã¼ã UTF-8N æ¹è¡ã³ã¼ãLF 3 * 4 * @package BXI 5 * @copyright Copyright (c) 2018-2024 E TRUST, INC 6 * @version BXI v5.6.12 240404 7 */ 8function showAjaxError(jqxhr, status, error) { 9 console.log(jqxhr.responseText); 10 if (status) alert(status + "\n" + error); 11 else alert("ã¨ã©ã¼\n" + error); 12} 13function isPreview() { 14 if (location.href.indexOf("bxi/browse.html") > -1) return true; 15 else if (location.href.indexOf("bxi/blog_preview.html") > -1) return true; 16 else if (location.href.indexOf("bxi/recruit_browse.html") > -1) return true; 17 else return false; 18} 19function isBlogPage() { 20 if (location.href.indexOf("blog/") > -1) return true; 21 else return false; 22} 23function isPageClass() { 24 if (location.href.indexOf("html.php") > -1) return false; 25 else if (location.href.indexOf("shop/") > -1) return false; 26 else if (location.href.indexOf("blog/") > -1) return false; 27 else if (location.href.indexOf("sns/") > -1) return false; 28 else if (location.href.indexOf("customer/") > -1) return false; 29 else return true; 30} 31function trimTag(str) { 32 return str.replace(/<("[^"]*"|'[^']*'|[^'">])*>/g,''); 33} 34function translate(lang) { 35 if (lang == undefined) return; 36 var text = []; 37 $(".translate").each(function() { 38 if ($(this).prop("tagName") == "DIV") { 39 //text.push($(this).attr("id") + "|::|" + trimTag($(this).prev().html())); 40 text.push($(this).attr("id") + "|::|" + $(this).prev().html()); 41 } else { 42 //text.push($(this).attr("id") + "|::|" + trimTag($(this).html())); 43 text.push($(this).attr("id") + "|::|" + $(this).html()); 44 } 45 }); 46 if (text.length == 0) return; 47 $("div#builingual div.progress").show(); 48 $("div#builingual div.language").hide(); 49 console.log(lang); 50 51 $.post(location.href, { "function": "getWords", "text": text, "lang": lang }, function(res) { 52 if (res.status != "SUCCEED") alert(res.text); 53 $(".translate").each(function() { 54 if ($(this).prop("tagName") == "DIV") { 55 if (!res.replace) $(this).html(res.text[$(this).attr("id")]); 56 else $(this).prev().html(res.text[$(this).attr("id")]); 57 } else { 58 if (!res.replace) $(this).next("span").html(res.text[$(this).attr("id")]); 59 else $(this).html(res.text[$(this).attr("id")]); 60 } 61 $("div#builingual div.progress").hide(); 62 $("div#builingual div.language").show(); 63 }); 64 }, "json").fail(showAjaxError); 65} 66var page = { 67 "margin": 50 68}; 69function scrollIndex(index) { 70 var top = $(`#${index}`).offset().top - page.margin; 71 $("body,html").animate({scrollTop: top}); 72} 73var kuroneko = { 74 "$form": null, 75 "getToken": function($form) { 76 console.log("kuroneko.getToken()"); 77 78 var data = {}; 79 data.traderCode = $("input#traderCode", $form).val(); 80 data.authDiv = "2"; 81 data.optServDiv = "00"; 82 data.checkSum = $("input#checkSum", $form).val(); 83 data.cardNo = $("input#card_number", $form).val(); 84 data.cardOwner = $("input#card_name", $form).val(); 85 data.cardExp = $("input#card_month", $form).val() + $("input#card_year", $form).val(); 86 data.securityCode = $("input#card_security", $form).val(); 87 //console.log(data);return; 88 kuroneko.$form = $form; 89 $("img.load", kuroneko.$form).show(); 90 WebcollectTokenLib.createToken(data, kuroneko.success, kuroneko.failure); 91 }, 92 "success": function(res) { 93 console.log(res.token); 94 var data = {}; 95 data.token = res.token; 96 data.action = "accept"; 97 $.post(location.href, data, function (res) { 98 if (res.hasError) { 99 console.log(res.text); alert(res.text); 100 $("img.load", kuroneko.$form).hide(); 101 $("button.accept", kuroneko.$form).removeAttr("disabled"); 102 } else { 103 location.href = res.url; 104 } 105 }, "json").fail(showAjaxError); 106 }, 107 "failure": function(res) { 108 console.log(res); 109 alert(res.errorInfo[0].errorMsg); 110 $("img.load", kuroneko.$form).hide(); 111 $("button.accept", kuroneko.$form).removeAttr("disabled"); 112 } 113}; 114$(function() { 115 console.log(location.href); 116 // note: ã«ã¬ã³ãã¼å¶æ¥æ¥ã¯ãªãã¯
117 $("div#form_calendar").on("click", "td.open.reserv", function() { 118 if (isPreview() || !isPageClass()) return false; 119 var data = {}; 120 data.date = $(this).data("date"); 121 data.reserv_type = $("div#form_calendar input[name='reserv_type']").val(); 122 data.reserv_time_csv = $("div#form_calendar input#reserv_time_csv").val(); 123 data.n_limit = $("div#form_calendar input#n_limit").val(); 124 if ($("div#form_calendar input#n_range").length > 0) data.n_range = $("div#form_calendar input#n_range").val(); 125 data.action = "selectDate"; 126 if ($("section form input[name='MLID']").length) data.MLID = $("section form input[name='MLID']").val(); 127 $.post(location.href, data, function(res) { 128 if (res.status != "SUCCEED") { if (res.text) alert(res.text); } 129 else $("div#form_calendar div.reserv").html(res.text); 130 }, "json").fail(showAjaxError); 131 }); 132 // note: ã«ã¬ã³ãã¼ åæã¸ç§»å 133 $("div#form_calendar").on("click", "span.prev", function() { 134 if (isPreview()) return false; 135 var data = {}; 136 data.month = $("div#form_calendar span.prev").data("month"); 137 data.open_day = $("div#form_calendar input[name='open_day']").val(); 138 data.close_day = $("div#form_calendar input[name='close_day']").val(); 139 data.close_days = $("div#form_calendar input[name='close_days']").val(); 140 data.action = "moveCalendar"; 141 if ($("section form input[name='MLID']").length) data.MLID = $("section form input[name='MLID']").val(); 142 $.post(location.href, data, function(res) { 143 if (res.status != "SUCCEED") console.log(res.text); 144 else $("div#form_calendar").html(res.text); 145 }, "json").fail(showAjaxError); 146 }); 147 // note: ã«ã¬ã³ã㼠次æã¸ç§»å 148 $("div#form_calendar").on("click", "span.next", function() { 149 if (isPreview()) return false; 150 var data = {}; 151 data.month = $("div#form_calendar span.next").data("month"); 152 data.open_day = $("div#form_calendar input[name='open_day']").val(); 153 data.close_day = $("div#form_calendar input[name='close_day']").val(); 154 data.close_days = $("div#form_calendar input[name='close_days']").val(); 155 data.action = "moveCalendar"; 156 if ($("section form input[name='MLID']").length) data.MLID = $("section form input[name='MLID']").val(); 157 $.post(location.href, data, function(res) { 158 if (res.status != "SUCCEED") console.log(res.text); 159 else $("div#form_calendar").html(res.text); 160 }, "json").fail(showAjaxError); 161 }); 162 // note: äºç´æéã»ã«é¸æ 163 $("div#form_calendar div.reserv").on("click", ".range table tbody td", function() { 164 $("input[type=radio]", $(this)).prop("checked", true); 165 }); 166 // note: 翻訳å®è¡ 167 translate($("div#builingual select").val()); 168 $("div#builingual select").on("change", function() { translate($(this).val()); }); 169 // note: ã¹ã¢ã¼ã«ç»åã¯ãªãã¯ï¼ã¢ã¤ãã è©³ç´°ï¼ 170 $("article.item div.small img").on("click", function() { 171 var photo = $(this).closest("div.photo"); 172 if ($("div.large img", photo).length == 0) return; 173 $("div.large img", photo).attr("src", $(this).attr("src")); 174 }); 175 // note: SKUï¼ã¯ãªãã¯ï¼ã¢ã¤ãã è©³ç´°ï¼ 176 $("div.sku1 ul li").on("click", function() { 177 if (isPreview()) return false; 178 var parent = $(this).closest("div.sku1"); 179 var get = {}; 180 if ($(this).data("category") != "") get["category"] = $(this).data("category"); 181 get["item_number"] = parent.data("item_number"); 182 get["sku1"] = $(this).data("sku1"); 183 location.href = "?" + $.param(get); 184 }); 185 // note: SKU2ã¯ãªãã¯ï¼ã¢ã¤ãã è©³ç´°ï¼ 186 $("div.sku2 ul li.instock").on("click", function() { 187 if (isPreview()) return false; 188 var parent = $(this).closest("div.sku2"); 189 var get = {}; 190 if (parent.data("category") != "") get["category"] = parent.data("category"); 191 get["item_number"] = parent.data("item_number"); 192 get["sku1"] = $("ul li.selected", parent.prev()).data("sku1"); 193 get["sku2"] = $(this).data("sku2"); 194 location.href = "?" + $.param(get); 195 }); 196 // note: ã«ã¼ã表示ã¡ã½ãã 197 var loadCart = function() { 198 $.post(location.href, {"action":"loadCart"}, function(res) { 199 if (res.status != "SUCCEED") { if (res.text != "") alert(res.text); return; } 200 $("#cart").html(res.html); 201 }
201, "json").fail(showAjaxError); 202 }; 203 // note: ã«ã¼ãã«å ¥ããï¼ã¢ã¤ãã è©³ç´°ï¼ 204 $("div.item_view").on("click", "button.addcart", function() { 205 if (isPreview()) return false; 206 $.post(location.href, $(this).closest("form").serialize(), function(res) { 207 if (res.status != "SUCCEED") { if (res.text != "") alert(res.text); return; } 208 if (res.url != undefined) location.href = res.url; 209 else if ($("#cart").length > 0) $("#cart").html(res.html); 210 }, "json").fail(showAjaxError); 211 return false; 212 }); 213 // note: ãã¹ã¦ã«ã¼ãã«å ¥ããï¼ãã³ãã«ï¼ 214 $("div.bundle").on("click", "button.addcart.all", function() { 215 var data = {}; 216 data.item_numbers = $("input[name=item_numbers]", $(this).parent()).val(); 217 data.action = "addCartAll"; 218 $.post(location.href, data, function(res) { 219 if (res.status != "SUCCEED") { if (res.text != "") alert(res.text); return; } 220 if (res.url != undefined) location.href = res.url; 221 else if ($("#cart").length > 0) $("#cart").html(res.html); 222 }, "json").fail(showAjaxError); 223 return false; 224 }); 225 // note: ã«ã¼ãã«å ¥ããï¼ã¢ã¤ãã ãªã¹ãï¼ 226 // modified: 201204 åºå®ãã¼ã¸ãã¹è¿½å 227 $("div.items").on("click", "button", function() { 228 if (isPreview()) return false; 229 var data = {}; 230 data.item_number = $(this).data("number"); 231 data.item_name = $(this).data("name"); 232 if ($(this).data("file") != undefined) data.file_name = $(this).data("file"); 233 data.photo = $(this).data("photo"); 234 data.n_price = $(this).data("price"); 235 data.n_order = "1"; 236 data.postage = $(this).data("postage"); 237 data.postage_name = $(this).data("postagename"); 238 data.n_deliv = $(this).data("deliv"); 239 data.n_point = $(this).data("point"); 240 data.action = "addCart"; 241 //console.log(data); 242 $.post(location.href, data, function(res) { 243 if (res.status != "SUCCEED") { if (res.text != "") alert(res.text); return; } 244 if (res.url != undefined) location.href = res.url; 245 else if ($("#cart").length > 0) $("#cart").html(res.html); 246 }, "json").fail(showAjaxError); 247 return false; 248 }); 249 // note: ã«ã¼ãæ´æ° 250 $("#cart").on("click", "a.update", function() { 251 var parent = $(this).closest("li"); 252 var data = {}; 253 data.key = parent.data("key"); 254 data.n_order = $("input", parent).val(); 255 data.action = "updateCart"; 256 $.post(location.href, data, function(res) { 257 if (res.status != "SUCCEED") { if (res.text != "") alert(res.text); } 258 loadCart(); 259 }, "json").fail(showAjaxError); 260 }); 261 // note: ã«ã¼ãåé¤ 262 $("#cart").on("click", "a.remove", function() { 263 var parent = $(this).closest("li"); 264 var data = {}; 265 data.key = parent.data("key"); 266 data.action = "removeCart"; 267 $.post(location.href, data, function(res) { 268 if (res.status != "SUCCEED") { if (res.text != "") alert(res.text); return; } 269 $("#cart").html(res.html); 270 }, "json").fail(showAjaxError); 271 }); 272 // note: ã¬ã¸ã«é²ã 273 $("body").on("click", "button.purchase", function() { 274 $.post(location.href, { "action": "purchase" }, function(res) { 275 if (res.status != "SUCCEED") { if (res.text != "") alert(res.text); return; } 276 location.href = res.url; 277 }, "json").fail(showAjaxError); 278 }); 279 // note: ã«ã¼ãè¦ç´ ãããå ´åã«ã«ã¼ãã表示ãã 280 if ($("#cart").length > 0) { 281 var page = location.href.split('/').pop().split('?')[0]; 282 if (page.indexOf("purchase_") == -1) loadCart(); 283 } 284 $("div.form_wrap.login button").on("click", function() { 285 var data = {}; 286 data.email = $("input#email").val(); 287 data.passwd = $("input#passwd").val(); 288 data.action = "mailFormLogin"; 289 if (data.email == "" || data.passwd == "") { 290 alert("E-mailã¢ãã¬ã¹ã¨ãã¹ã¯ã¼ããå ¥åãã¦ãã ããã"); 291 return false; 292 } 293 $.post(location.href, data, function(res) { 294 if (res.status != "SUCCEED") { if (res.text != "") alert(res.text); } 295 else location.reload(); 296 }
296, "json").fail(showAjaxError); 297 return false; 298 }); 299 $("form a.remainder").on("click", function() { 300 var data = {}; 301 data.email = $("input#email").val(); 302 data.action = "mailFormRemaind"; 303 if (data.email == "") { 304 alert("E-mailã¢ãã¬ã¹ãå ¥åãã¦ãã ããã"); 305 return; 306 } 307 $.post(location.href, data, function(res) { 308 if (res.text != "") alert(res.text); 309 }, "json").fail(showAjaxError); 310 }); 311 // note: ã«ã¹ã¿ãã¼ãã°ã¢ã¦ã 312 $("#customer").on("click", "a", function() { 313 if (!confirm("ãã°ã¢ã¦ããã¦ãããããã§ããï¼")) return; 314 $.post(location.href, {"action": "logoutCustomer"}, function(res) { 315 if (res.status != "SUCCEED") { if (res.text != "") alert(res.text); } 316 else location.reload(); 317 }, "json").fail(showAjaxError); 318 }); 319 // note: ã«ã¹ã¿ãã¼è¦ç´ ãããå ´åã«ãã°ã¤ã³ä¼å¡ã表示ãã 320 if ($("#customer").length > 0) { 321 $.post(location.href, {"action": "loadCustomerLogin"}, function(res) { 322 if (res.status != "SUCCEED") { if (res.text != "") alert(res.text); } 323 else $("#customer").html(res.html); 324 }, "json").fail(showAjaxError); 325 } 326 // note: çµãè¾¼ã¿æ¤ç´¢ 327 var search = function() { 328 if (isPreview()) return false; 329 $.post(location.href, $("#search").serialize(), function(res) { 330 if (res.url != "") location.href = res.url; 331 else location.reload(); 332 }, "json").fail(showAjaxError); 333 }; 334 $("#search select").on("change", search); 335 $("#search input[type=radio]").on("click", search); 336 $("#search input[type=checkbox]").on("click", search); 337 $("#search input[type=text]").on("keypress", function(e) { 338 if (e.which == 13 && !isBlogPage()) search(); 339 }); 340 $("#search_2 a").on("click", function() { 341 search(); 342 }); 343 // note: ãã¹ã¯ã¼ããã¼ã¸ã«å¯è¦åã¢ã¤ã³ã³è¿½å 344 if ($(location).attr("pathname") == "/passwd.html") { 345 $("input[name=passwd]").after("<a></a>"); 346 $("input[name=passwd]").parent().addClass("passwd"); 347 } 348 // note: ãã¹ã¯ã¼ãå¯è¦å 349 $(".passwd input + a").on("click", function() { 350 if ($(this).prev().attr("type") == "text") $(this).prev().attr("type", "password"); 351 else $(this).prev().attr("type", "text"); 352 }); 353 // note: Enterç¡å¹å 354 $("form div.purchase input, div.purchase form input").on("keydown", function(e) { 355 if (e.keyCode == 13) { console.log("keydown"); return false; } 356 }); 357 // note: ãã¡ã¤ã«ãã¦ã³ãã¼ã 358 $("div.form_download button").on("click", function() { 359 var data = {}; 360 data.file = $(this).data("file"); 361 data.key = $(this).data("key"); 362 data.action = "checkDownload"; 363 $.post(location.href, data, function(res) { 364 if (res.hasError) alert(res.text); 365 else { 366 delete data.action; 367 location.href = location.href + "?" + $.param(data); 368 } 369 }, "json").fail(showAjaxError); 370 }); 371 // note: ç®æ¬¡ã¹ã¯ãã¼ã« 372 $("div.bxi_index ol li span").on("click", function() { 373 scrollIndex($(this).data("index")); 374 }); 375});
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.