1/** 2 * Document ready 3 */ 4 5 jQuery(document).ready(function() { 6 7 /* default open click */ 8 var def; 9 def = document.getElementsByClassName("defaultOpen"); 10 if(def.length > 0) { 11 def[0].click(); 12 } 13 14 /* mobile info accordion open/close */ 15 var acc = document.getElementsByClassName("accordion"); 16 var i; 17 18 for (i = 0; i < acc.length; i++) { 19 acc[i].addEventListener("click", function () { 20 this.classList.toggle("active"); 21 var panel = this.nextElementSibling; 22 if (panel.style.display === "block") { 23 panel.style.display = "none"; 24 } else { 25 panel.style.display = "block"; 26 } 27 }); 28 } 29 30 var acc_inner = document.getElementsByClassName("accordion_inner"); 31 var x; 32 33 for (x = 0; x < acc_inner.length; x++) { 34 acc_inner[x].addEventListener("click", function () { 35 this.classList.toggle("active"); 36 var panel_inner = this.nextElementSibling; 37 if (panel_inner.style.display === "block") { 38 panel_inner.style.display = "none"; 39 } else { 40 panel_inner.style.display = "block"; 41 } 42 }); 43 } 44 45 /* mobile filter accordion open/close, change text on filter accordion button in plp issues mobile */ 46 var acc_filter_mobile = document.getElementsByClassName("accordion_filters"); 47 var iter_filter_mobile; 48 49 for (iter_filter_mobile = 0; iter_filter_mobile < acc_filter_mobile.length; iter_filter_mobile++) { 50 acc_filter_mobile[iter_filter_mobile].addEventListener("click", function() { 51 this.classList.toggle("active_filter"); 52 var panel_filter_mobile = this.nextElementSibling; 53 if (panel_filter_mobile.style.maxHeight) { 54 panel_filter_mobile.style.maxHeight = null; 55 acc_filter_mobile[0].innerHTML = 'FILTRA GLI ARRETRATI'; 56 } else { 57 panel_filter_mobile.style.maxHeight = panel_filter_mobile.scrollHeight + "px"; 58 acc_filter_mobile[0].innerHTML = 'CHIUDI'; 59 } 60 }); 61 } 62 /* first sommario button click */ 63 var but = document.getElementsByClassName("tablinks_info"); 64 if(but.length > 0) { 65 but[0].click(); 66 but[0].focus(); 67 } 68 69 /* accordion autoclose stop */ 70 var accordion_mobile = document.getElementsByClassName("elementor-sub-item"); 71 var z; 72 73 for (z = 0; z < accordion_mobile.length; z++) { 74 accordion_mobile[z].addEventListener("click", function () { 75 event.stopPropagation(); 76 }); 77 } 78 79 /* hide cart in convenzioni/premi */ 80 var pathname = window.location.pathname; 81 82 /*var test_blade = document.getElementsByClassName('test_blade'); 83 test_blade[0].innerHTML = pathname.substring(1, 6);*/ 84 85 if(pathname.substring(1, 12) === 'convenzioni' || pathname.substring(1, 6) === 'premi' || pathname.substring(1, 15) === 'area-personale' || pathname.substring(4, 18) === 'area-personale' || pathname.substring(4, 18) === 'area-personale' || pathname.substring(1, 9) === 'digitale' || pathname.substring(1, 9) === 'business') { 86 87 /*var cart_icon = document.getElementsByClassName('elementor-menu-cart__wrapper');*/ 88 var cart_div = document.getElementsByClassName('elementor-menu-cart__container'); 89 var brand_div = document.getElementsByClassName('brand_section_header_mobile'); 90 var hamburger_div = document.getElementsByClassName('elementor-element-79e5b60a'); 91 var h; 92 93 /*for(h = 0; h < cart_icon.length; h++) { 94 cart_icon[h].style.display = "none"; 95 }*/ 96 97 for(h = 0; h < cart_div.length; h++) { 98 cart_div[h].style.display = "none"; 99 } 100 101 for(h = 0; h < brand_div.length; h++) { 102 brand_div[h].style.display = "none"; 103 } 104 105 for(h = 0; h < hamburger_div.length; h++) { 106 hamburger_div[h].style.display = "none"; 107 } 108 } 109 110 /* Present subscription auto-click on different shipping checkobx */ 111 var regalo_checkbox = document.getElementById("order_regalo"); 112 113 if (regalo_checkbox !== null) { 114 regalo_checkbox.addEventListener("change", function () { 115 var shipping_checkbox = document.getElementById("ship-to-different-address-checkbox"); 116 var shipping_div = document.getElementsByClassName("shipping_address"); 117 if (this.checked) { 118 shipping_checkbox.checked = true; 119 shipping_div[0].style.display = 'block'; 120 } else { 121 shipping_checkbox.checked = false;
122 shipping_div[0].style.display = 'none'; 123 } 124 }); 125 } 126 127 /* Modals checkout */ 128 129 // Get the modal 130 var modal = document.getElementById("modal_terms_conditions"); 131 var modal_d = document.getElementById("modal_terms_digitals"); 132 133 // Get the button that opens the modal 134 var btn = document.getElementById("terms_button"); 135 var btn_d = document.getElementById("digitals_button"); 136 137 // Get the <span> element that closes the modal 138 var span = document.getElementsByClassName("close_terms_conditions")[0]; 139 var span_d = document.getElementsByClassName("close_terms_digitals")[0]; 140 141 // When the user clicks on the button, open the modal 142 if(btn !== null && btn !== undefined) { 143 btn.addEventListener("click", function () { 144 modal.style.display = "block"; 145 }); 146 } 147 148 if(btn_d !== null && btn_d !== undefined) { 149 btn_d.addEventListener("click", function () { 150 modal_d.style.display = "block"; 151 }); 152 } 153 154 // When the user clicks on <span> (x), close the modal 155 if(span !== null && span !== undefined) { 156 span.addEventListener("click", function () { 157 modal.style.display = "none"; 158 }); 159 } 160 161 if(span_d !== null && span_d !== undefined) { 162 span_d.addEventListener("click", function () { 163 modal_d.style.display = "none"; 164 }); 165 } 166 167 // When the user clicks anywhere outside of the modal, close it 168 window.onclick = function(event) { 169 if (event.target === modal) { 170 modal.style.display = "none"; 171 } else if(event.target === modal_d) { 172 modal_d.style.display = "none"; 173 } 174 }; 175 176 /* Checkout, Billing Phone field wide on business */ 177 var business = document.getElementById("billing_customer_type_business"); 178 var client = document.getElementById("billing_customer_type_client"); 179 var phone = document.getElementById("billing_phone_field"); 180 181 if(business !== null) { 182 business.onclick = function() { 183 phone.classList.remove("form-row-last"); 184 phone.className += " form-row-wide"; 185 }; 186 } 187 188 if(client !== null) { 189 client.onclick = function () { 190 phone.classList.remove("form-row-wide"); 191 phone.className += " form-row-last"; 192 }; 193 } 194 195 /* Change homepage offers' action */ 196 var homepage_offers_DOM = document.getElementsByClassName("cart"); 197 if (window.location.pathname === '/shop/') { 198 var iter_cart; 199 200 for (iter_cart = 0; iter_cart < homepage_offers_DOM.length; iter_cart++) { 201 if(homepage_offers_DOM[iter_cart] !== null) { 202 homepage_offers_DOM[iter_cart].action = window.location.href; 203 } 204 } 205 } 206 207 /* Dismiss store notice button */ 208 var dismiss_button_DOM = document.getElementsByClassName("woocommerce-store-notice__dismiss-link") || ''; 209 var store_notice = document.getElementsByClassName("woocommerce-store-notice") || ''; 210 211 if(dismiss_button_DOM[0] !== null && typeof(dismiss_button_DOM[0]) !== undefined && typeof(dismiss_button_DOM[0]) !== "undefined" && dismiss_button_DOM[0] !== '' && store_notice[0] !== null && typeof(store_notice[0]) !== undefined && typeof(store_notice[0]) !== "undefined" && store_notice[0] !== '') { 212 213 dismiss_button_DOM[0].addEventListener('click', function() { 214 store_notice[0].style.display = 'none'; 215 }); 216 } 217 218 /* Check change on select in plp Arretrati and filter page */ 219 /*var selects_DOM = document.getElementsByClassName("select_filter_plp"); 220 if(selects_DOM !== null && selects_DOM !== undefined) { 221 var iter_select; 222 for(iter_select = 0; iter_select < selects_DOM.length; iter_select++) { 223 selects_DOM[iter_select].addEventListener("change", function () { 224 225 var custom_format; 226 var custom_year; 227 var custom_month; 228 229 var format_DOM = document.getElementById('format_plp_select'); 230 try{ 231 custom_format = format_DOM.value; 232 } catch { 233 custom_format = ''; 234 } 235 236 var year_DOM = document.getElementById('years_plp_select'); 237 try{
238 custom_year = year_DOM.value; 239 } catch { 240 custom_year = ''; 241 } 242 243 /*var month_DOM = document.getElementById('months_plp_select'); 244 try{ 245 custom_month = month_DOM.value; 246 } catch { 247 custom_month = ''; 248 }*/ 249 250 //document.getElementById('select_test_plp').innerHTML = custom_format+'<br>'+custom_year; 251 //window.location.search = 'custom_format='+custom_format+'&custom_year='+custom_year/*+'&custom_month='+custom_month*/; 252 /*}); 253 } 254 }*/ 255 256 /* Check click on filter submit in plp Arretrati and filter page MOBILE */ 257 var filter_nomob_DOM = document.getElementById("submit_filter_plp"); 258 if(filter_nomob_DOM !== null && filter_nomob_DOM !== undefined) { 259 filter_nomob_DOM.addEventListener("click", function () { 260 261 var custom_format; 262 var custom_year; 263 var custom_month; 264 265 var format_DOM = document.getElementById('format_plp_select'); 266 try{ 267 custom_format = format_DOM.value; 268 } catch { 269 custom_format = ''; 270 } 271 272 var year_DOM = document.getElementById('years_plp_select'); 273 try{ 274 custom_year = year_DOM.value; 275 } catch { 276 custom_year = ''; 277 } 278 279 /*var month_DOM = document.getElementById('months_plp_select'); 280 try{ 281 custom_month = month_DOM.value; 282 } catch { 283 custom_month = ''; 284 }*/ 285 286 //document.getElementById('select_test_plp').innerHTML = custom_format+'<br>'+custom_year; 287 window.location.search = 'custom_format='+custom_format+'&custom_year='+custom_year/*+'&custom_month='+custom_month*/; 288 }); 289 } 290 291 /* Remove filters select plp */ 292 var remove_filters_DOM = document.getElementById('elimina_filter_plp'); 293 if(remove_filters_DOM !== null && typeof(remove_filters_DOM) !== undefined && typeof(remove_filters_DOM) !== "undefined" && remove_filters_DOM !== '') { 294 remove_filters_DOM.addEventListener("click", function () { 295 window.location.search = 'custom_format=&custom_year=';/*&custom_month=';*/ 296 }); 297 } 298 299 /* Check click on filter submit in plp Arretrati and filter page MOBILE */ 300 var filter_mob_DOM = document.getElementById("submit_filter_plp_mobile"); 301 if(filter_mob_DOM !== null && filter_mob_DOM !== undefined) { 302 filter_mob_DOM.addEventListener("click", function () { 303 304 var custom_format_mob; 305 var custom_year_mob; 306 var custom_month_mob; 307 308 var format_mob_DOM = document.getElementById('format_plp_select_mobile'); 309 try{ 310 custom_format_mob = format_mob_DOM.value; 311 } catch { 312 custom_format_mob = ''; 313 } 314 315 var year_mob_DOM = document.getElementById('years_plp_select_mobile'); 316 try{ 317 custom_year_mob = year_mob_DOM.value; 318 } catch { 319 custom_year_mob = ''; 320 } 321 322 /*var month_mob_DOM = document.getElementById('months_plp_select_mobile'); 323 try{ 324 custom_month_mob = month_mob_DOM.value; 325 } catch { 326 custom_month_mob = ''; 327 }*/ 328 329 //document.getElementById('select_test_plp').innerHTML = custom_format+'<br>'+custom_year; 330 window.location.search = 'custom_format='+custom_format_mob+'&custom_year='+custom_year_mob/*+'&custom_month='+custom_month_mob*/; 331 }); 332 } 333 334 /* Remove filters select plp MOBILE */ 335 var remove_filters_mob_DOM = document.getElementById('elimina_filter_plp_mobile'); 336 if(remove_filters_mob_DOM !== null && typeof(remove_filters_mob_DOM) !== undefined && typeof(remove_filters_mob_DOM) !== "undefined" && remove_filters_mob_DOM !== '') { 337 remove_filters_mob_DOM.addEventListener("click", function () { 338 window.location.search = 'custom_format=&custom_year=';/*&custom_month=';*/ 339 }); 340 } 341
342 /* mobile banner accordion open/close */ 343 var acc_banner_mobile = document.getElementsByClassName("banner_mer_title_wrapper_mobile"); 344 var iter_banner_mobile; 345 346 for (iter_banner_mobile = 0; iter_banner_mobile < acc_banner_mobile.length; iter_banner_mobile++) { 347 acc_banner_mobile[iter_banner_mobile].addEventListener("click", function() { 348 this.classList.toggle("active_banner"); 349 var panel_banner_mobile = this.nextElementSibling; 350 var arrow_banner_mobile = document.querySelectorAll('.banner_mer_title_wrapper_mobile span.sub-arrow'); 351 if (panel_banner_mobile.style.maxHeight) { 352 panel_banner_mobile.style.maxHeight = null; 353 arrow_banner_mobile[0].style.transform = 'rotate(0deg)'; 354 } else { 355 panel_banner_mobile.style.maxHeight = panel_banner_mobile.scrollHeight + "px"; 356 arrow_banner_mobile[0].style.transform = 'rotate(180deg)'; 357 } 358 }); 359 } 360 361 /* Sticky header */ 362 var header = document.getElementById("main_banner"); 363 var header_mobile = document.getElementById("stickyheaders"); 364 var header_en = document.getElementById("main_banner_en"); 365 var header_mobile_en = document.getElementById("stickyheaders_en"); 366 367 if(header !== null && typeof(header) !== undefined && typeof(header) !== "undefined" && header !== '') { 368 if(window.getComputedStyle(header, null).display != 'none') { 369 var sticky = header.offsetTop; 370 window.onscroll = function() {stickyHeaderOnScroll(header, sticky)}; 371 } 372 } 373 374 if(header_mobile !== null && typeof(header_mobile) !== undefined && typeof(header_mobile) !== "undefined" && header_mobile !== '') { 375 if(window.getComputedStyle(header_mobile, null).display != 'none') { 376 var sticky_mobile = header_mobile.offsetTop; 377 window.onscroll = function() {stickyHeaderOnScroll(header_mobile, sticky_mobile)}; 378 } 379 } 380 381 if(header_en !== null && typeof(header_en) !== undefined && typeof(header_en) !== "undefined" && header_en !== '') { 382 if(window.getComputedStyle(header_en, null).display != 'none') { 383 var sticky_en = header_en.offsetTop; 384 window.onscroll = function() {stickyHeaderOnScroll(header_en, sticky_en)}; 385 } 386 } 387 388 if(header_mobile_en !== null && typeof(header_mobile_en) !== undefined && typeof(header_mobile_en) !== "undefined" && header_mobile_en !== '') { 389 if(window.getComputedStyle(header_mobile_en, null).display != 'none') { 390 var sticky_mobile_en = header_mobile_en.offsetTop; 391 window.onscroll = function() {stickyHeaderOnScroll(header_mobile_en, sticky_mobile_en)}; 392 } 393 } 394 395 /* Account redirect desktop */ 396 var button_account_arr = document.querySelectorAll('.account_button a'); 397 var button_account_DOM = button_account_arr[0]; 398 399 if (button_account_DOM !== null && typeof (button_account_DOM) !== undefined && typeof (button_account_DOM) !== "undefined" && button_account_DOM !== '') { 400 button_account_DOM.addEventListener("click", function (e) { 401 debugger; 402 e.preventDefault(); 403 console.log(e.target.id); 404 if (e.target.id === 'wishlist_link') { 405 var pathname_new = ''; 406 407 if (pathname.substring(5, 8) === '/en') { 408 pathname_new = '/shop/en/wishlist'; 409 } else { 410 pathname_new = '/shop/wishlist'; 411 } 412 window.location = 'https://' + window.location.hostname + pathname_new; 413 }else if (e.target.id !== 'logout_link') { 414 var pathname = window.location.pathname; 415 //console.log(pathname); 416 // ajax call 417 jQuery.ajax({ 418 type: "POST", 419 url: my_vars.ajaxurl, // Sottoparametro ajaxurl di my_vars 420 data: { 421 action: 'account_click', 422 _nonce: my_vars.nonce, // Sottoparametro nonce di my_vars 423 }, 424 success: function (response) { 425 var json_account = jQuery.parseJSON(response); 426 console.log(json_account.url_new); 427 if (json_account.url_new !== '') { 428 //console.log(json_account.url_new); 429 //window.location = json_account.url_new; 430 window.open(json_account.url_new, '_blank').focus(); 431 } else { 432 var pathname_new = ''; 433 434 if (pathname.substring(5, 8) === '/en') { 435 pathname_new = '/shop/en/mio-account?redirect_url=' + window.location.pathname; 436 } else { 437 pathname_new = '/shop/mio-account?redirect_url=' + window.location.pathname; 438 } 439 440 //console.log('https://' + window.location.hostname + pathname_new); 441 window.location = 'https://' + window.location.hostname + pathname_new; 442 } 443 444 //window.location = json_account.url_new; 445 }, 446 error: function (error) { 447 // TODO 448 } 449 }); 450 } 451 }); 452 } 453 454 /* mobile account logout */ 455 var button_logout_link_DOM = document.getElementById('logout_link'); 456 if (button_logout_link_DOM !== null && typeof (button_logout_link_DOM) !== undefined && typeof (button_logout_link_DOM) !== "undefined" && button_logout_link_DOM !== '') { 457 button_logout_link_DOM.addEventListener("click", function (e) { 458 console.log('okk'); 459 e.preventDefault(); 460 var hostname = window.location.hostname; 461 var pathname = window.location.pathname; 462 463 if (pathname.substring(5, 8) === '/en') { 464 pathname_new = '/en/area-personale/logout'; 465 } else { 466 pathname_new = '/area-personale/logout'; 467 } 468 console.log(pathname.substring(5, 8)); 469 console.log(hostname + '/area-personale/logout'); 470 window.location = 'https://' + hostname + pathname_new; 471 }); 472 } 473 var button_wishlist_link_DOM = document.getElementById('wishlist_link'); 474 if (button_wishlist_link_DOM !== null && typeof (button_wishlist_link_DOM) !== undefined && typeof (button_wishlist_link_DOM) !== "undefined" && button_wishlist_link_DOM !== '') { 475 button_wishlist_link_DOM.addEventListener("click", function (e) { 476 e.preventDefault(); 477 var hostname = window.location.hostname; 478 var pathname = window.location.pathname; 479 480 if (pathname.substring(5, 8) === '/en') { 481 pathname_new = '/shop/en/wishlist/'; 482 } else { 483 pathname_new = '/shop/wishlist/'; 484 } 485 window.location = 'https://' + hostname + pathname_new; 486 }); 487 } 488 489}); 490 491/* Megamenu */ 492document.addEventListener('DOMContentLoaded', function() { 493 494 let elements = document.querySelectorAll( '.popuptrigger' ); 495
496 elements.forEach(function(e,i){ 497 // on mouse enter li 498 e.addEventListener( 'mouseenter', function(){ 499 500 //let popupposts = [ '1761597']; 501 let popupposts = e.classList[1].substring(6, 20); 502 503 elementorProFrontend.modules.popup.showPopup( { id: popupposts } ); 504 505 // set popover position 506 const target = document.getElementsByClassName('popup-' + popupposts); 507 const targetRect = target[0].getBoundingClientRect(); 508 509 const popover = document.querySelectorAll('#elementor-popup-modal-' + popupposts + ' > div')[0]; 510 511 const popoverRect = popover.getBoundingClientRect(); 512 513 popover.classList.add('megamenu-' + popupposts); 514 515 const top = targetRect.top + targetRect.height; 516 517 const adminbar = document.getElementById('wpadminbar'); 518 let diff = 0; 519 if(isElementInViewport(adminbar)) { 520 diff = 32; 521 } 522 523 popover.style.top = `${top - diff}px`; 524 525 const popoverSection = popover.getElementsByTagName('section')[0]; 526 popoverSection.classList.add('megamenu-' + popupposts); 527 528 // on mouse leave popover 529 popoverSection.addEventListener( 'mouseleave', function(event){ 530 jQuery('body').click(); 531 }); 532 }); 533 534 // on mouse leave li 535 e.addEventListener( 'mouseleave', function(event){ 536 let popupposts = e.classList[1].substring(6, 20); 537 538 if(! event.toElement.classList.contains('megamenu-' + popupposts)){ 539 jQuery('body').click(); 540 } 541 }); 542 543 544 545 }); 546 547}); 548 549document.addEventListener('scroll', function (event) { 550 jQuery('body').click(); 551}, true /*Capture event*/); 552 553 554/* Check wordpress adminbar */ 555function isElementInViewport (el) { 556 557 if(el) { 558 var rect = el.getBoundingClientRect(); 559 560 return ( 561 rect.top >= 0 && 562 rect.left >= 0 && 563 rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /* or $(window).height() */ 564 rect.right <= (window.innerWidth || document.documentElement.clientWidth) /* or $(window).width() */ 565 ); 566 } else { 567 return false; 568 } 569 570 571} 572 573function stickyHeaderOnScroll(header, sticky) { 574 if (window.pageYOffset > sticky) { 575 header.classList.add("sticky"); 576 } else { 577 header.classList.remove("sticky"); 578 } 579} 580 581 582/** 583 * Align the visual state of the recurring switches (label.custom-switch) with the 584 * checked state of their checkbox. The label is activated natively through its 585 * for/id association, so the switch-active class can no longer be toggled by the 586 * label's own click handler without double-toggling the checkbox. 587 */ 588function syncRecurringSwitchState() { 589 590 var checkboxes = document.querySelectorAll('input.custom-checkbox'); 591 var i, label; 592 593 for (i = 0; i < checkboxes.length; i++) { 594 label = checkboxes[i].nextElementSibling; 595 if (label === null || !label.classList.contains('custom-switch')) continue; 596 if (checkboxes[i].checked) { 597 label.classList.add('switch-active'); 598 } else { 599 label.classList.remove('switch-active'); 600 } 601 } 602} 603 604jQuery(document).ready(function () { 605 syncRecurringSwitchState(); 606}); 607 608/** 609 * Check/Uncheck all subscription tab recurring checkboxes on single checkbox click 610 */ 611function synchCheckboxes(format_code) { 612 613 var cartadigDOM, digitaleDOM, cartaDOM; 614 615 cartadigDOM = document.getElementById('input_recurring_cartadig'); 616 digitaleDOM = document.getElementById('input_recurring_digitale'); 617 cartaDOM = document.getElementById('input_recurring_carta'); 618 619 switch(format_code) { 620 case 'cartadig': 621 if (digitaleDOM !== null) { 622 digitaleDOM.checked = cartadigDOM.checked; 623 } 624 if (cartaDOM !== null) { 625 cartaDOM.checked = cartadigDOM.checked; 626 } 627 break; 628 case 'digitale': 629 if (cartadigDOM !== null) { 630 cartadigDOM.checked = digitaleDOM.checked; 631 } 632 if (cartaDOM !== null) { 633 cartaDOM.checked = digitaleDOM.checked; 634 } 635 break; 636 case 'carta': 637 if (cartadigDOM !== null) { 638 cartadigDOM.checked = cartaDOM.checked; 639 } 640 if (digitaleDOM !== null) { 641 digitaleDOM.checked = cartaDOM.checked; 642 } 643 break; 644 } 645 646 syncRecurringSwitchState(); 647} 648 649/** 650 * Change subscription tab values on radio click 651 */ 652function radioClick(radio_id, language) { 653 654 var shipmentDOM, recurringDOM, descriptionDOM, 655 descriptionmobDOM, addinfoDOM, addinfomobDOM, 656 buttonidDOM, inputidDOM, availabilityidDOM, 657 buttons, radios, i, x; 658 const vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0); 659 660 // set text based on language 661 var sub_subscription_text_y = ''; 662 var sub_subscription_text_n = ''; 663 if(language === 'en') { 664 sub_subscription_text_y = 'Immediate availability'; 665 sub_subscription_text_n = 'Unavailable'; 666 } else { 667 sub_subscription_text_y = 'Disponibilitàimmediata'; 668 sub_subscription_text_n = 'Non disponibile'; 669 } 670 671 // get input dataset 672 var radio = document.getElementById(radio_id); 673 var product_id = radio.dataset.productid; 674 var shipment = radio.dataset.shipment; 675 var shipmentid = radio.dataset.shipmentid; 676 var recurring = radio.dataset.recurring; 677 var recurringid = radio.dataset.recurringid; 678 var stock = radio.dataset.stock; 679 var buttonid = radio.dataset.buttonid; 680 var inputid = radio.dataset.inputid; 681 var wp_siteurl = radio.dataset.wpsiteurl; 682 683 // change shipment 684 shipmentDOM = document.getElementById(shipmentid); 685 if(shipmentDOM !== null) { 686 shipmentDOM.innerHTML = shipment; 687 } 688 689 // display/hide recurring 690 recurringDOM = document.getElementById(recurringid); 691 if (recurringDOM !== null) { 692 if(recurring === "0") { 693 recurringDOM.style.display = "none"; 694 } else { 695 recurringDOM.style.display = "block"; 696 } 697 } 698 699 // enable/disable submit button, change availability info, based on stock-availability attribute. disable other formats' buttons and radio (vw < 1025) 700 buttonidDOM = document.getElementById(buttonid); 701 inputidDOM = document.getElementById(inputid); 702 availabilityidDOM = document.getElementById('availability_single_product'); 703 704 buttons = document.getElementsByClassName("submit_single_product_inner"); 705 for (i = 0; i < buttons.length; i++) { 706 buttons[i].disabled = true; 707 } 708 709 if(vw < 1025) { 710 radios = document.getElementsByClassName("radio_single_product_inner"); 711 for (x = 0; x < radios.length; x++) { 712 radios[x].checked = false;
713 } 714 radio.checked = true; 715 } 716 717 if(stock !== 'instock') { 718 if(buttonidDOM !== null) { 719 buttonidDOM.disabled = true; 720 } else if(inputidDOM !== null) { 721 inputidDOM.disabled = true; 722 } 723 availabilityidDOM.innerHTML = '<img class="sub-subscription-tab-img" src="' + wp_siteurl + 'wp-content/uploads/2021/09/logo_non_disponibile.svg"> <span class="non_disponibile">' + sub_subscription_text_n +'</span>'; 724 } else { 725 if(buttonidDOM !== null) { 726 buttonidDOM.disabled = false; 727 } else if(inputidDOM !== null) { 728 inputidDOM.disabled = false; 729 } 730 availabilityidDOM.innerHTML = '<img class="sub-subscription-tab-img" src="' + wp_siteurl + 'wp-content/uploads/2021/08/double_check_icon.svg"> <span>' + sub_subscription_text_y +'</span>'; 731 } 732 733 // change button action on old checkout 734 if(buttonidDOM !== null) { 735 buttonidDOM.value = product_id; 736 } 737 738 // ajax call 739 jQuery.ajax({ 740 type: "POST", 741 url: my_vars.ajaxurl, // Sottoparametro ajaxurl di my_vars 742 data: { 743 action: 'radio_click', 744 _nonce: my_vars.nonce, // Sottoparametro nonce di my_vars 745 pid: product_id 746 }, 747 success: function(response) { 748 // change description 749 var json = jQuery.parseJSON(response); 750 751 descriptionDOM = document.getElementById('description_text'); 752 descriptionmobDOM = document.getElementById('description_text_mobile'); 753 addinfoDOM = document.getElementById('additional_info_table_wrapper'); 754 addinfomobDOM = document.getElementById('additional_info_table_wrapper_mobile'); 755 756 if (descriptionDOM !== null) { 757 document.getElementById('desktop_sale_description').innerHTML= ''; 758 descriptionDOM.innerHTML = json.description_full; 759 } 760 if (descriptionmobDOM !== null) { 761 descriptionmobDOM.innerHTML = ''; 762 descriptionmobDOM.innerHTML = json.description_full; 763 } 764 765 if (addinfoDOM !== null) { 766 addinfoDOM.innerHTML = json.info_attributes; 767 } 768 if (addinfomobDOM !== null) { 769 addinfomobDOM.innerHTML = json.info_attributes; 770 } 771 }, 772 error: function(error) { 773 document.getElementById('test').innerHTML = error.responseText; 774 } 775 }); 776 777} 778 779/** 780 * Open subscription tab on button click 781 */ 782 783function openTab(evt, tabName, format_code, concorso_title, soci_title, first_radio, language) { 784 785 // Declare all variables 786 var i, tabcontent, tablinks, radios, 787 versdigDOM, prodinfoDOM, shipmentDOM, consegnaDOM, digitaleDOM, cartinaDOM, 788 concorsoDOM, sociDOM, concorsotitleDOM, socititleDOM; 789 790 // Get all elements (but first) with class="tabcontent" and hide them 791 tabcontent = document.getElementsByClassName("tabcontent"); 792 for (i = 0; i < tabcontent.length; i++) { 793 tabcontent[i].style.display = "none"; 794 } 795 796 // Get all elements (but first) with class="tablinks" and remove the class "active" 797 tablinks = document.getElementsByClassName("tablinks"); 798 for (i = 0; i < tablinks.length; i++) { 799 tablinks[i].className = tablinks[i].className.replace(" active", ""); 800 } 801 802 // Show the current tab, and add an "active" class to the button that opened the tab 803 document.getElementById(tabName).style.display = "block"; 804 evt.currentTarget.className += " active"; 805 806 // switch additional info 807 versdigDOM = document.getElementById('versione_digitale'); 808 prodinfoDOM = document.getElementById('product_additional_info'); 809 shipmentDOM = document.getElementById('shipment_single_product_descr'); 810 consegnaDOM = document.getElementById('consegna_single_product_descr'); 811 digitaleDOM = document.getElementById('digitale_single_product_descr'); 812 cartinaDOM = document.getElementById('cartina_single_product_descr'); 813 let descriptionbuttonDOM = document.getElementById("tab-title-description"); 814 let descriptionbuttonDOMTabs = document.getElementById("tab-description"); 815 //desktop
816 let concorsoProductTab = document.getElementById('tab-title-test_tab'); 817 let concorsoProductTabContent = document.getElementById('product_additional_info_concorso'); 818 819 //mobile 820 let concorsoProductTabContentMobile = document.getElementById('concorso_mobile_tab'); 821 822 // display/hide concorso/soci 823 concorsoDOM = document.getElementById('banner_concorso_single_product'); 824 concorsotitleDOM = document.getElementById('banner_concorso_single_product_legit'); 825 826 switch(format_code) { 827 case 'cartadig': 828 if (versdigDOM !== null) { 829 versdigDOM.style.display = "block"; 830 } 831 if (prodinfoDOM !== null) { 832 prodinfoDOM.style.display = "block"; 833 } 834 if (shipmentDOM !== null) { 835 shipmentDOM.style.display = "block"; 836 } 837 if (consegnaDOM !== null) { 838 consegnaDOM.style.display = "block"; 839 } 840 if (digitaleDOM !== null) { 841 digitaleDOM.style.display = "block"; 842 } 843 if (cartinaDOM !== null) { 844 cartinaDOM.style.display = "block"; 845 } 846 if (concorsoDOM !== null && concorsoProductTab!== null){ 847 concorsoProductTab.style.display = "inline-block"; 848 concorsoProductTabContent.style.display = "inline-block"; 849 concorsoProductTabContentMobile.style.display = "block"; 850 851 if (concorsoProductTab.classList.contains("active") && descriptionbuttonDOM.classList.contains("active") ){ 852 descriptionbuttonDOM.classList.remove("active"); 853 descriptionbuttonDOMTabs.style.display = "none"; 854 } 855 } 856 break; 857 case 'digitale': 858 if (versdigDOM !== null) { 859 versdigDOM.style.display = "none"; 860 } 861 if (prodinfoDOM !== null) { 862 prodinfoDOM.style.display = "none"; 863 } 864 if (shipmentDOM !== null) { 865 shipmentDOM.style.display = "none"; 866 } 867 if (consegnaDOM !== null) { 868 consegnaDOM.style.display = "none"; 869 } 870 if (digitaleDOM !== null) { 871 digitaleDOM.style.display = "none"; 872 } 873 if (cartinaDOM !== null) { 874 cartinaDOM.style.display = "none"; 875 } 876 if (concorsoDOM !== null && concorsoProductTab!== null ) { 877 concorsoProductTab.style.display = "none"; 878 concorsoProductTabContent.style.display = "none"; 879 concorsoProductTabContentMobile.style.display = "none"; 880 881 if (concorsoProductTab.classList.contains("active")){ 882 concorsoProductTab.classList.remove("active"); 883 descriptionbuttonDOM.classList.add('active'); 884 descriptionbuttonDOMTabs.style.display = "block"; 885 } 886 887 } 888 break; 889 case 'cartaceo': 890 if (versdigDOM !== null) { 891 versdigDOM.style.display = "none"; 892 } 893 if (prodinfoDOM !== null) { 894 prodinfoDOM.style.display = "block"; 895 } 896 if (shipmentDOM !== null) { 897 shipmentDOM.style.display = "block"; 898 } 899 if (consegnaDOM !== null) { 900 consegnaDOM.style.display = "block"; 901 } 902 if (digitaleDOM !== null) { 903 digitaleDOM.style.display = "none"; 904 } 905 if (cartinaDOM !== null) { 906 cartinaDOM.style.display = "block"; 907 } 908 if (concorsoDOM !== null && concorsoProductTab!== null) { 909 concorsoProductTab.style.display = "inline-block"; 910 concorsoProductTabContent.style.display = "inline-block"; 911 concorsoProductTabContentMobile.style.display = "block"; 912 913 if (concorsoProductTab.classList.contains("active") && descriptionbuttonDOM.classList.contains("active") ){ 914 descriptionbuttonDOM.classList.remove("active"); 915 descriptionbuttonDOMTabs.style.display = "none"; 916 } 917 } 918 break; 919 } 920 921 922 if(concorso_title !== '') { 923 if (concorsoDOM !== null) { 924 concorsoDOM.style.display = "block"; 925 } 926 if (concorsotitleDOM !== null) { 927 concorsotitleDOM.innerHTML = concorso_title; 928 } 929 } else { 930 if (concorsoDOM !== null) { 931 concorsoDOM.style.display = "none"; 932 } 933 } 934 935 sociDOM = document.getElementById('banner_soci_single_product'); 936 socititleDOM = document.getElementById('banner_soci_single_product_legit'); 937 if(soci_title !== '') { 938 if (sociDOM !== null) { 939 sociDOM.style.display = "block"; 940 } 941 if (socititleDOM !== null) { 942 socititleDOM.innerHTML = soci_title; 943 } 944 } else { 945 if (sociDOM !== null) { 946 sociDOM.style.display = "none"; 947 } 948 } 949 950 // richiama il click del radio button di default con tutte le sue funzioni 951 var first_radio_id = 'input_'+first_radio; 952 var firstradioDOM = document.getElementById(first_radio_id); 953 if (firstradioDOM !== null) { 954 firstradioDOM.checked = true; 955 } 956 if (first_radio !== '') { 957 radioClick(first_radio_id, language); 958 } 959 960 // ajax call 961 /*jQuery.ajax({ 962 type: "POST", 963 url: my_vars.ajaxurl, // Sottoparametro ajaxurl di my_vars 964 data: { 965 action: 'tab_click', 966 _nonce: my_vars.nonce, // Sottoparametro nonce di my_vars 967 pid: first_radio 968 }, 969 success: function(response) { 970 // change description 971 var json = jQuery.parseJSON(response); 972 973 galleryDOM = document.getElementsByClassName('elementor-1681500')[0]; 974 975 if (galleryDOM !== null) { 976 galleryDOM.innerHTML = json.gallery; 977 } 978 }, 979 error: function(error) { 980 document.getElementById('test').innerHTML = error.responseText; 981 } 982 });*/ 983 984} 985jQuery( document ).ready(function() {
986 let concorsoProductTab = document.getElementById('tab-title-test_tab'); 987 let descriptionbuttonDOM = document.getElementById("tab-title-description"); 988 let descriptionbuttonDOMTabs = document.getElementById("tab-description"); 989 setTimeout(() => { 990 if ( jQuery(concorsoProductTab).is(":hidden")){ 991 descriptionbuttonDOM.classList.add('active'); 992 descriptionbuttonDOMTabs.style.display = "block"; 993 } }, 1000); 994 995}); 996 997 998function openInfoTab(evt, tabName) { 999 var i, tabcontent, tablinks; 1000 tabcontent = document.getElementsByClassName("tabcontent_info"); 1001 for (i = 0; i < tabcontent.length; i++) { 1002 tabcontent[i].style.display = "none"; 1003 } 1004 tablinks = document.getElementsByClassName("tablinks_info"); 1005 for (i = 0; i < tablinks.length; i++) { 1006 tablinks[i].className = tablinks[i].className.replace(" active", ""); 1007 } 1008 document.getElementById(tabName).style.display = "block"; 1009 evt.currentTarget.className += " active"; 1010} 1011 1012/** 1013 * Scroll into view concorso/soci tab 1014 */ 1015function goToConcorso() { 1016 var i, tabcontents, concorsobuttonDOM, descriptionbuttonDOM, addinfobuttonDOM, concorsotabDOM, concorsobuttonmobileDOM; 1017 const vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0); 1018 1019 // get DOM content 1020 concorsotabDOM = document.getElementById("tab-test_tab"); 1021 tabcontents = document.getElementsByClassName("woocommerce-Tabs-panel"); 1022 concorsobuttonDOM = document.getElementById("tab-title-test_tab"); 1023 descriptionbuttonDOM = document.getElementById("tab-title-description"); 1024 addinfobuttonDOM = document.getElementById("tab-title-additional_information"); 1025 concorsobuttonmobileDOM = document.getElementById("concorso_mobile_button"); 1026 1027 // hide all tabs, display concorso tab 1028 for (i = 0; i < tabcontents.length; i++) { 1029 tabcontents[i].style.display = "none"; 1030 } 1031 concorsotabDOM.style.display = "block"; 1032 1033 // change buttons style 1034 concorsobuttonDOM.classList.remove("active"); 1035 if (descriptionbuttonDOM !== null) { 1036 descriptionbuttonDOM.classList.remove("active"); 1037 } 1038 if (addinfobuttonDOM !== null) { 1039 addinfobuttonDOM.classList.remove("active"); 1040 } 1041 concorsobuttonDOM.className += " active"; 1042 1043 if(vw < 1025) { 1044 if (!concorsobuttonmobileDOM.classList.contains('active')) { 1045 concorsobuttonmobileDOM.click(); 1046 } 1047 } 1048 1049 // scroll into view 1050 concorsotabDOM.scrollIntoView({ 1051 behavior: "smooth" 1052 }); 1053} 1054 1055/** 1056 * Scroll into view additional info tab 1057 */ 1058function goToAddinfo() { 1059 var i, tabcontents, concorsobuttonDOM, descriptionbuttonDOM, addinfobuttonDOM, addinfotabDOM, addinfobuttonmobileDOM; 1060 const vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0); 1061 1062 /* get DOM content */ 1063 addinfotabDOM = document.getElementById("tab-additional_information"); 1064 tabcontents = document.getElementsByClassName("woocommerce-Tabs-panel"); 1065 concorsobuttonDOM = document.getElementById("tab-title-test_tab"); 1066 descriptionbuttonDOM = document.getElementById("tab-title-description"); 1067 addinfobuttonDOM = document.getElementById("tab-title-additional_information"); 1068 addinfobuttonmobileDOM = document.getElementById("addinfo_mobile_button"); 1069 1070 /* hide all tabs, display concorso tab */ 1071 for (i = 0; i < tabcontents.length; i++) { 1072 tabcontents[i].style.display = "none"; 1073 } 1074 addinfotabDOM.style.display = "block"; 1075 1076 /* change buttons style */ 1077 if (concorsobuttonDOM !== null) { 1078 concorsobuttonDOM.classList.remove("active"); 1079 } 1080 if (descriptionbuttonDOM !== null) { 1081 descriptionbuttonDOM.classList.remove("active"); 1082 } 1083 addinfobuttonDOM.classList.remove("active"); 1084 addinfobuttonDOM.className += " active"; 1085 if(vw < 1025) { 1086 if (!addinfobuttonmobileDOM.classList.contains('active')) { 1087 addinfobuttonmobileDOM.click(); 1088 } 1089 } 1090 1091 /* scroll into view */ 1092 addinfotabDOM.scrollIntoView({ 1093 behavior: "smooth" 1094 }); 1095 1096} 1097jQuery( document ).ready(function() { 1098 jQuery( ".insta_checkout" ).on( "click", function(e) { 1099 if (jQuery(this).attr("data-productcart") == 1) { 1100 jQuery('.popup-prod').hide(); 1101 e.preventDefault(); 1102 let hrefUrl = (jQuery(this).attr("href")); 1103 1104 Swal.fire({ 1105 title: 'Hai nel carrello altri articoli, vuoi aggiungerli a quest\'ordine?', 1106 icon: 'info', 1107 showDenyButton: true,
1108 showCancelButton: false, 1109 confirmButtonText: 'Si', 1110 denyButtonText: `No`, 1111 allowOutsideClick: false, 1112 allowEscapeKey: false, 1113 focusConfirm : true, 1114 focusDeny: false, 1115 showCloseButton: true, 1116 customClass: { 1117 confirmButton: 'sweet-alert-confirm-buttom', 1118 denyButton: 'sweet-alert-deny-buttom', 1119 closeButton: 'sweet-alert-close-buttom', 1120 } 1121 }).then((result) => { 1122 /* Read more about isConfirmed, isDenied below */ 1123 if (result.isConfirmed) { 1124 hrefUrl += '&buyWithCart=1'; 1125 location.href = hrefUrl; 1126 } else if (result.isDenied) { 1127 hrefUrl += '&buyWithCart=0'; 1128 location.href = hrefUrl; 1129 } 1130 }); 1131 } 1132 } ); 1133}); 1134 1135jQuery(document).on('click', '.sweet-alert-close-buttom', function (e) { 1136 jQuery('.popup-prod').hide(); 1137 jQuery('body').removeClass('over'); 1138}); 1139 1140/* 1141 * Accessibilita' gallery prodotto (Fotorama). 1142 * Fotorama crea sia le frecce avanti/indietro sia le miniature come 1143 * <div role="button"> privi di testo: hanno tabindex e gestione tastiera, 1144 * ma nessun nome accessibile e nessuno stato di selezione esposto. 1145 * Qui vengono etichettati con aria-label (testi localizzati esposti dal 1146 * template sulla <figure class="fotorama">). 1147 * La striscia delle miniature viene dichiarata come tablist e ogni miniatura 1148 * come tab, cosi' l'immagine corrente puo' essere esposta con 1149 * aria-selected="true" (attributo valido solo sul ruolo tab, non su button). 1150 * Il cambio slide viene annunciato tramite la live region del template. 1151 * Le etichette vengono riapplicate ad ogni evento della gallery perche' 1152 * Fotorama puo' ricostruire i pulsanti (resize, cambio slide, fullscreen). 1153 */ 1154jQuery(document).ready(function () { 1155 var $galleries = jQuery('.woocommerce-product-gallery__wrapper.fotorama'); 1156 1157 if (!$galleries.length) { 1158 return; 1159 } 1160 1161 function labelFotoramaArrows($gallery) { 1162 var prevLabel = $gallery.attr('data-arr-prev-label') || 'Immagine precedente'; 1163 var nextLabel = $gallery.attr('data-arr-next-label') || 'Immagine successiva'; 1164 1165 $gallery.find('.fotorama__arr--prev').attr('aria-label', prevLabel); 1166 $gallery.find('.fotorama__arr--next').attr('aria-label', nextLabel); 1167 } 1168 1169 function labelFotoramaThumbs($gallery) { 1170 var thumbTemplate = $gallery.attr('data-thumb-label-template') || 'Vai a immagine {current} di {total}'; 1171 var thumbsLabel = $gallery.attr('data-thumbs-label') || 'Miniature delle immagini'; 1172 var $thumbs = $gallery.find('.fotorama__nav__frame--thumb'); 1173 var total = $thumbs.length; 1174 1175 if (!total) { 1176 return; 1177 } 1178 1179 // La striscia che contiene le miniature e' il selettore delle immagini. 1180 $thumbs.first().closest('.fotorama__nav__shaft') 1181 .attr('role', 'tablist') 1182 .attr('aria-label', thumbsLabel); 1183 1184 $thumbs.each(function (index) { 1185 var $thumb = jQuery(this); 1186 var label = thumbTemplate 1187 .replace('{current}', index + 1) 1188 .replace('{total}', total); 1189 var isActive = $thumb.hasClass('fotorama__active'); 1190 1191 /* 1192 * Fotorama assegna role="button": sostituito con role="tab" perche' 1193 * aria-selected e' consentito solo sui ruoli selezionabili. 1194 */ 1195 $thumb.attr('role', 'tab'); 1196 $thumb.attr('aria-label', label); 1197 1198 // Stato: la miniatura della slide visualizzata e' quella selezionata. 1199 $thumb.attr('aria-selected', isActive ? 'true' : 'false'); 1200 $thumb.removeAttr('aria-current'); 1201 1202 /* 1203 * L'immagine dentro la miniatura non deve essere annunciata: 1204 * il nome accessibile del pulsante e' gia' dato da aria-label. 1205 */ 1206 $thumb.find('img').attr('alt', ''); 1207 }); 1208 } 1209 1210 /* 1211 * Posizione della slide visualizzata: le miniature sono la fonte primaria, 1212 * i frame dello stage il fallback se la navigazione a miniature manca. 1213 */ 1214 function getFotoramaPosition($gallery) { 1215 var $frames = $gallery.find('.fotorama__nav__frame--thumb'); 1216 1217 if (!$frames.length) { 1218 $frames = $gallery.find('.fotorama__stage__frame'); 1219 } 1220 1221 return { 1222 index: $frames.index($frames.filter('.fotorama__active')), 1223 total: $frames.length 1224 }; 1225 } 1226 1227 /* 1228 * Fotorama non annuncia il cambio immagine: la posizione corrente viene 1229 * scritta nella live region del template ad ogni cambio slide. 1230 */ 1231 function announceFotoramaSlide($gallery) { 1232 var $region = $gallery.closest('.product-img-container').find('.js_gallery_live_region'); 1233 var position = getFotoramaPosition($gallery); 1234 var previousIndex = $gallery.data('a11yActiveIndex'); 1235 1236 if (!$region.length || position.index < 0 || !position.total) { 1237 return; 1238 } 1239 1240 if (previousIndex === position.index) { 1241 return; 1242 } 1243 1244 $gallery.data('a11yActiveIndex', position.index); 1245 1246 // Al primo passaggio si registra solo la posizione iniziale: il 1247 // caricamento della pagina non e' un cambio immagine da annunciare. 1248 if (typeof previousIndex === 'undefined') { 1249 return; 1250 } 1251 1252 var liveTemplate = $gallery.attr('data-live-label-template') || 'Immagine {current} di {total}'; 1253 1254 $region.text( 1255 liveTemplate 1256 .replace('{current}', position.index + 1) 1257 .replace('{total}', position.total) 1258 ); 1259 } 1260 1261 /* 1262 * Il ruolo tab richiede la navigazione con le frecce direzionali: 1263 * Fotorama gestisce solo Invio, quindi la si aggiunge qui. 1264 */
1265 function handleThumbKeydown(event) { 1266 var $thumb = jQuery(event.currentTarget); 1267 var $thumbs = $thumb.closest('.fotorama__nav__shaft').find('.fotorama__nav__frame--thumb'); 1268 var index = $thumbs.index($thumb); 1269 var target; 1270 1271 switch (event.key) { 1272 case 'ArrowRight': 1273 case 'ArrowDown': 1274 target = index + 1; 1275 break; 1276 case 'ArrowLeft': 1277 case 'ArrowUp': 1278 target = index - 1; 1279 break; 1280 case 'Home': 1281 target = 0; 1282 break; 1283 case 'End': 1284 target = $thumbs.length - 1; 1285 break; 1286 default: 1287 return; 1288 } 1289 1290 if (target < 0 || target >= $thumbs.length) { 1291 return; 1292 } 1293 1294 event.preventDefault(); 1295 1296 // click nativo: Fotorama ascolta l'evento DOM, non quello di jQuery. 1297 $thumbs.get(target).click(); 1298 $thumbs.get(target).focus(); 1299 } 1300 1301 function updateFotoramaAccessibility() { 1302 $galleries.each(function () { 1303 var $gallery = jQuery(this); 1304 1305 labelFotoramaArrows($gallery); 1306 labelFotoramaThumbs($gallery); 1307 announceFotoramaSlide($gallery); 1308 }); 1309 } 1310 1311 $galleries.on('fotorama:ready fotorama:show fotorama:load fotorama:showend fotorama:fullscreenenter fotorama:fullscreenexit', updateFotoramaAccessibility); 1312 $galleries.on('keydown', '.fotorama__nav__frame--thumb', handleThumbKeydown); 1313 1314 // Fallback: la gallery puo' essere gia' inizializzata quando questo script parte. 1315 updateFotoramaAccessibility(); 1316 setTimeout(updateFotoramaAccessibility, 500); 1317}); 1318
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.