1$(document).ready(function () { 2 /** 3 * æ¤ç´¢ã®ã«ãã´ãªè¡¨ç¤º 4 */ 5 $('.search_category_button').click(function () { 6 $('#pjSearch4Category').slideToggle('slow'); 7 }); 8 9 /** 10 * wysiwygã¨ãã£ã¿ 11 */ 12 $('.froalaEditor').froalaEditor({ 13 // call4.jpç¨ã®ã¢ã¯ãã£ãã¼ã·ã§ã³ãã¼ 14 key: 'IB2A9B2A3pD1D1D1H5E1J4A16B3A7B4kF-10xvwC9B5to==', 15 language: 'ja', 16 height: 500, 17 toolbarButtons: [ 18 'bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', '|', 'fontSize', 'color', 'clearFormatting', '-', 19 'paragraphFormat', 'align', 'formatOL', 'formatUL', 'outdent', 'indent', '|', 'insertLink', 'insertImage', '-', 20 'insertHR', 'selectAll', 'help', 'html', 'fullscreen', '|', 'undo', 'redo' 21 ], 22 toolbarButtonsXS: [ 23 'bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', '|', 'fontSize', 'color', 'clearFormatting', '-', 24 'paragraphFormat', 'align', 'formatOL', 'formatUL', 'outdent', 'indent', '|', 'insertLink', 'insertImage', '-', 25 'insertHR', 'selectAll', 'help', 'html', 'fullscreen', '|', 'undo', 'redo' 26 ], 27 // ç»åã¢ãããã¼ãå¦çæ¬çªç¨ 28 imageUploadURL: '/upload_file.php', 29 // ç»åã¢ãããã¼ãå¦çãã¼ã«ã«ç¨ 30 // imageUploadURL: '/call4/CrowdfundingSite/upload_file.php', 31 imageUploadParams: { id: 'my_editor' }, 32 imageAllowedTypes: ['jpeg', 'jpg', 'png', 'gif', 'png'], 33 imageMaxSize: 5 * 1024 * 1024, // 5MB. 34 }); 35 36 /** 37 * 38 * ã±ã¼ã¹ã®ç¶ããèªã 39 * 40 */ 41 if ($('.case_contents').length) { 42 let case_contents = $('.case_contents'); 43 let bottom_content = $('.bottom_content'); 44 45 let height = case_contents.outerHeight() - bottom_content.outerHeight(); 46 47 if (height > 432) { 48 case_contents.addClass('show'); 49 bottom_content.addClass('hide'); 50 } else { 51 case_contents.addClass('show'); 52 bottom_content.addClass('no_disp'); 53 } 54 } 55 $('.case_read_more').on('click', function () { 56 let bottom_content = $(this).parents('.bottom_content'); 57 let case_contents = $(this).parents('.case_contents'); 58 59 if (bottom_content.hasClass('open')) { 60 bottom_content.removeClass('open'); 61 bottom_content.addClass('hide'); 62 } else if (bottom_content.hasClass('hide')) { 63 bottom_content.removeClass('hide'); 64 bottom_content.addClass('open'); 65 } else { 66 bottom_content.addClass('not_disp'); 67 } 68 69 if (case_contents.hasClass('show')) { 70 case_contents.removeClass('show'); 71 case_contents.addClass('hide'); 72 } else { 73 case_contents.removeClass('hide'); 74 case_contents.addClass('show'); 75 } 76 }); 77 78 /** 79 * ãã¼ã¸å ãªã³ã¯ã®ä½ç½®èª¿æ´ 80 */ 81 $('.link_in_page').on('click', function () { 82 let url = $(this).attr('href'); 83 let id = url.split('#'); 84 let target = $('#' + id[id.length - 1]); 85 if (target.length) { 86 let pos = target.offset().top; 87 if ($('#thebasics #section_case_story_btn').length) { 88 if ($(window).width() > 767) { 89 if (target.attr('id') != 'thebasics_section_1') { 90 pos = pos + 40; 91 } 92 } else { 93 if (target.attr('id') != 'thebasics_section_1') { 94 pos = pos + 40; 95 } 96 } 97 } 98 $("html, body").animate({ scrollTop: pos }, 400, "swing"); 99 } 100 return false; 101 }); 102 103 /** 104 * è±èªç¿»è¨³åãæ¿ã 105 */ 106 let key = "language" + "=";
107 let cookie = document.cookie + ";"; 108 let find = cookie.indexOf(key); 109 let offset = find + key.length; 110 let end = cookie.indexOf(";", offset); 111 let val = unescape(cookie.substring(offset, end)); 112 113 if (val != 'eng' && val != 'jpn') { 114 //ãã©ã¦ã¶ã®è¨èªè¨å® 115 let window_language = (window.navigator.languages && window.navigator.languages[0]) || 116 window.navigator.language || 117 window.navigator.userLanguage || 118 window.navigator.browserLanguage; 119 120 switch (window_language) { 121 case 'ja': 122 case 'ja-JP': 123 val = 'jpn'; 124 break; 125 default: 126 val = 'eng'; 127 break; 128 } 129 } 130 131 if (val == 'eng') { 132 document.getElementById('html_lang_attribute').setAttribute('lang', 'en'); 133 $('.eng').show(); 134 $('.eng_form').prop('disabled', false); 135 $('.jpn').hide(); 136 $('.jpn_form').prop('disabled', true); 137 $(".language_btn_en").addClass("active"); 138 $("#footer_navi .position-absolute").css({ 'bottom': '0' }); 139 if ($('main').hasClass('case_detail')) { 140 if (!$('.case_detail #story .story_list .story_list_item .story_list_item_content a.eng').length) { 141 $('.case_detail #story').hide(); 142 $('.case_detail #inquiry').addClass('mt-4 mt-md-0'); 143 } else { 144 $('.case_detail #story').show(); 145 $('.case_detail #inquiry').removeClass('mt-4 mt-md-0'); 146 } 147 } else if ($('main').attr('id') == 'index') { 148 if (!$('#index #index_story .story_list .story_list_item .story_list_item_content a.eng').length) { 149 $('#index #index_story').hide(); 150 } else { 151 $('#index #index_story').show(); 152 } 153 154 if (!$('#index #main_visual #main_visual_eng .main_visual_inner .main_visual_slider .main_visual_slider_item a').length) { 155 $('#index #main_visual').hide(); 156 } else { 157 $('#index #main_visual').show(); 158 createIndexMainVisualEng(); 159 160 } 161 162 } 163 document.cookie = 'language=eng; max-age=604800'; 164 } else { 165 document.getElementById('html_lang_attribute').setAttribute('lang', 'ja'); 166 $('.jpn').show(); 167 $('.jpn_form').prop('disabled', false); 168 $('.eng').hide(); 169 $('.eng_form').prop('disabled', true); 170 $(".language_btn_jp").addClass("active"); 171 $("#footer_navi .position-absolute").css({ 'bottom': '5px' }); 172 if ($('main').hasClass('case_detail')) { 173 if (!$('.case_detail #story .story_list .story_list_item .story_list_item_content a.jpn').length) { 174 $('.case_detail #story').hide(); 175 $('.case_detail #inquiry').addClass('mt-4 mt-md-0'); 176 } else { 177 $('.case_detail #story').show(); 178 $('.case_detail #inquiry').removeClass('mt-4 mt-md-0'); 179 } 180 } else if ($('main').attr('id') == 'index') { 181 if (!$('#index #index_story .story_list .story_list_item .story_list_item_content a.jpn').length) { 182 $('#index #index_story').hide(); 183 } else { 184 $('#index #index_story').show(); 185 } 186 187 if (!$('#index #main_visual #main_visual_jpn .main_visual_inner .main_visual_slider .main_visual_slider_item a').length) { 188 $('#index #main_visual').hide(); 189 } else { 190 $('#index #main_visual').show(); 191 createIndexMainVisualJpn(); 192 } 193 if (!$('#index #index_column .index_column_inner .index_column_slider .index_column_slider_item a').length) { 194 $('#index #index_column').hide(); 195 } else { 196 $('#index #index_column').show(); 197 createIndexColumn(); 198 } 199 } 200 document.cookie = 'language=jpn; max-age=604800'; 201 } 202 203 $('.language_btn_jp').click(function () { 204 document.getElementById('html_lang_attribute').setAttribute('lang', 'ja'); 205 $('.jpn').show(); 206 $('.jpn_form').prop('disabled', false); 207 $('.eng').hide(); 208 $('.eng_form').prop('disabled', true); 209 $(".language_btn_jp").addClass("active"); 210 $(".language_btn_en").removeClass("active"); 211 $("#footer_navi .position-absolute").css({ 'bottom': '5px' }); 212 if ($('main').hasClass('case_detail')) { 213 if (!$('.case_detail #story .story_list .story_list_item .story_list_item_content a.jpn').length) { 214 $('.case_detail #story').hide(); 215 $('.case_detail #inquiry').addClass('mt-4 mt-md-0'); 216 } else { 217 $('.case_detail #story').show(); 218 $('.case_detail #inquiry').removeClass('mt-4 mt-md-0'); 219 } 220 let title = $('main.case_detail h2.none_border:first-child span.jpn')[0].innerText; 221 $('title').html(title + 'ï½å ¬å ±è¨´è¨ã®CALL4ï¼ã³ã¼ã«ãã©ã¼ï¼'); 222 } else if ($('main').attr('id') == 'index') { 223 if (!$('#index #index_story .story_list .story_list_item .story_list_item_content a.jpn').length) { 224 $('#index #index_story').hide(); 225 } else { 226 $('#index #index_story').show(); 227 } 228 229 if (!$('#index #main_visual #main_visual_jpn .main_visual_inner .main_visual_slider .main_visual_slider_item a').length) { 230 $('#index #main_visual').hide(); 231 } else { 232 $('#index #main_visual').show(); 233 createIndexMainVisualJpn(); 234 } 235 if (!$('#index #index_column .index_column_inner .index_column_slider .index_column_slider_item a').length) { 236 $('#index #index_column').hide(); 237 } else { 238 $('#index #index_column').show(); 239 createIndexColumn(); 240 } 241 } 242 243 document.cookie = 'language=jpn; max-age=604800'; 244 }); 245 246 $('.language_btn_en').click(function () { 247 document.getElementById('html_lang_attribute').setAttribute('lang', 'en'); 248 $('.jpn').hide(); 249 $('.jpn_form').prop('disabled', true); 250 $('.eng').show(); 251 $('.eng_form').prop('disabled', false); 252 $(".language_btn_en").addClass("active"); 253 $(".language_btn_jp").removeClass("active"); 254 $("#footer_navi .position-absolute").css({ 'bottom': '0' }); 255 if ($('main').hasClass('case_detail')) { 256 if (!$('.case_detail #story .story_list .story_list_item .story_list_item_content a.eng').length) { 257 $('.case_detail #story').hide(); 258 $('.case_detail #inquiry').addClass('mt-4 mt-md-0'); 259 } else { 260 $('.case_detail #story').show(); 261 $('.case_detail #inquiry').removeClass('mt-4 mt-md-0'); 262 } 263 let title = $('main.case_detail h2.none_border:first-child span.eng')[0].innerText; 264 $('title').html(title + 'ï½CALL4'); 265 } else if ($('main').attr('id') == 'index') { 266 if (!$('#index #index_story .story_list .story_list_item .story_list_item_content a.eng').length) { 267 $('#index #index_story').hide(); 268 } else { 269 $('#index #index_story').show(); 270 } 271 272 if (!$('#index #main_visual #main_visual_eng .main_visual_inner .main_visual_slider .main_visual_slider_item a').length) { 273 $('#index #main_visual').hide(); 274 } else { 275 $('#index #main_visual').show(); 276 createIndexMainVisualEng(); 277 } 278 } 279 document.cookie = 'language=eng; max-age=604800'; 280 }); 281 282 $('#kiyaku_jpn').click(function () { 283 $('.jpn').show(); 284 $('.jpn_form').prop('disabled', false); 285 $('.eng').hide(); 286 $('.eng_form').prop('disabled', true); 287 $(".language_btn_jp").addClass("active"); 288 $(".language_btn_en").removeClass("active"); 289 $("#footer_navi .position-absolute").css({ 'bottom': '5px' }); 290 if ($('main').hasClass('case_detail')) { 291 if (!$('.case_detail #story .story_list .story_list_item .story_list_item_content a.jpn').length) { 292 $('.case_detail #story').hide(); 293 $('.case_detail #inquiry').addClass('mt-4 mt-md-0'); 294 } else { 295 $('.case_detail #story').show(); 296 $('.case_detail #inquiry').removeClass('mt-4 mt-md-0'); 297 } 298 let title = $('main.case_detail h2.none_border:first-child span.jpn')[0].innerText; 299 $('title').html($title + 'ï½å ¬å ±è¨´è¨ã®CALL4ï¼ã³ã¼ã«ãã©ã¼ï¼'); 300 } else if ($('main').attr('id') == 'index') { 301 if (!$('#index #index_story .story_list .story_list_item .story_list_item_content a.jpn').length) { 302 $('#index #index_story').hide(); 303 } else { 304 $('#index #index_story').show(); 305 } 306 307 if (!$('#index #main_visual #main_visual_jpn .main_visual_inner .main_visual_slider .main_visual_slider_item a').length) { 308 $('#index #main_visual').hide(); 309 } else { 310 $('#index #main_visual').show(); 311 createIndexMainVisualJpn(); 312 } 313 if (!$('#index #index_column .index_column_inner .index_column_slider .index_column_slider_item a').length) { 314 $('#index #index_column').hide(); 315 } else { 316 $('#index #index_column').show(); 317 createIndexColumn(); 318 } 319 } 320 321 document.cookie = 'language=jpn; max-age=604800'; 322 }); 323 324 /* 325 * 訴è¨è³ææ©è½ã®ã¿ãåæ¿ 326 */ 327 $('.main-tab-link').click(function () { 328 let href = $(this).attr('href'); 329 330 $('.sub-tab-link').removeClass('active'); 331 332 $('.sub-tab-pane').removeClass('active'); 333 334 $(href + '-1').addClass('active'); 335 $(href + '-1-link').addClass('active'); 336 $(href + '-1-link-en').addClass('active'); 337 338 }); 339 340 341 /** 342 * QAã®åç表示 343 */ 344 $('.read_answer_btn').on('click', function () { 345 let target = $(this).data('target'); 346 if ($(this).hasClass('open')) { 347 348 if ($('#answer-' + target).length) { 349 let answer = $('#answer-' + target); 350 answer.addClass('open'); 351 352 $(this).removeClass('open'); 353 $(this).addClass('hide'); 354 $(this).text('â'); 355 } 356 } else { 357 if ($('#answer-' + target).length) { 358 let answer = $('#answer-' + target); 359 answer.addClass('hide'); 360 answer.removeClass('open'); 361 362 $(this).addClass('open'); 363 $(this).removeClass('hide'); 364 $(this).text('ï¼'); 365 } 366 367 } 368 369 }); 370 371 372 /** 373 * ã±ã¼ã¹ã®é²æãã¼ 374 */ 375 if ($('.progress-bar').length) { 376 $('.progress-bar').each(function (i) { 377 let style = $(this).attr('style'); 378 let width = style.split(':'); 379 let widthNum = parseInt(width[1]); 380 if (50 >= widthNum > 0) { 381 $(this).children('span').addClass('half'); 382 $(this).children('span').addClass('ml-1'); 383 $(this).parents('.case_progress').append($(this).children('span')); 384 } else if (widthNum > 50) { 385 $(this).children('span').addClass('full'); 386 } 387 }); 388 } 389 390 //ããããã¼ã¸ã»ã¡ã¼ã«ãã¬ã¸ã³ãªã³ã¯ 391 if ($('#index_mail_magazine').length) { 392 var index_mail_magazine = $('#index_mail_magazine'); 393 var index_about = $('#index_about'); 394 index_mail_magazine.hide(); 395 $(window).scroll(function () { 396 if (($(window).scrollTop() > (index_about.offset().top))) { 397 index_mail_magazine.fadeIn(); 398 } else { 399 index_mail_magazine.fadeOut(); 400 } 401 }); 402 } 403}); 404 405/** 406 * DOMæ§ç¯å¾ã®ã¿ã¤ãã³ã°ã§å®è¡ 407 */ 408$(window).on('load', function () { 409 /** 410 * toTop 411 */ 412 $('#to_top_btn').on('click', function () { 413 $('body,html').animate({ 414 scrollTop: 0 415 }, 500); 416 return false;
417 }); 418 $('#thebasics_to_top_btn').on('click', function () { 419 $('body,html').animate({ 420 scrollTop: 0 421 }, 500); 422 return false; 423 }); 424 425 /** 426 * ã±ã¼ã¹è©³ç´°ãã¼ã¸ã®ãã¼ã¸ã³è¨å® 427 */ 428 if ($('main').hasClass('case_detail')) { 429 if (!$('.case_detail #story').length) { 430 $('#inquiry').addClass('mt-4 mt-md-0'); 431 } 432 } 433 /** 434 * ãã¼ã¯ãã¦ã³è¡¨ç¤ºãHTMLå 435 */ 436 marked.setOptions({ 437 sanitize: true 438 }); 439 $('.marked').each(function (index) { 440 let markdown = $(this).find('.hidden-marked-content').val(); 441 let html = marked(markdown) 442 $(this).find('.marked-content').html(html); 443 }); 444 445 // ã±ã¼ã¹ã®ç¨®é¡ã«å¿ããå¶å¾¡ 446 if ($('.items_category_radio').length) { 447 let items_category_radio = $('.items_category_radio'); 448 items_category_radio.each(function (i, elm) { 449 if (elm.checked) { 450 // å¯ä»åéãªãã±ã¼ã¹ã®å ´å 451 if ($(elm).val() == 3) { 452 $('.target_goal_supporter_item').show(); 453 $('.target_goal_item').hide(); 454 455 // å ¥åé ç®ã®å¶å¾¡ 456 $('.target_goal_supporter_item').find('input').prop('disabled', false); 457 $('.target_goal_item').find('input').prop('disabled', true); 458 459 } else { 460 $('.target_goal_item').show(); 461 $('.target_goal_supporter_item').hide(); 462 463 // å ¥åé ç®ã®å¶å¾¡ 464 $('.target_goal_item').find('input').prop('disabled', false); 465 $('.target_goal_supporter_item').find('input').prop('disabled', true); 466 } 467 } else { 468 $('.target_goal_item').show(); 469 $('.target_goal_supporter_item').hide(); 470 471 // å ¥åé ç®ã®å¶å¾¡ 472 $('.target_goal_supporter_item').find('input').prop('disabled', true); 473 } 474 }); 475 476 $('.items_category_radio').on('change', function () { 477 let val = $(this).val(); 478 // å¯ä»åéãªãã±ã¼ã¹ã®å ´å 479 if (val == 3) { 480 $('.target_goal_supporter_item').show(); 481 $('.target_goal_item').hide(); 482 483 // å ¥åé ç®ã®å¶å¾¡ 484 $('.target_goal_supporter_item').find('input').prop('disabled', false); 485 $('.target_goal_item').find('input').prop('disabled', true); 486 } else { 487 $('.target_goal_item').show(); 488 $('.target_goal_supporter_item').hide(); 489 490 // å ¥åé ç®ã®å¶å¾¡ 491 $('.target_goal_item').find('input').prop('disabled', false); 492 $('.target_goal_supporter_item').find('input').prop('disabled', true); 493 } 494 }); 495 } 496 497}); 498 499 500 501/** 502 * ããã°ã¬ã¹ãã¼ã®ã¢ãã¡ã¼ã·ã§ã³ 503 */ 504function animationPogressbar(num) { 505 var i = 0; 506 var timer = window.setInterval(function () { 507 if (i <= num) { 508 i <= 100 ? $(".progress-bar").css("width", i + "%") : null; 509 $(".progress-bar").html(i + " ï¼ "); 510 i++; 511 } else { 512 window.clearInterval(timer); 513 } 514 }, 10); 515} 516 517/** 518 * ã¡ã¤ã³ãã¸ã¥ã¢ã«ï¼æ¥æ¬èªï¼ã®çæ 519 */ 520function createIndexMainVisualJpn() { 521 var indexMainVisualJpn = new Swiper('#main_visual_jpn .swiper-container', { 522 // Optional parameters 523 speed: 1000, 524 centeredSlides: true, 525 loop: true, 526 slidesPerView: 2, 527 loopAdditionalSlides: 1, 528 loopFillGroupWithBlank: true, 529 resistance: true, 530 autoplay: { 531 delay: 5000, 532 disableOnInteraction: false 533 }, 534 535 // Pagination 536 pagination: { 537 el: '#main_visual_pagination_jpn', 538 type: 'bullets', 539 clickable: true 540 }, 541 542 // Navigation arrows 543 navigation: { 544 nextEl: '#main_visual_next_jpn', 545 prevEl: '#main_visual_prev_jpn' 546 }, 547 548 // Responsive breakpoints 549 breakpoints: { 550 767: { 551 slidesPerView: 1 552 }, 553 }, 554 }); 555 return; 556 557} 558 559 560/** 561 * ã¡ã¤ã³ãã¸ã¥ã¢ã«ï¼è±èªï¼ã®çæ 562 */ 563function createIndexMainVisualEng() { 564 var indexMainVisualEng = new Swiper('#main_visual_eng .swiper-container', { 565 // Optional parameters 566 speed: 1000, 567 centeredSlides: true, 568 loop: true, 569 slidesPerView: 2, 570 loopAdditionalSlides: 1, 571 loopFillGroupWithBlank: true, 572 resistance: true, 573 autoplay: { 574 delay: 5000, 575 disableOnInteraction: false 576 }, 577 578 // Pagination 579 pagination: { 580 el: '#main_visual_pagination_eng', 581 type: 'bullets', 582 clickable: true 583 }, 584 585 // Navigation arrows 586 navigation: { 587 nextEl: '#main_visual_next_eng', 588 prevEl: '#main_visual_prev_eng' 589 }, 590 591 // Responsive breakpoints 592 breakpoints: { 593 767: { 594 slidesPerView: 1 595 }, 596 }, 597 }); 598 return; 599} 600 601/** 602 * ã³ã©ã ã®çæ 603 */ 604function createIndexColumn() { 605 var createIndexColumn = new Swiper('#index_column .swiper-container', { 606 // Optional parameters 607 speed: 1000, 608 centeredSlides: true, 609 loop: true, 610 slidesPerView: 2, 611 loopAdditionalSlides: 1, 612 loopFillGroupWithBlank: true, 613 resistance: true, 614 autoplay: { 615 delay: 5000, 616 disableOnInteraction: false 617 }, 618 619 // Pagination 620 //pagination: { 621 // el: '#index_column_pagination', 622 // type: 'bullets', 623 // clickable: true 624 //}, 625 626 // Navigation arrows 627 navigation: { 628 nextEl: '#index_column_next', 629 prevEl: '#index_column_prev' 630 }, 631 632 // Responsive breakpoints 633 breakpoints: { 634 767: { 635 watchOverflow: false 636 }, 637 }, 638 }); 639 return; 640} 641 642function scrollToAnker(hash) { 643 var headerHight = $('#header').outerHeight(); 644 var target = $(hash); 645 646 if ($(window).width() > 767) { 647 var position = target.offset().top - headerHight; 648 } else { 649 var position = target.offset().top; 650 } 651 $('body,html').stop().animate({ scrollTop: position }, 0); 652}
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.