1$(function () { 2 // var diningGallerySwiper = new Swiper('.gallery-Kve .js-mobile-dining-gallery-swiper', { 3 // spaceBetween: 6, 4 // // slidesPerView = (wrapperWidth + spaceBetween) / (itemWidth + spaceBetween) 5 // slidesPerView: 2.3819, 6 // freeMode: true 7 // }); 8 9 $('.js-picture-gallery-modal').each(function (index, ele) { 10 var openHotelModalFactory = (function () { 11 // intialize slick when opening modal for the 1st time 12 var isImagesSlickInitialized = false; 13 var gallery; 14 return function (e) { 15 var windowWidth = window.innerWidth; 16 var bottomHeight, mobileBottomHeight; 17 18 if (windowWidth >= 768 && isiOS) { 19 // iPad 20 bottomHeight = 66; 21 mobileBottomHeight = 300; 22 } else { 23 // PC & Mobile 24 bottomHeight = 39 + 35 + 28 + 22 + 20; 25 mobileBottomHeight = 24 + 16 + 22 + 15 + 28; 26 } 27 console.log("bottomHeight======") 28 console.log(bottomHeight) 29 console.log(mobileBottomHeight) 30 31 $(this).calcModalSize({ 32 ratio: 1350 / 745, // imageWidth / imageHeight 33 width: 0.7597, 34 bottomHeight: bottomHeight, 35 responsive: [ 36 { 37 breakpoint: 767, 38 settings: { 39 width: 1, 40 bottomHeight: mobileBottomHeight 41 } 42 } 43 ], 44 }).css({ 45 'display': 'block', 46 'visibility': 'hidden' 47 }); 48 49 var slideEl = $(this).find('.js-common-gallery-modal-swiper')[0]; 50 var paginationEl = $(this).find('.swiper-common-pagination')[0]; 51 var prevEl = $(this).find('.js-common-swiper-prev')[0]; 52 var nextEl = $(this).find('.js-common-swiper-next')[0]; 53 54 if (!isImagesSlickInitialized) { 55 gallery = new Swiper(slideEl, { 56 navigation: { 57 prevEl: prevEl, 58 nextEl: nextEl, 59 }, 60 pagination: { 61 el: paginationEl 62 } 63 }); 64 isImagesSlickInitialized = true; 65 } else { 66 window.dispatchEvent($.newEvent('resize')); 67 window.dispatchEvent($.newEvent('orientationchange')); 68 } 69 70 $(this).css({ 71 'display': 'none', 72 'visibility': 'visible' 73 }); 74 75 var imageIndex = parseInt($(this).data('image-index')); 76 gallery.slideTo(imageIndex); 77 } 78 })(); 79 $(this).on('show.bs.modal', openHotelModalFactory); 80 }); 81}); 82 83$(document).on('click', '.js-dining-gallery-item', function (e) { 84 var targetModal = $(this).data('target'); 85 var $diningImages = $(this).closest('.js-dining-gallery-items').find('.js-dining-gallery-item-container'); 86 var imageIndex = $(this).data("image-index"); 87 const modalId = $(this).data('modal-id'); 88 if (!modalId) return; 89 const $targetModal = $(`.js-picture-gallery-modal[data-modal-id="${modalId}"]`); 90 if (!$targetModal.length) return; // æªæ¾å°å¯¹åºæ¨¡ææ¡åä¸å¤ç 91 // var imageIndex = $diningImages.index($(this).parent()); 92 $targetModal.data('image-index', imageIndex).modal('show'); 93}); 94 95$(document).on('click', '.js-picture-gallery-modal .js-video-play-button', function (e) { 96 var playerId = $(this).data('video-target'); 97 var video = playerInstances[playerId]; 98 video.play(); 99 100 $(this).next().css('z-index', 1); 101}); 102 103$(document).on('videoStateChange', '.js-picture-gallery-modal .js-video-play-button', function (e, state) { 104 if (state == 'pause') { 105 $(this).next().css('z-index', -1); 106 } 107}); 108 109$(document).on('click', '.js-picture-gallery-modal [data-dismiss="modal"]', function (e) { 110 pauseAllPlayers(); 111}); 112 113// close details button side text 114$(function () { 115 if (sessionStorage.getItem('sideButtonDescription') == 'hide') { 116 $('.side-button-container .details .info').hide(); 117 } 118}); 119 120$(document).on('click', '.side-button-container .details .info', function () { 121 $('.side-button-container .details .info').hide(); 122 sessionStorage.setItem('sideButtonDescription', 'hide'); 123}); 124 125// details modal & booking modal 126$(function () { 127 $('.js-dining-details-modal, .js-booking-modal').each(function (index, ele) { 128 var openDetailsModalFactory = (function () { 129 return function (e) { 130 var windowWidth = window.innerWidth; 131 var bottomHeight, mobileBottomHeight; 132 133 if (windowWidth >= 768 && isiOS) { 134 // iPad 135 bottomHeight = 66; 136 mobileBottomHeight = 300; 137 } else { 138 // PC & Mobile 139 bottomHeight = 39 + 35 + 28 + 22 + 20; 140 mobileBottomHeight = 24 + 16 + 22 + 15 + 28; 141 } 142 143 $(this).css({ 144 'display': 'block', 145 'visibility': 'hidden' 146 }).calcModalSize({ 147 freeHeight: true 148 }); 149 150 $(this).css({ 151 'display': 'none', 152 'visibility': 'visible' 153 }); 154 } 155 })(); 156 $(this).on('show.bs.modal', openDetailsModalFactory); 157 }); 158});
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.