1$(function () { 2 3 $("#shareOnFacebook").click(function () { 4 const navUrl = 'https://www.facebook.com/sharer/sharer.php?u=' + window.location.href; 5 window.open(navUrl, '_blank'); 6 }); 7 $("#shareOnX").click(function () { 8 const navUrl = 'https://twitter.com/intent/tweet?text=' + window.location.href; 9 window.open(navUrl, '_blank'); 10 }); 11 $("#shareOnLinkedin").click(function () { 12 const navUrl = 'https://www.linkedin.com/shareArticle?mini=true&url=' + window.location.href; 13 window.open(navUrl, "_blank"); 14 }); 15 $("#top-search-form").submit(function (event) { 16 let searchKey = $("#SearchPageKey").val().trim(); 17 if (searchKey.length < 2) { 18 event.preventDefault(); 19 } 20 }); 21 22 let showMoreBtn = $('.source-news__list-showMore'); 23 let sourceNewsYear = $('#sourceNewsYear'); 24 let isServerPagingNews = sourceNewsYear.attr('data-server-paging') === 'true'; 25 26 let defaultShowCount = parseInt($("#defaultShowCount").attr("value")) || 0; 27 let tempValue = 0; 28 let newsItemsList = []; 29 30 function dataYearList(dataYear) { 31 let counterValue = 0; 32 newsItemsList = []; 33 let elements = document.querySelectorAll('.source-news__list .news-list-item'); 34 35 defaultShowCount = tempValue; 36 37 elements.forEach(function (item) { 38 let currentYear = $(item).attr("data-year"); 39 if (currentYear === dataYear) { 40 newsItemsList.push(item); 41 counterValue++; 42 if (counterValue <= defaultShowCount) { 43 $(item).children().show(); 44 $(item).show(); 45 return; 46 } 47 } 48 49 $(item).children().hide(); 50 $(item).hide(); 51 }); 52 53 if (defaultShowCount < newsItemsList.length) { 54 showMoreBtn.show(); 55 } else { 56 showMoreBtn.hide(); 57 } 58 } 59 60 showMoreBtn.click(function (event) { 61 if ($(this).attr("data-server-paging") === "true") { 62 return; 63 } 64 65 event.preventDefault(); 66 defaultShowCount += defaultShowCount; 67 if (defaultShowCount >= newsItemsList.length) { 68 showMoreBtn.hide(); 69 } 70 71 let lastShowList = newsItemsList.slice(0, defaultShowCount); 72 lastShowList.forEach(function (item) { 73 $(item).show(); 74 $(item).children().show(); 75 }); 76 77 if (newsItemsList.length > 0) { 78 let lastVisibleElement = newsItemsList[Math.min(defaultShowCount, newsItemsList.length) - 1]; 79 let lastVisibleDOMElement = lastVisibleElement instanceof jQuery ? lastVisibleElement[0] : lastVisibleElement; 80 if (lastVisibleDOMElement) { 81 lastVisibleDOMElement.scrollIntoView({ behavior: 'smooth', block: 'end', inline: 'nearest' }); 82 } 83 } 84 }); 85 86 window.addEventListener('pageshow', function (event) { 87 if (event.persisted || (window.performance && window.performance.navigation.type == 2)) { 88 scrollPositionZero(window.scrollY); 89 } 90 let isFooterForm = document.querySelectorAll("body .footer-form-wrapper"); 91 if (isFooterForm.length === 0) { 92 $("body .footer-content").css("padding-top", "5rem"); 93 } 94 }); 95 function scrollPositionZero(position) { 96 if (position > 0) { 97 $("html,body").animate({ scrollTop: 0 }, 1000); 98 window.scroll({ 99 top: 0, 100 left: 0, 101 behavior: 'smooth' 102 }); 103 } 104 } 105 $(window).on("load", function () { 106 if (isServerPagingNews) { 107 return; 108 } 109 110 tempValue = defaultShowCount; 111 let selectedYear = sourceNewsYear.val(); 112 dataYearList(selectedYear); 113 }); 114 115 sourceNewsYear.on("change", function () { 116 if (isServerPagingNews) { 117 let selectedYear = $(this).val(); 118 if (!selectedYear) { 119 return; 120 } 121 122 const url = new URL(window.location.href); 123 url.searchParams.set("year", selectedYear); 124 url.searchParams.set("page", "1"); 125 window.location.href = url.toString(); 126 return; 127 } 128 129 window.scrollTo(0, 0); 130 dataYearList($(this).val()); 131 });
132 133 //product list item click url 134 $(".products__list .card").click(function () { 135 var getUrl = $(this).find(".card-url").val(); 136 window.location.href = getUrl; 137 }); 138 139 //video player 140 if (typeof Plyr !== 'undefined') { 141 const player = new Plyr('.plyr-start', { 142 muted: true, 143 volume: 1, 144 controls: ['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'fullscreen'], 145 hideControls: true 146 }); 147 } 148 149 //stats counter 150 $.fn.jQuerySimpleCounter = function (options) { 151 var settings = $.extend({ 152 start: 0, 153 end: 100, 154 easing: 'swing', 155 complete: '' 156 }, options); 157 158 var thisElement = $(this); 159 160 $({ count: settings.start }).animate({ count: settings.end }, { 161 duration: settings.duration, 162 easing: settings.easing, 163 step: function () { 164 var mathCount = Math.ceil(this.count); 165 thisElement.text(mathCount); 166 }, 167 complete: settings.complete 168 }); 169 }; 170 171 $('#number1').jQuerySimpleCounter({ end: $('#number1').data("animateTo"), duration: 1000 }); 172 $('#number2').jQuerySimpleCounter({ end: $('#number2').data("animateTo"), duration: 1500 }); 173 $('#number3').jQuerySimpleCounter({ end: $('#number3').data("animateTo"), duration: 2000 }); 174 175 //header menu hover 176 $('.header__menu > ul > li').hover( 177 function () { 178 $(this).addClass('active-menu'); 179 }, 180 function () { 181 $(this).removeClass('active-menu'); 182 } 183 ); 184 185 //header search bar 186 const searchIcon = document.querySelector('.search-icon'); 187 const searchContainer = document.querySelector('.header__section-controls--search'); 188 const searchClose = document.querySelector('.search-close'); 189 if (searchIcon && searchContainer && searchClose) { 190 searchIcon.addEventListener('click', () => { 191 searchContainer.classList.toggle('active'); 192 const searchInput = searchContainer.querySelector('.search-input'); 193 if (searchContainer.classList.contains('active')) { 194 searchInput.focus(); 195 } else { 196 searchInput.blur(); 197 } 198 }); 199 document.addEventListener('click', (event) => { 200 if (!searchContainer.contains(event.target) && searchContainer.classList.contains('active')) { 201 searchContainer.classList.remove('active'); 202 } 203 }); 204 searchClose.addEventListener('click', () => { 205 searchContainer.classList.remove('active'); 206 }); 207 } 208 209 //mobile hamburger menu 210 $('.menu__btn').on('click', function () { 211 if ($("#menu__toggle").is(':checked')) { 212 $("body").removeClass('mobile-menu'); 213 } else { 214 $("body").addClass('mobile-menu'); 215 } 216 }); 217 218 //homepage main slider 219 const homepageSlider = new Swiper(".homepage__slider", { 220 slidesPerView: 1, 221 pagination: { 222 el: ".swiper-pagination", 223 clickable: true 224 }, 225 autoplay: { 226 delay: 3000, 227 disableOnInteraction: false 228 }, 229 breakpoints: { 230 320: { 231 direction: "horizontal" 232 }, 233 992: { 234 direction: "vertical" 235 }, 236 } 237 }); 238 239 //homepage benefits mobile slider 240 if ($(window).width() < 992) { 241 const homepageBenefits = new Swiper(".homepage-benefits", { 242 spaceBetween: 16, 243 breakpoints: { 244 0: { 245 slidesPerView: 1.4 246 }, 247 768: { 248 slidesPerView: 2 249 } 250 } 251 }); 252 } 253 254 //homepage references logo slider 255 const homepageReferences = new Swiper(".references-logo", { 256 direction: "horizontal", 257 slidesPerView: 'auto', 258 loop: true, 259 autoplay: { 260 delay: 3000, 261 disableOnInteraction: false 262 }, 263 breakpoints: { 264 320: { 265 slidesPerView: 2, 266 spaceBetween: 15 267 }, 268 768: { 269 slidesPerView: 4, 270 spaceBetween: 20 271 }, 272 1024: { 273 slidesPerView: 4.5, 274 spaceBetween: 35 275 }, 276 1280: { 277 slidesPerView: 5.5, 278 spaceBetween: 40 279 } 280 } 281 });
282 283 //message counter limit 284 const textarea = document.getElementById('inputMessage'); 285 const counter = document.getElementById('counter'); 286 const maxLength = 450; 287 if (textarea && counter) { 288 textarea.addEventListener('input', () => { 289 const currentLength = textarea.value.length; 290 counter.textContent = `${currentLength} / ${maxLength}`; 291 }); 292 } 293 $(".header__menu li a").click(function () { 294 $(".active-menu").removeClass("active-menu"); 295 }); 296 297 $(".rd-center__wrapper .item-card-btn").click(function (e) { 298 e.preventDefault(); 299 const targetContent = $(this).data("target"); 300 $("#modalContent").html($(targetContent).html()); 301 $(".modal-title").text($(this).parents(".rd-center__box, .page-head").find(".target-title").text()); 302 const modal = new bootstrap.Modal(document.getElementById("modalDiscover")); 303 modal.show(); 304 }); 305 306 $(".modal-wrapper").click(function (event) { 307 if (!modal.is(event.target) && modal.has(event.target).length === 0) { 308 closeModal(); 309 } 310 }); 311 312 //Success Stories Page Slider 313 const source_swiper = new Swiper(".source-swiper", { 314 direction: 'horizontal', 315 speed: 500, 316 slidesPerView: 1, 317 spaceBetween: 20, 318 autoplay: { 319 delay: 2500 320 }, 321 pagination: { 322 el: '.swiper-pagination', 323 clickable: true, 324 }, 325 breakpoints: { 326 320: { 327 slidesPerView: 1.25 328 }, 329 768: { 330 slidesPerView: 2 331 }, 332 1200: { 333 slidesPerView: 3 334 } 335 } 336 }); 337 338 //Services Detail Page Success Stories Part Slider 339 const swiperSlides = document.querySelectorAll('.success-stories-swiper .swiper-slide'); 340 if (swiperSlides.length > 0) { 341 let cardItemRect = $(".card-item")[0].getBoundingClientRect(), 342 cardInfoRect = $(".card-info")[0].getBoundingClientRect(), 343 partTitleRect = $(".part-title")[0].getBoundingClientRect(); 344 345 let value = cardItemRect.height - cardInfoRect.height - partTitleRect.height; 346 347 let slidesPerViewValue = 0; 348 if (swiperSlides.length >= 3) { 349 slidesPerViewValue = 3; 350 } 351 else { 352 slidesPerViewValue = 2; 353 $.each(swiperSlides, function (index, item) { 354 $(item).addClass("set-card"); 355 }); 356 } 357 const success_stories_swiper = new Swiper(".services__detail .success-stories-swiper", { 358 direction: 'horizontal', 359 pagination: { 360 el: '.swiper-pagination.part-pagination', 361 clickable: true, 362 }, 363 breakpoints: { 364 320: { 365 slidesPerView: 1 366 }, 367 767: { 368 slidesPerView: 2 369 }, 370 992: { 371 slidesPerView: slidesPerViewValue, 372 allowTouchMove: false 373 } 374 } 375 }); 376
377 swiperSlides.forEach(slide => { 378 379 const card = slide.querySelector('.card'); 380 const cardTitle = slide.querySelector('.part-title'); 381 const cardInfo = slide.querySelector('.card-info'); 382 383 const cardHeight = card.offsetHeight; 384 const cardInfoHeight = cardTitle.offsetHeight - 20; 385 386 cardTitle.style.transform = `${cardHeight}px`; 387 function ElementStyleNone(slideToExclude) { 388 swiperSlides.forEach(s => { 389 if (s !== slideToExclude) { 390 const excludedCardTitle = s.querySelector('.part-title'); 391 const excludedCardInfo = s.querySelector('.card-info'); 392 393 excludedCardTitle.style.transform = `none`; 394 excludedCardInfo.style.top = `100%`; 395 s.classList.remove('active'); 396 } 397 }); 398 } 399 400 if ($(window).width() > 992) { 401 402 slide.addEventListener('mouseenter', () => { 403 cardTitle.style.transform = `translateY(-${cardHeight - cardInfoHeight}px)`; 404 cardInfo.style.top = `${cardTitle.offsetHeight - 70}px`; 405 406 calcCardHeightSpace(parseInt(cardInfo.style.top)); 407 }); 408 409 slide.addEventListener('mouseleave', () => { 410 ElementStyleNone(null); 411 }); 412 } else { 413 slide.addEventListener('click', function () { 414 const isOpen = this.classList.contains('active'); 415 416 if (isOpen) { 417 this.classList.remove('active'); 418 cardTitle.style.transform = `none`; 419 cardInfo.style.top = `100%`; 420 421 } else { 422 ElementStyleNone(this); 423 this.classList.add('active'); 424 cardTitle.style.transform = `translateY(-${cardHeight - cardInfoHeight}px)`; 425 cardInfo.style.top = `${cardTitle.offsetHeight - 50}px`; 426 calcCardHeightSpace(parseInt(cardInfo.style.top)); 427 } 428 }); 429 } 430 }); 431 function calcCardHeightSpace(cardInfoTop) { 432 433 let newValue = cardInfoTop - value; 434 435 let lastValue = value + newValue; 436 437 $(".card-info").css('height', 'calc(100% - ' + lastValue + 'px)'); 438 } 439 } 440 441 const cardItem = document.querySelector('.success-stories-part.card-item'); 442 if (cardItem && $(window).width() <= 768) { 443 444 const cardTitle = document.querySelector('.success-stories-part.card-item .part-title'); 445 const cardInfo = document.querySelector('.success-stories-part.card-item .card-info'); 446 447 const cardHeight = cardItem.offsetHeight; 448 const cardInfoHeight = cardTitle.offsetHeight - 20; 449 450 cardTitle.style.transform = `${cardHeight}px`; 451 cardItem.addEventListener('click', function () { 452 453 const isOpen = this.classList.contains('active'); 454 455 this.classList.remove('active'); 456 457 cardTitle.style.transform = `none`; 458 cardInfo.style.top = `100%`; 459 460 if (!isOpen) { 461 this.classList.add('active'); 462 cardTitle.style.transform = `translateY(-${cardHeight - cardInfoHeight}px)`; 463 cardInfo.style.top = `${cardTitle.offsetHeight - 40}px`; 464 } 465 }); 466 } 467 468 const career_swiper = new Swiper(".career-swiper", { 469 spaceBetween: 0, 470 pagination: { 471 el: ".swiper-pagination", 472 clickable: true 473 }, 474 breakpoints: { 475 320: { 476 slidesPerView: 1 477 }, 478 768: { 479 slidesPerView: 2 480 }, 481 992: { 482 slidesPerView: 3 483 } 484 }, 485 on: { 486 init: function () { 487 const slideCount = this.slides.length; 488 489 if (slideCount <= 3) { 490 this.wrapperEl.style.paddingBottom = "0"; 491 } 492 } 493 } 494 });
495}); 496 497$(document).ready(function () { 498 $(window).on('load', function () { 499 setupHoverEffects(); 500 }); 501 502 $(window).resize(function () { 503 setupHoverEffects(); 504 }); 505 506 if (window.innerWidth > 992) { 507 setupHoverEffects(); 508 } else { 509 $(".services__box").click(function () { 510 window.location = $(this).find(".card-link").attr("href"); 511 }); 512 } 513 updateServiceBoxSizes(); 514 function updateServiceBoxSizes() { 515 const services = document.querySelectorAll('.services__box'); 516 517 services.forEach(box => { 518 const serviceTitle = box.querySelector('.services__box-title'); 519 const hoverItem = box.querySelector('.hover-item'); 520 521 if (!serviceTitle || !hoverItem) return; 522 523 serviceTitle.style.transform = ''; 524 hoverItem.style.transform = ''; 525 }); 526 } 527 function setupHoverEffects() { 528 const services = document.querySelectorAll('.services__box'); 529 530 if (services.length) { 531 services.forEach(box => { 532 const serviceTitle = box.querySelector('.services__box-title'); 533 const hoverItem = box.querySelector('.hover-item'); 534 const hoverCardLink = box.querySelector('.card-link'); 535 536 if (!serviceTitle || !hoverItem || !hoverCardLink) { 537 console.error('Eksik Item:', box); 538 return; 539 } 540 541 box.addEventListener('mouseenter', () => { 542 hoverItem.style.transform = 'translate(0, 0)'; 543 const boxHeight = box.clientHeight; 544 const titleHeight = serviceTitle.clientHeight; 545 serviceTitle.style.transform = `translate(0, -${boxHeight - titleHeight - 50}px)`; 546 serviceTitle.style.color = '#004CC8'; 547 hoverCardLink.classList.add('visible'); 548 }); 549 550 box.addEventListener('mouseleave', () => { 551 hoverItem.style.transform = 'translate(100%, 100%)'; 552 serviceTitle.style.transform = 'translate(0, 0)'; 553 serviceTitle.style.color = ''; 554 hoverCardLink.classList.remove('visible'); 555 }); 556 }); 557 } 558 } 559 $(window).on("load", function () { 560 let popupCareer = $("#btnPopupCareer") 561 popupCareer.click(); 562 popupCareer.closest("body").removeClass("modal-open"); 563 popupCareer.closest("body").find(".modal-backdrop").css("height", "unset"); 564 }) 565 566 //partnership-detail tag url 567 var parts = window.location.pathname.split("/"); 568 if (parts[1] && parts[2]) { 569 $("#partnerDetail-tag-url").attr("href", "/" + parts[1] + "/" + parts[2]); 570 } 571 572 //header menu for partnership page 573 function scrollToHash(hash) { 574 var $target = $(hash); 575 if ($target.length) { 576 $('html, body').animate({ 577 scrollTop: $target.offset().top 578 }, 600); 579 } 580 } 581 582 if (window.location.hash) { 583 scrollToHash(window.location.hash); 584 } 585 586 $('.scroll-link').click(function (e) { 587 var linkPath = this.pathname.replace(/\/$/, ''); 588 var currentPath = window.location.pathname.replace(/\/$/, ''); 589 var targetHash = this.hash; 590 591 if (linkPath === currentPath && targetHash) { 592 e.preventDefault(); 593 scrollToHash(targetHash); 594 history.pushState(null, null, targetHash); 595 } 596 }); 597 598 $(window).on('hashchange', function () { 599 scrollToHash(window.location.hash); 600 }); 601 602 $("#collapseThree .scroll-link").click(function () { 603 $("#menu__toggle").click(); 604 $("body").removeClass("mobile-menu"); 605 }); 606 607 $(".contact .page-head > .btn").click(function (e) { 608 e.preventDefault(); 609 $(this).hide(); 610 $(this).closest(".page-head").find(".desc-group").hide(); 611 $(".dt-otp-section").show(); 612 });
613 614 /* ââ DeÄiÅken Tanımlamaları ââ */ 615 const $input = $('#phoneInput'); 616 const $btn = $('#btnKod'); 617 const $stepPhone = $('#stepPhone'); 618 const $stepOtp = $('#stepOtp'); 619 const $codeInputs = $('.dt-otp-code-input'); 620 const $btnDogrula = $('#btnDogrula'); 621 const $timerSpan = $('#otpTimer'); 622 const $resendEl = $('#otpResend'); 623 const $successEl = $('#otpSuccess'); 624 let timerInterval = null; 625 626 /* ââ Telefon Maskesi Fonksiyonu ââ */ 627 function applyMask(raw) { 628 let digits = raw.replace(/\D/g, ''); 629 if (digits.length > 0 && digits[0] !== '0') digits = '0' + digits; 630 631 let result = ''; 632 if (digits.length >= 1) result = digits[0]; 633 if (digits.length >= 2) result += ' (' + digits[1]; 634 if (digits.length >= 3) result += digits.substring(2, Math.min(digits.length, 4)); 635 if (digits.length >= 4) result += ')'; 636 if (digits.length >= 5) result += ' ' + digits.substring(4, Math.min(digits.length, 7)); 637 if (digits.length >= 8) result += ' ' + digits.substring(7, Math.min(digits.length, 9)); 638 if (digits.length >= 10) result += ' ' + digits.substring(9, Math.min(digits.length, 11)); 639 return result; 640 } 641 function updateButton(val) { 642 $btn.prop('disabled', val.replace(/\D/g, '').length < 11); 643 } 644 645 /* ââ Telefon Input Olayları ââ */ 646 $input.on('input', function () { 647 const cursorPos = this.selectionStart; 648 const prevLen = $(this).val().length; 649 const formatted = applyMask($(this).val()); 650 651 $(this).val(formatted); 652 653 const diff = formatted.length - prevLen; 654 this.setSelectionRange(Math.max(0, cursorPos + diff), Math.max(0, cursorPos + diff)); 655 updateButton(formatted); 656 }); 657 658 $input.on('keydown', function (e) { 659 const allowed = [8, 46, 9, 27, 13, 37, 38, 39, 40]; 660 if (allowed.includes(e.which)) return; 661 if ((e.ctrlKey || e.metaKey) && [65, 67, 86, 88].includes(e.which)) return; 662 663 if (e.key < '0' || e.key > '9') e.preventDefault(); 664 if ($(this).val().replace(/\D/g, '').length >= 11 && e.key >= '0' && e.key <= '9') { 665 e.preventDefault(); 666 } 667 }); 668 669 $input.on('paste', function (e) { 670 e.preventDefault(); 671 const paste = (e.originalEvent.clipboardData || window.clipboardData).getData('text'); 672 const formatted = applyMask(paste.replace(/\D/g, '')); 673 $(this).val(formatted); 674 updateButton(formatted); 675 }); 676 677 /* ââ OTP İÅlemleri ââ */ 678 function checkOtpComplete() { 679 let filled = $codeInputs.filter(function () { 680 return $(this).val().length === 1; 681 }).length; 682 $btnDogrula.prop('disabled', filled < 6); 683 } 684 685 $codeInputs.each(function (idx) { 686 const $this = $(this); 687 688 $this.on('input', function () { 689 $this.val($this.val().replace(/\D/g, '').slice(0, 1)); 690 checkOtpComplete(); 691 692 if ($this.val() && idx < $codeInputs.length - 1) { 693 $codeInputs.eq(idx + 1).focus(); 694 } 695 }); 696 697 $this.on('keydown', function (e) { 698 if (e.key === 'Backspace') { 699 if (!$this.val() && idx > 0) { 700 $codeInputs.eq(idx - 1).focus().val(''); 701 checkOtpComplete(); 702 } 703 } 704 if (e.key === 'ArrowLeft' && idx > 0) $codeInputs.eq(idx - 1).focus(); 705 if (e.key === 'ArrowRight' && idx < $codeInputs.length - 1) $codeInputs.eq(idx + 1).focus(); 706 }); 707 708 $this.on('paste', function (e) { 709 e.preventDefault(); 710 const paste = (e.originalEvent.clipboardData || window.clipboardData).getData('text').replace(/\D/g, ''); 711 712 $codeInputs.each(function (i) { 713 $(this).val(paste[i] || ''); 714 }); 715 716 checkOtpComplete(); 717 const focusIdx = Math.min(paste.length, $codeInputs.length) - 1; 718 if (focusIdx >= 0) $codeInputs.eq(focusIdx).focus(); 719 }); 720 });
721 722 /* ââ Sayaç Fonksiyonları ââ */ 723 function startTimer() { 724 let seconds = 180; 725 const $timerWrapper = $('#timerWrapper') 726 if (timerInterval) clearInterval(timerInterval); 727 $timerSpan.text(seconds); 728 $timerWrapper.show(); 729 $resendEl.removeClass('active').css({ 730 'pointer-events': 'none', 731 'opacity': '0.5' 732 }) 733 734 timerInterval = setInterval(function () { 735 seconds--; 736 $timerSpan.text(seconds); 737 if (seconds <= 0) { 738 clearInterval(timerInterval); 739 $timerWrapper.hide(); 740 $resendEl.addClass('active').css({ 741 'pointer-events': 'auto', 742 'opacity': '1' 743 }); 744 } 745 }, 1000); 746 } 747 748 function showErrorAlert(titleText) { 749 Swal.fire({ 750 icon: 'error', 751 title: titleText, 752 confirmButtonText: 'Tamam', 753 showConfirmButton: true, 754 allowOutsideClick: false, 755 buttonsStyling: false, 756 customClass: { 757 title: 'custom-swal-title', 758 htmlContainer: 'custom-swal-text', 759 confirmButton: 'swal2-confirm btn btn-primary custom-swal-button' 760 } 761 }); 762 } 763 764 $(document).on('click', '#btnKod', function () { 765 if ($(this).prop('disabled')) return; 766 var phone = $input.val(); 767 var siteKey = document.getElementById("captchaSiteKey")?.value; 768 769 grecaptcha.ready(function () { 770 grecaptcha.execute(siteKey, { action: 'otp_send' }).then(function (captchaToken) { 771 $stepPhone.addClass('d-none'); 772 $stepOtp.removeClass('d-none'); 773 startTimer(); 774 $.ajax({
775 url: '/Otp/SendSmsOtp', 776 type: 'POST', 777 data: { phoneNumber: phone, captchaToken: captchaToken }, 778 success: function (res) { 779 if (res.success) { 780 $codeInputs.first().focus(); 781 } else { 782 $stepPhone.removeClass('d-none'); 783 $stepOtp.addClass('d-none'); 784 showErrorAlert(res.message); 785 } 786 }, 787 error: function () { 788 $stepPhone.removeClass('d-none'); 789 $stepOtp.addClass('d-none'); 790 showErrorAlert('Bir hata oluÅtu.'); 791 } 792 }); 793 }); 794 }); 795 }); 796 797 $(document).on('click', '#otpResend', function () { 798 const $this = $(this); 799 if (!$this.hasClass('active')) return; 800 var phone = $input.val(); 801 var siteKey = document.getElementById("captchaSiteKey")?.value; 802 803 grecaptcha.ready(function () { 804 grecaptcha.execute(siteKey, { action: 'otp_resend' }).then(function (captchaToken) { 805 $.ajax({
806 url: '/Otp/SendSmsOtp', 807 type: 'POST', 808 data: { phoneNumber: phone, captchaToken: captchaToken }, 809 success: function (res) { 810 if (res.success) { 811 $codeInputs.val(''); 812 $btnDogrula.prop('disabled', true); 813 $codeInputs.first().focus(); 814 startTimer(); 815 } else { 816 showErrorAlert(res.message); 817 } 818 }, 819 error: function () { 820 showErrorAlert('Bir hata oluÅtu.'); 821 } 822 }); 823 }); 824 }); 825 }); 826 /* ââ DoÄrulama BaÅarılı ââ */ 827 $(document).on('click', '#btnDogrula', function (e) { 828 e.preventDefault(); 829 const $self = $(this); 830 if ($self.prop('disabled')) return; 831 var phone = $input.val(); 832 var code = ''; 833 $codeInputs.each(function () { code += $(this).val(); }); 834 var siteKey = document.getElementById("captchaSiteKey")?.value; 835 836 grecaptcha.ready(function () { 837 grecaptcha.execute(siteKey, { action: 'otp_verify' }).then(function (captchaToken) { 838 $.ajax({
839 url: '/Otp/Verify', 840 type: 'POST', 841 data: { phoneNumber: phone, otpCode: code, captchaToken: captchaToken }, 842 success: function (res) { 843 if (res.success) { 844 if (timerInterval) clearInterval(timerInterval); 845 $codeInputs.addClass('success').prop('readonly', true); 846 $resendEl.addClass('d-none'); 847 $(".dt-otp-btn-wrap").remove(); 848 $successEl.removeClass('d-none'); 849 setTimeout(function () { 850 window.location.href = '/Meeting/OnlineMeeting'; 851 }, 2000); 852 } else { 853 $self.prop('disabled', false); 854 showErrorAlert(res.message); 855 } 856 }, 857 error: function () { 858 showErrorAlert('Bir hata oluÅtu.'); 859 } 860 }); 861 }); 862 }); 863 }); 864}); 865function scrollToFooterForm() { 866 $("#contact").get(0).scrollIntoView({ behavior: 'smooth' }); 867} 868function setFooterFormSelectedTopic(topicValue) { 869 const optionValues = $.map($('#inputTopicTitle option'), function (option) { 870 return option.value; 871 }); 872 optionValues.includes(topicValue) ? $('#inputTopicTitle').val(topicValue) : $('#inputTopicTitle :nth-child(1)').prop('selected', true); 873} 874 875const ONE_WEEK = 7 * 24 * 60 * 60 * 1000; 876function didModalDateExpired() { 877 let showModalDate = window.localStorage.getItem("showModalDate"); 878 879 if (!isNullOrEmpty(showModalDate)) { 880 let currentDate = new Date().getTime(); 881 let modalDate = parseInt(showModalDate); 882 883 if (!isNaN(modalDate)) { 884 return currentDate > modalDate; 885 } 886 } 887 return true; 888} 889function setShowModalDate() { 890 let expireDate = new Date().getTime() + ONE_WEEK 891 localStorage.setItem("showModalDate", expireDate.toString()); 892} 893function isNullOrEmpty(value) { 894 return value === null || value === undefined || value === ''; 895} 896
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.