1//ãã©ã¼ã ã®åºæ¬è¨å® 2$(function() { 3 //Contact Form7 Enterã§éä¿¡ããªãããã«ããå¦ç 4 function submitStop(e){ 5 if (!e) { 6 e = window.event; 7 } 8 if(e.keyCode == 13) { 9 return false; 10 } 11 } 12 window.onload = function (){ 13 var list = document.getElementsByTagName("input"); 14 for(var i=0; i < list.length; i++) { 15 if(list[i].type == 'email' || list[i].type == 'password'|| list[i].type == 'text'|| list[i].type == 'number') { 16 list[i].onkeypress = function (event) { 17 return submitStop(event); 18 }; 19 } 20 } 21 } 22 //Tabãã¼ãç¡å¹ã« 23 window.onkeydown = function(e) { 24 if (e.keyCode == 9) { 25 return false; 26 } 27 } 28 //確èªç»é¢åãæ¿ã 29 let $cConfirm = '.js-consultationConfirm', 30 $cInput = '.js-consultationInput'; 31 $($cConfirm).hide();//åæç¢ºèªç»é¢é表示㫠32 $(document).on('click', '.js-changeConfirm', function() { 33 let $cHed = '.js-consultationHeading'; 34 $($cHed).children('.m-input').addClass('m-hide'); 35 $($cHed).children('.m-confirm').removeClass('m-hide'); 36 37 $($cInput).addClass('m-hide'); 38 $($cConfirm).show(); 39 }); 40 41 //äºç´ç³ãè¾¼ã¿ã®ã¹ã©ã¤ãã¼ 42 const applySwiper = new Swiper("#consultation .apply.swiper", { 43 slidesPerView: 'auto', 44 centeredSlides: true, 45 autoHeight: true, 46 allowTouchMove: false, 47 calculateHeight: true, 48 //ããã²ã¼ã·ã§ã³ãã¿ã³ï¼ç¢å°ï¼è¡¨ç¤ºã®è¨å® 49 navigation: { 50 nextEl: '.swiper-text-button-next', //ãæ¬¡ã¸ãã¿ã³ãè¦ç´ ã®æå® 51 prevEl: '.swiper-text-button-prev', //ãåã¸ãã¿ã³ãè¦ç´ ã®æå® 52 }, 53 pagination: { 54 el: '.swiper-pagination', 55 type: 'fraction', 56 } 57 }); 58 $('.swiper-text-button-prev, .swiper-text-button-next').on('click', function() { 59 $('html,body').scrollTop(0); 60 }); 61 62 /* ä¿®æ£ç»é¢è¡¨ç¤ºã»é表示 63 ---------------------------------------*/ 64 //ã¯ã©ã¹å®£è¨ 65 let $eBtn = '.js-editButton', 66 $eFix = '.js-editFix', 67 $eCls = '.js-editClose', 68 $eStp = '.js-edtitStep'; 69 $(document).on('click', $eBtn, function() { 70 $($cInput).addClass('m-edit'); 71 72 //stepã®åå¾ 73 var $editStep = $(this).data('step'); 74 applySwiper.slideTo($editStep - 1); 75 }); 76 $(document).on('click', $eCls, function() { 77 $($cInput).removeClass('m-edit'); 78 $($eStp).removeClass('m-edit'); 79 }); 80 81 //ããªãã¼ã·ã§ã³ã®è¨å® 82 $('.js-checkText, .js-desiredDate, .js-desiredTime input').addClass('validate[required]'); 83 $('.js-checkTel').addClass('validate[required,custom[phone]]'); 84 $('.js-checkEmail').addClass('validate[required,custom[email]]'); 85 $('#formValidation').validationEngine(); 86 //é常ãã§ã㯠87 $(document).on('blur', '.js-checkText, .js-checkTel, .js-checkEmail', function() { 88 setTimeout($.proxy(function(){
89 if($(this).validationEngine('validate')) { 90 $(this).removeClass('m-error'); 91 $(this).parent().next().children('.js-desiredErrorText').removeClass('m-error'); 92 }else { 93 $(this).addClass('m-error'); 94 $(this).parent().next().children('.js-desiredErrorText').addClass('m-error'); 95 } 96 } ,this),1000); 97 }); 98 //叿æ¥ãã§ã㯠99 $(document).on('change', '.js-desiredDate, .js-desiredTime input', function() { 100 let $date = $(this).parents('.js-desiredWrap').find('.js-desiredDate'), 101 $time = $(this).parents('.js-desiredWrap').find('.js-desiredTime input'), 102 $errorDate = $(this).parents('.js-desiredWrap').find('.js-desiredErrorDate'), 103 $errorTime = $(this).parents('.js-desiredWrap').find('.js-desiredErrorTime'), 104 $errorBoth = $(this).parents('.js-desiredWrap').find('.js-desiredErrorText'); 105 setTimeout(function() { 106 if($date.validationEngine('validate')) { 107 if($time.validationEngine('validate')) { 108 //ã¨ã©ã¼ãªã 109 $date.removeClass('m-error'); 110 $errorDate.removeClass('m-error'); 111 $errorTime.removeClass('m-error'); 112 $errorBoth.removeClass('m-error'); 113 } else { 114 //æéã¨ã©ã¼ 115 $date.removeClass('m-error'); 116 $errorDate.removeClass('m-error'); 117 $errorBoth.removeClass('m-error'); 118 $errorTime.addClass('m-error'); 119 } 120 }else if($time.validationEngine('validate')) { 121 //æ¥ä»ã¨ã©ã¼ 122 $date.addClass('m-error'); 123 $errorBoth.removeClass('m-error'); 124 $errorTime.removeClass('m-error'); 125 $errorDate.addClass('m-error'); 126 }else { 127 //両æ¹ã¨ã©ã¼ 128 $date.addClass('m-error'); 129 $errorBoth.addClass('m-error'); 130 } 131 }, 1000); 132 }); 133 134 $(document).on('blur', '.js-select select', function() { 135 let $yosan = document.getElementById('selectYosan'); 136 if($yosan.value == '鏿ãã¦ãã ãã') { 137 $('.js-selectError').children('p').addClass('m-error'); 138 }else { 139 $('.js-selectError').children('p').removeClass('m-error'); 140 } 141 }); 142 143//å ¥åç³»å¦ç 144 //鏿ããè¦ç´ ã表示 145 function showRadioVal($id, $wrapClass) {//ã©ã¸ãªãã¿ã³ 146 $('#'+$id).empty(); 147 var $val = $($wrapClass).find('input[type="radio"]:checked').val(); 148 document.getElementById($id).append($val); 149 } 150 function showCheckboxVal($id, $wrapClass) {//ãã§ãã¯ããã¯ã¹ 151 $('#'+$id).empty(); 152 var $vals = $($wrapClass).find('input[type="checkbox"]:checked').map(function(){ 153 return $(this).val(); 154 }).get(); 155 for (var i = 0; i < $vals.length; i++) { 156 var $valList = document.createElement('p'); 157 $valList.textContent = 'â ' + $vals[i]; 158 document.getElementById($id).append($valList); 159 } 160 } 161 function showTextVal($id, $wrapClass) {//ããã¹ãã¨ãªã¢ 162 var $val = $($wrapClass).find('input[type="text"]').val(); 163 if($val) { 164 $('#'+$id).text($val); 165 }else { 166 $('#'+$id).text('ç¹ã«ãªã'); 167 } 168 } 169 function showTextareaVal($id, $wrapClass) {//ããã¹ãã¨ãªã¢ 170 var $val = $($wrapClass).find('textarea').val(); 171 $('#'+$id).text($val); 172 } 173 174 //hiddenç£è¦ç¨ 宣è¨ï¼ç£è¦èªä½ã¯åstepç®æï¼ 175// var observer = new MutationObserver(function (MutationRecords, MutationObserver) { 176// debugger; 177// }); 178 179/* step1 180---------------------------------------*/ 181 //å¿ è¦ã¯ã©ã¹å®£è¨ 182 let $dsStill = '.js-designerSelectStill', 183 $dsBtn = '.js-designerSelectButton', 184 $dsVal = 'input[name="designer_flag"]', 185 $dsDefault = '.js-designerSelectDefault', 186 $dsDo = '.js-designerSelectDo', 187 $dsShow = '.js-designerSelectShow', 188 $dsDonot = '.js-designerSelectDonot', 189 $dsMBtn = '.js-designerSelectModalButton', 190 $dsMCont = '.js-designerSelectModalContent', 191 $dsMCls = '.js-designerSelectModalClose', 192 $dsOrder = '.js-designerSelectOrder', 193 $dsNot = '.js-designerSelectNot'; 194 195 //åæå¤ãªã»ãã 196 $($dsVal).val(''); 197 198 //ãã©ã¡ã¼ã¿å¤æ 199 var params = (new URL(document.location)).searchParams; 200 var $designerID = params.get('designerid'); 201 if($designerID !== null) {//ãã©ã¡ã¼ã¿ãããå ´å 202 //ãã¶ã¤ãã¼ã®é¸æ 203 orderDesigner($designerID); 204 205 //表示ç»é¢ã®åãæ¿ã 206 $($dsVal).val('æåãã'); 207 $($dsDo).show(); 208 $($dsDefault).hide(); 209 $('#step1').find('.swiper-text-button-next').removeClass('m-disable'); 210 } 211 //ãã¶ã¤ãã¼é¸æ 212 function orderDesigner($post_id) { 213 let host_url = location.protocol + "//" + location.host; 214 let admin_ajax = host_url + '/wp-admin/admin-ajax.php'; 215 $.ajax({ 216 type: 'POST', 217 url: admin_ajax, 218 data: { 219 'action': 'get_designer',//functions.phpã§è¨å®ãã颿°å 220 'id': $post_id 221 }, 222 }).done(function(response){ 223 var jsonData; 224 var result_html = ''; 225 var picky_list = ''; 226 227 if ( response !== '[]' ) { 228 jsonData = JSON.parse(response); //JSONå½¢å¼ãé åã«å¤æ 229 230 //鏿ãã¶ã¤ãã¼ã®æ å ±ã表示ç¨HTMLã«æ´å½¢ 231 $.each( jsonData, function( i, val ){ 232 result_html += '<div class="l-prof">'; 233 result_html += '<figure>'; 234 result_html += '<img src="'+ val['image'] +'" alt="' + val['title'] + '">'; 235 result_html += '</figure>'; 236 result_html += '<div class="l-prof__wrapper">'; 237 result_html += '<h4 class="m-name">' + val['title'] + '</h4>'; 238 result_html += '<p class="m-text">çµé¨/ã¹ãã«ï¼' + val['skill'] + '</p>'; 239 result_html += '<p class="m-text">徿ãªã¸ã£ã³ã«ï¼' + val['genre'] + '</p>'; 240 result_html += '</div>'; 241 result_html += '</div>'; 242 result_html += '<div class="l-works">'; 243 result_html += '<h4 class="m-title">' + val['roman'] + ' ã®ä½å</h4>'; 244 result_html += '<ul>'; 245 for(var gcnt = 0; val['mainImages'].length > gcnt; gcnt++) { 246 result_html += '<li>'; 247 result_html += '<picture>'; 248 result_html += '<source media="(min-width: 768px)" srcset="'+ val['mainImages'][gcnt] +'">'; 249 result_html += '<img src="'+ val['mainImages'][gcnt] +'" alt="">'; 250 result_html += '</picture>'; 251 result_html += '</li>'; 252 } 253 result_html += '</ul>'; 254 result_html += '<div class="l-btn__wrapper">'; 255 result_html += '<button type="button" class="m-change-btn" onclick="modalOpen()">â ãã¶ã¤ãã¼ã夿´</button>'; 256 result_html += '</div>'; 257 result_html += '</div>'; 258 259 $('input[name="designer_name"]').val(val['title']); 260 }); 261 262 //鏿ãã¶ã¤ãã¼ã®likeã»dislikeæ å ±ã表示ç¨HTMLã«æ´å½¢ 263 $.each( jsonData, function( p, val ){ 264 for(var j = 0; val['picky'].length > j; j++) { 265 picky_list += '<li class="js-pickyItem">'; 266 picky_list += '<picture><img src="' + val['picky'][j]['picky_image'] + '" alt=""></picture>'; 267 picky_list += '<div class="l-button__wrapper">'; 268 picky_list += '<div class="l-button">'; 269 picky_list += '<label><input type="checkbox" name="design_like[]" value="' + location.origin + val['picky'][j]['picky_image'] + '">'; 270 picky_list += '<span><svg class="l_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 79 79"><g class="l_2-2"><g class="l2_4"><polygon class="cls-1" points="39.5 79 79 37 79 12.5 66.5 0 51.5 0 39.5 12 27.5 0 12.5 0 0 12.5 0 37 39.5 79" /></g></g></svg></span>'; 271 picky_list += '</label>'; 272 picky_list += '</div>'; 273 picky_list += '<div class="l-button">'; 274 picky_list += '<label><input type="checkbox" name="design_dislike[]" value="' + location.origin + val['picky'][j]['picky_image'] + '">'; 275 picky_list += '<span><svg class="l2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 86.46 82.77"><g class="l4"><g>'; 276 picky_list += '<path class="cls-1" d="M28.61,71.2c4.35,4.62,10.89,11.58,10.89,11.58l39.5-42V21.47L28.61,71.2Z" /><path class="cls-1" d="M67.48,4.75l-.98-.98h-15l-12,12L27.5,3.77H12.5L0,16.27v24.5s7.9,8.4,14.91,15.85L67.48,4.75Z" /></g><rect class="cls-1" x="-7.39" y="36.49" width="106.78" height="7" transform="translate(-14.83 43.84) rotate(-44.62)" /></g></svg></span>'; 277 picky_list += '</label>' 278 picky_list += '</div>'; 279 picky_list += '</div>'; 280 picky_list += '</li>'; 281 } 282 }); 283 } else { //æç¨¿ããªãã¨ã 284 result_html = '<li>
284該å½ãããã¼ã¿ãããã¾ãã</li>'; 285 picky_list = '<li>該å½ãããã¼ã¿ãããã¾ãã</li>'; 286 } 287 $($dsShow).html(result_html);//step1ã»ç¢ºèªç»é¢ã«ãã¶ã¤ãã¼ã表示ããã 288 289 //step2ââ 290 $('.js-pickyList input, .js-pickyListDefault input').prop('checked', false); 291 $('.js-pickyList').show(); 292 $('.js-pickyListDefault').hide(); 293 $('.js-pickyBefore').show(); 294 $('.js-pickyAfter').hide(); 295 $('.js-pickyList').html(picky_list);//好ã¿ã追å 296 $('.js-pickyLike, .js-pickyLikeOver, .js-pickyDislike, .js-pickyDislikeOver').empty();//表示ã¨ãªã¢ã空㫠297 298 applySwiper.updateAutoHeight(); 299 }).fail(function () { 300 alert("åå¾ã«å¤±æãã¾ãã"); 301 }); 302 return false; 303 } 304 $(document).on('click', $dsBtn, function() { 305 var value = $(this).data('value'); 306 307 if(value === 'æåãã') { 308 $($dsDefault).hide(); 309 $($dsDo).show(); 310 $($dsMCont).addClass('m-show'); 311 } else { 312 $($dsDefault).hide(); 313 $($dsDonot).show(); 314 $('input[name="designer_name"]').val('æåããªã'); 315 } 316 $($dsStill).hide(); 317 $('.js-step1 .js-stepNext').removeClass('m-disable'); 318 }); 319 320 //ãã¶ã¤ãã¼ã®æå 321 $(document).on('click', $dsOrder, function(){ 322 var $post_id = $(this).data('id'); 323 var $dsID = $('input[name="designer_id"]').val(); 324 if($dsID !== $post_id) {//éããã¶ã¤ãã¼ã鏿ãããå ´å 325 $('input[name="designer_id"]').val($post_id); 326 orderDesigner($post_id); 327 328 //ã¡ã¼ã«ç¨valueå¤å¤æ´ 329 $($dsVal).val('æåãã'); 330 $($dsDefault).hide(); 331 $($dsDonot).hide(); 332 $($dsDo).show(); 333 } 334 //ã¢ã¼ãã«éãã 335 $('.modal-container').removeClass('is-active'); 336 337 //ã¤ãã¸ãã¿ã³ã®æ´»æ§å 338 $('#step1').find('.swiper-text-button-next').removeClass('m-disable'); 339 }); 340 //æåããªã鏿æ 341 $(document).on('click', $dsNot, function() { 342 $($dsVal).val('æåããªã'); 343 $('input[name="designer_name"]').val('æåããªã'); 344 $($dsVal).val('æåããªã'); 345 $($dsDefault).hide(); 346 $($dsDo).hide(); 347 $($dsDonot).show(); 348 349 //step2ã®å¤æ´ 350 $('.js-pickyList input, .js-pickyListDefault input').prop('checked', false); 351 $('.js-pickyList').hide(); 352 $('.js-pickyListDefault').show(); 353 354 //確èªç»é¢ã夿´ 355 $($dsShow).html('<div class="p-contactDesignerSelectDonot__wrap m-edit"><p>ãã¶ã¤ãã¼ãæåããªã<span class="m-text-small">(COCONã«ãä»»ããã)</span></p></div>'); 356 357 //ã¢ã¼ãã«éãã 358 $('.modal-container').removeClass('is-active'); 359 360 //ã¤ãã¸ãã¿ã³ã®æ´»æ§å 361 $('#step1').find('.swiper-text-button-next').removeClass('m-disable'); 362 }); 363 364 //ã¢ã¼ãã«è¡¨ç¤º 365 $(document).on('click', $dsMBtn, function() { 366 $($dsMCont).addClass('is-active'); 367 }); 368 $(document).on('click', $dsMCls, function() { 369 var value = $($dsVal).val(); 370 if(value === null || value === '') { 371 //ã¡ã¼ã«ç¨valueå¤å¤æ´ 372 $($dsVal).val('æåããªã'); 373 $('input[name="designer_name"]').val('æåããªã'); 374 $($dsDefault).hide(); 375 $($dsDo).hide(); 376 $($dsDonot).show(); 377 } 378 //ã¢ã¼ãã«éãã 379 //$($dsMCont).removeClass('m-show'); 380 $('.modal-container').removeClass('is-active');//ãã¾ 381 }); 382 383 //ã¤ãã¸ãã¿ã³æ´»æ§å 384 $(document).on('change', $dsVal, function() { 385 if($dsVal.val() != '') { 386 $('#step1').find('.swiper-text-button-next').removeClass('m-disable'); 387 }else { 388 $('#step2').find('.swiper-text-button-next').addClass('m-disable'); 389 } 390 }); 391 392/* step2 393---------------------------------------*/ 394 let $pSel = '.js-pickySelect', 395 $pMdl = '.js-pickyMdl', 396 $pMCls = '.js-pickyClose', 397 $pFix = '.js-pickyFix', 398 $pLike = '.js-pickyLike', 399 $pLikeOver = '.js-pickyLikeOver', 400 $pDislike = '.js-pickyDislike', 401 $pDislikeOver = '.js-pickyDislikeOver'; 402 let $pBf = '.js-pickyBefore', 403 $pAf = '.js-pickyAfter'; 404 if($('.js-pickyList input:checked').length > 0 || $('.js-pickyListDefault input:checked').length > 0) { 405 $($pBf).hide(); 406 $($pAf).show(); 407 }else { 408 $($pAf).hide(); 409 } 410 $(document).on('click', $pSel, function() { 411 $($pMdl).addClass('is-active'); 412 }); 413 $(document).on('click', $pMCls, function() { 414 $($pMdl).removeClass('is-active'); 415 }); 416 //ãã§ãã¯ããã¯ã¹ãæä»çã« 417 $(document).on('change', '.js-pickyItem input', function() { 418 $(this).parents('.js-pickyItem').find('input').not(this).prop('checked', false); 419 }); 420 421 //ãã§ãã¯ããã¯ã¹å¤å®ç¨ 422 //好ã¿ã®ãã§ãã¯ããã¯ã¹ã«å¤æ´ããã£ãã¨ã 423 $(document).on('change', '.js-pickyList input, .js-pickyListDefault input', function() { 424 let likeChecked = $('input[name="design_like[]"]:checked'), 425 like_html = '', 426 likeOver_html = '', 427 likeMail_html = ''; 428 let dislikeChecked = $('input[name="design_dislike[]"]:checked'), 429 dislike_html = '', 430 dislikeOver_html = '', 431 dislikeMail_html = ''; 432 //ç»é¢åãæ¿ã 433 $($pBf).hide(); 434 $($pAf).show(); 435 if(likeChecked.length > 0) { 436 var likeCounter = 0;//ã«ã¦ã³ã¿ã¼ã»ãã 437 likeChecked.each(function(){ //HTMLã«æ´å½¢ 438 like_html += '<li><picture>'; 439 like_html += '<img src="' + $(this).val() +'" alt="">'; 440 like_html += '</picture></li>'; 441 likeCounter++; 442 if(likeCounter == 5) { 443 if(likeChecked.length > 5) { 444 var likeOverCount = likeChecked.length - likeCounter; 445 likeOver_html += 'ä»' + likeOverCount + 'ä»¶'; 446 } 447 return false;
448 } 449 likeMail_html += $(this).val() + '\n'; 450 }); 451 }else { 452 like_html += '<li class="m-blank"><span>LIKEã¯ããã¾ãã</span></li>'; 453 } 454 if(dislikeChecked.length > 0) { 455 var dislikeCounter = 0;//ã«ã¦ã³ã¿ã¼ã»ãã 456 dislikeChecked.each(function(){ //HTMLã«æ´å½¢ 457 dislike_html += '<li><picture>' 458 dislike_html += '<img src="' + $(this).val() +'" alt="">'; 459 dislike_html += '</picture></li>'; 460 dislikeCounter++; 461 if(dislikeCounter == 5) { 462 if(dislikeChecked.length > 5) { 463 var dislikeOverCount = dislikeChecked.length - dislikeCounter; 464 dislikeOver_html += 'ä»' + dislikeOverCount + 'ä»¶'; 465 } 466 return false; 467 } 468 dislikeMail_html += $(this).val() + '\n'; 469 }); 470 }else { 471 dislike_html += '<li class="m-blank"><span>DISLIKEã¯ããã¾ãã</span></li>'; 472 } 473 if(likeChecked.length > 0 || dislikeChecked.length > 0) { 474 //ã¤ãã¸ãã¿ã³ã®æ´»æ§å 475 $('#step2').find('.swiper-text-button-next').removeClass('m-disable'); 476 }else { 477 $('#step2').find('.swiper-text-button-next').addClass('m-disable'); 478 } 479 480 //ããããã®ç®æã«æ¿å ¥ 481 $($pLike).html(like_html); 482 $($pLikeOver).html(likeOver_html); 483 $($pDislike).html(dislike_html); 484 $($pDislikeOver).html(dislikeOver_html); 485 $('input[name="design_like"]').val(likeMail_html); 486 $('input[name="design_dislike"]').val(dislikeMail_html); 487 488 applySwiper.updateAutoHeight();//ã¹ã©ã¤ãã¼é«ã夿´ 489 }); 490 491 $(document).on('click', $pFix, function() { 492 //ã¢ã¼ãã«ã¯ãã¼ãº 493 $($pMdl).removeClass('is-active'); 494 }); 495 496/* step3 497---------------------------------------*/ 498 $(document).on('change', '.js-afterType input', function() { 499 showCheckboxVal('after_type', '.js-afterType'); 500 }); 501 502 var $fileShow = '.js-uploadFileShow', 503 $fileDelete = '.js-uploadFileDelete', 504 $fileItem = '.js-uploadFileItem', 505 $fileUpload = '.js-uploadFileInput'; 506 //ãã¡ã¤ã«ã¢ãããã¼ã 507 function uploadFile($e, $stepID, $confirmID) { 508 var reader = new FileReader(); 509 var file = $e.target.files[0]; 510 $($stepID).empty(); 511 $($confirmID).empty(); 512 reader.onload = function (e) { 513 $($stepID).append('<img src="'+e.target.result+'"><span class="p-contantImage__delete js-uploadFileDelete" data-confirm="'+$confirmID+'"></span>'); 514 $($confirmID).append('<img src="'+e.target.result+'">'); 515 } 516 reader.readAsDataURL(file); 517 $($stepID).addClass('m-show'); 518 $($stepID).parent().find($fileUpload).addClass('m-hide'); 519 } 520 $('.js-before_image01').on('change', function(e) { 521 uploadFile(e, '#beforeImage01', '#beforeImage01_confirm'); 522 }); 523 $('.js-before_image02').on('change', function(e) { 524 uploadFile(e, '#beforeImage02', '#beforeImage02_confirm'); 525 }); 526 $('.js-after_image01').on('change', function(e) { 527 uploadFile(e, '#afterImage01', '#afterImage01_confirm'); 528 }); 529 $('.js-after_image02').on('change', function(e) { 530 uploadFile(e, '#afterImage02', '#afterImage02_confirm'); 531 }); 532 $(document).on('click', $fileDelete, function() {//ã¢ããç»åã®åé¤ 533 var $deleteConfirm = $(this).data('confirm'); 534 $(this).closest($fileItem).find('input[type="file"]').val(null); 535 $(this).closest($fileItem).find($fileUpload).removeClass('m-hide'); 536 $(this).parent($fileShow).removeClass('m-show'); 537 $(this).parent($fileShow).empty(); 538 $($deleteConfirm).empty(); 539 }); 540 541 $(document).on('change', '.js-afterTextarea textarea', function() { 542 showTextareaVal('after_textarea', '.js-afterTextarea'); 543 }); 544 545 //ã¤ãã¸ãã¿ã³ã®æ´»æ§å 546 $(document).on('change', '.js-before_image01, .js-before_image02', function() { 547 if($('.js-before_image01').val() != '' || $('.js-before_image02').val() != '') { 548 $('#step3').find('.swiper-text-button-next').removeClass('m-disable'); 549 }else { 550 $('#step3').find('.swiper-text-button-next').addClass('m-disable'); 551 } 552 }); 553 554/* step4 555---------------------------------------*/ 556 $('input[name="nouki"]').val('ç¹ã«ãªã'); 557 $(document).on('change', '.js-desiredYosan select', function() { 558 let $yosan = document.getElementById('selectYosan'); 559 $('#yosan').text($yosan.value); 560 }); 561 $(document).on('change', '.js-desiredNouki input', function() { 562 showTextVal('nouki', '.js-desiredNouki'); 563 }); 564 function kiboubi($id ,$wrapClass) { 565 var $desireDateVal = $($wrapClass).find('input[type="date"]').val(); 566 var $desireRadiodVal = $($wrapClass).find('input[type="radio"]:checked').val(); 567 var $showDate = ''; 568 if($desireDateVal == '') { 569 $showDate = 'æå®ãªã'+' '+$desireRadiodVal; 570 } else { 571 var $getDate = new Date($desireDateVal); 572 var $getDateYear = $getDate.getFullYear()+'å¹´'; 573 var $getDateMonth = $getDate.getMonth()+1+'æ'; 574 var $getDateDay = $getDate.getDate()+'æ¥'; 575 var $getDateWeek = ''; 576 switch($getDate.getDay()) { 577 case 0: 578 $getDateWeek = '(æ¥)'; 579 break; 580 case 1: 581 $getDateWeek = '(æ)'; 582 break; 583 case 2: 584 $getDateWeek = '(ç«)'; 585 break; 586 case 3: 587 $getDateWeek = '(æ°´)'; 588 break; 589 case 4: 590 $getDateWeek = '(æ¨)'; 591 break; 592 case 5: 593 $getDateWeek = '(é)'; 594 break; 595 case 6: 596 $getDateWeek = '(å)'; 597 break; 598 } 599 $showDate = $getDateYear+$getDateMonth+$getDateDay+$getDateWeek+' '+$desireRadiodVal; 600 } 601 $('#'+$id).text($showDate); 602 applySwiper.updateAutoHeight(); 603 }
604 $(document).on('change', '.js-desired01 input', function() { 605 kiboubi('kibou01', '.js-desired01'); 606 }); 607 $(document).on('change', '.js-desired02 input', function() { 608 kiboubi('kibou02', '.js-desired02'); 609 }); 610 $(document).on('change', '.js-desired03 input', function() { 611 kiboubi('kibou03', '.js-desired03'); 612 }); 613 //ã¤ãã¸ãã¿ã³ã®æ´»æ§å 614 $(document).on('change', 'input', function() { 615 if($('.js-desiredYosan input').val() != '' && $('.js-desiredNouki input').val() != '') { 616 if($('.js-desired01 input[type="text"]').val() != '' && $('.js-desired01').find('input[type="radio"]:checked').val() != null) { 617 if($('.js-desired02 input[type="text"]').val() != '' && $('.js-desired02').find('input[type="radio"]:checked').val() != null) { 618 if($('.js-desired03 input[type="text"]').val() != '' && $('.js-desired03').find('input[type="radio"]:checked').val() != null) { 619 $('#step5').find('.swiper-text-button-next').removeClass('m-disable'); 620 }else { 621 $('#step5').find('.swiper-text-button-next').addClass('m-disable'); 622 } 623 }else { 624 $('#step5').find('.swiper-text-button-next').addClass('m-disable'); 625 } 626 }else { 627 $('#step5').find('.swiper-text-button-next').addClass('m-disable'); 628 } 629 }else { 630 $('#step5').find('.swiper-text-button-next').addClass('m-disable'); 631 } 632 }); 633 634/* step5 635---------------------------------------*/ 636 $(document).on('change', '.js-your_name input', function() { 637 showTextVal('your_name', '.js-your_name'); 638 }); 639 $(document).on('change', '.js-your_gender input', function() { 640 showRadioVal('your_gender', '.js-your_gender'); 641 }); 642 $(document).on('change', '.js-your_birthday input', function() { 643 var $yourBday = $('.js-your_birthday').find('input[type="date"]').val(); 644 var $getBday = new Date($yourBday); 645 var $getBdayYear = $getBday.getFullYear(); 646 var $getBdayMon = $getBday.getMonth()+1; 647 var $getBdayDay = $getBday.getDate(); 648 var $showBday = $getBdayYear+'.'+$getBdayMon+'.'+$getBdayDay; 649 $('#your_birthday').text($showBday); 650 applySwiper.updateAutoHeight(); 651 }); 652 $(document).on('change', '.js-your_tel input', function() { 653 var $val = $('.js-your_tel').find('input[type="tel"]').val(); 654 $('#your_tel').text($val); 655 }); 656 $(document).on('change', '.js-your_email input', function() { 657 var $val = $('.js-your_email').find('input[type="email"]').val(); 658 $('#your_email').text($val); 659 }); 660 $(document).on('change', function() { 661 if($('.js-your_name input').val() != '' && $('.js-your_gender input').val() != '' && $('.js-your_birthday input').val() != '' && $('.js-your_tel input').val() != '' && $('.js-your_email input').val() != '') { 662 $('#step6').find('.swiper-text-button-next').removeClass('m-disable'); 663 }else { 664 $('#step6').find('.swiper-text-button-next').addClass('m-disable'); 665 } 666 }); 667});
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.