1jQuery( window ).load( function() { 2 //console.log('tttt'); 3 jQuery('.js-toggle-event-filters').unbind(); 4 setTimeout(function(){ 5 jQuery("body").removeClass("loading"); 6 jQuery(".c-page-overlay").removeClass("is-active"); 7 }, 100); 8 9}) 10 11 //Like 12 jQuery(document).on("click", ".articleLikeBtn", function (e) { 13 e.preventDefault(); 14 const button = jQuery(this); 15 let postid = jQuery(this).data("postid"); 16 let curUser = jQuery(this).data("user"); 17 //let authorname = jQuery(this).data("authorname"); 18 //console.log(localizedArray.admin_ajax) 19 20 if (curUser) { 21 jQuery("#loginToLike").hide(); 22 jQuery.ajax({ 23 type: "POST", 24 url: localizedArray.admin_ajax, 25 data: { 26 action: "bigearsfest_like_article", 27 user: curUser, 28 postid: postid, 29 //authorname: authorname, 30 }, 31 beforeSend: function (xhr) { 32 //button.text("Loading..."); 33 }, 34 success: function (data) { 35 //console.log(data); 36 if (data) { 37 //button.text(data.message); 38 button.find(".likeImage").attr("src", data.heartIcon); 39 40 console.log("likeCount " + data.count); 41 button.siblings(".like-count").text(data.count); 42 } 43 }, 44 }); 45 } else { 46 jQuery("#loginToLike").show(); 47 } 48 }); 49 50 //Add to schedule 51 jQuery(document).on("click", ".evntScheduleBtn", function (e) { 52 e.preventDefault(); 53 const button = jQuery(this); 54 let postid = jQuery(this).data("postid"); 55 let curUser = jQuery(this).data("user"); 56 let isingle = jQuery(this).data("isingle"); 57 //console.log(localizedArray.admin_ajax); 58 59 if (curUser) { 60 jQuery("#loginToLike").hide(); 61 jQuery.ajax({ 62 type: "POST", 63 url: localizedArray.admin_ajax, 64 data: { 65 action: "bigearsfest_schedule_article", 66 user: curUser, 67 postid: postid, 68 isingle: isingle 69 70 }, 71 beforeSend: function (xhr) { 72 jQuery('a[data-postid="'+postid+'"]').find('span.schedule-text').addClass("loading"); 73 }, 74 success: function (data) { 75 //console.log(data); 76 if (data) { 77 //button.text(data.message); 78 //button.find(".schedule-text").text(data.message); 79 if(!button.closest('.c-event-list').hasClass('scheduled')){ 80 button.closest('.c-event-list').addClass('scheduled'); 81 }else{ 82 button.closest('.c-event-list').removeClass('scheduled'); 83 } 84 if(!button.closest('.c-event-card__wrap-main').hasClass('scheduled')){ 85 button.closest('.c-event-card__wrap-main').addClass('scheduled'); 86 }else{ 87 button.closest('.c-event-card__wrap-main').removeClass('scheduled'); 88 } 89 if(!button.closest('.c-event-schedule-main').hasClass('scheduled')){ 90 button.closest('.c-event-schedule-main').addClass('scheduled'); 91 }else{ 92 button.closest('.c-event-schedule-main').removeClass('scheduled'); 93 } 94 jQuery('a[data-postid="'+postid+'"]').find('span.schedule-text').removeClass("loading").html(data.scheduleTxt); 95 jQuery('span[data-postid="'+postid+'"]').find('.counter').text(data.count); 96 } 97 }, 98 }); 99 } else { 100 //console.log('show popup'); 101 jQuery("#loginToLike").show(); 102 } 103 }); 104 105 jQuery(document).on("click", ".closeBtn", function (e) { 106 107 jQuery("#loginToLike").hide(); 108 109 }); 110 jQuery(document).on("click", ".js-toggle-event-sort", function (e) { 111 e.preventDefault(); 112 jQuery(".c-event-bar-sort").toggle(); 113 114 }); 115 116 jQuery(document).on("click", ".js-close-event-sort", function (e) { 117 118 jQuery(".c-event-bar-sort").hide(); 119 120 }); 121 122 123/******************************************************************************************************************/ 124jQuery(document).on("click", ".c-link--caret-custom", function (e) { 125 126 e.preventDefault(); 127 let URLss = jQuery(this).attr('href'); 128 let qstrvals = getUrlVars(URLss); 129 console.log(qstrvals); 130 jQuery.ajax({ 131 type: "POST", 132 url: localizedArray.admin_ajax, 133 data: { 134 action: "bigearsfest_get_qstrvals", 135 data: qstrvals, 136 //postid: postid, 137 //authorname: authorname, 138 }, 139 beforeSend: function (xhr) { 140 //button.text("Loading..."); 141 }, 142 success: function (data) { 143 //console.log(data); 144 if (data) { 145 //button.text(data.message); 146 button.find(".likeImage").attr("src", data.heartIcon); 147 148 console.log("likeCount " + data.count); 149 button.siblings(".like-count").text(data.count); 150 } 151 }, 152 }); 153}); 154 155function getUrlVars(url) 156{ 157 var vars = [], hash; 158 var hashes = url.slice(url.indexOf('?') + 1).split('&'); 159 for(var i = 0; i < hashes.length; i++) 160 { 161 hash = hashes[i].split('='); 162 vars.push(hash[0]); 163 vars[hash[0]] = hash[1]; 164 } 165 return vars; 166} 167 168 let ev_id; 169let us_id; 170function addschedule(ev_id, us_id){ 171 if(document.getElementById('sbtn'+ev_id).style.color == 'white'){ 172 jQuery('#sbtn'+ev_id).css('color', 'black'); 173 jQuery('#sbtn'+ev_id).css('background', 'none');
174 jQuery('#sc'+ev_id).text(parseInt(jQuery('#sc'+ev_id).text()) - 1); 175 } else { 176 jQuery('#sbtn'+ev_id).css('color', 'white'); 177 jQuery('#sbtn'+ev_id).css('background', '#815898'); 178 jQuery('#sc'+ev_id).text(parseInt(jQuery('#sc'+ev_id).text()) + 1); 179 } 180 jQuery.ajax({ 181 type: "POST", 182 url: localizedArray.admin_ajax, 183 data: { 184 action: 'add_my_schedule', 185 event_id : ev_id, 186 user_id : us_id, 187 }, 188 beforeSend: function (xhr) { 189 //button.text("Loading..."); 190 }, 191 success: function (response) { 192 console.log(response.message); 193 if (response) { 194 195 } 196 }, 197 }); 198 199} 200 201 202 203jQuery(document).ready(function($) { 204 // Function to filter markers by category (AJAX) 205 $('#marker_category_listview').on('change', function() { 206 if( $(this).val().length > 0){ 207 $(document).find('.select2-selection--multiple').text($(this).val().length +' categories selected'); 208 }else{ 209 $(document).find('.select2-selection--multiple').text('No category selected'); 210 } 211 212 213 var selectedCategory = $(this).val() ? $(this).val() : []; 214 215 // Make AJAX request only when category is selected 216 if (selectedCategory !== '') { 217 $.ajax({ 218 url: localizedArray.admin_ajax, 219 method: 'GET', 220 data: { 221 action: 'filter_markers_by_category', 222 category_id: selectedCategory 223 }, 224 beforeSend: function() { 225 $('#marker-list').html('<p>Loading...</p>'); // Loading message 226 $('#maplist-loader').show(); 227 }, 228 success: function(response) { 229 230 if (response.success) { 231 $('#maplist-loader').hide(); 232 var markersHTML = ''; 233 if (response.data.markers.length > 0) { 234 235 $.each(response.data.markers, function(index, marker) { 236 markersHTML += '<div class="marker">'; 237 markersHTML += '<a href="' + marker.link + '" class="marker-inner" target="_blank">'; 238 markersHTML += '<div class="c-event-card__img-wrap"><img src="' + marker.image_url + '" alt="' + marker.title + '" /></div>'; 239 markersHTML += '<h3> '+ marker.title + '</h3>'; 240 markersHTML += '</a>'; 241 markersHTML += '</div>'; 242 243 }); 244 245 } else { 246 247 markersHTML = '<p>No result found for this category.</p>'; 248 $('.bgy-map-load-more-wrap').hide(); 249 250 } 251 252 $('#marker-list').html(markersHTML); 253 254 if(response.data.total > jQuery("#marker-list .marker").length){ 255 256 $('.bgy-map-load-more-wrap').show(); 257 258 }else{ 259 260 $('.bgy-map-load-more-wrap').hide(); 261 262 } 263 } 264 } 265 }); 266 } else { 267 // Reload all markers when no category is selected 268 location.reload(); 269 } 270 }); 271 272 273 $(document).find('.select2-selection--multiple').text('All Categories '); 274 275//loadmore 276jQuery(".bgy-map-load-more-btn").on("click", function (e) { 277 e.preventDefault(); 278 var curLength = jQuery("#marker-list .marker").length; 279 var $this = jQuery(this); 280 $this.find(".loadmore-loader-img").show(); 281 var markerCats = jQuery("#marker_category_listview").val(); 282 283 if (!jQuery(this).hasClass("loading")) { 284 jQuery(this).addClass("loading"); 285 286 jQuery.get({ 287 url: localizedArray.admin_ajax, 288 data: { 289 action: "bgy_marker_loadmore", 290 offset: curLength, 291 categories: markerCats 292 }, 293 success: function (response) { 294 console.log(response); 295 $this.find(".loadmore-loader-img").hide(); 296 $this.removeClass("loading"); 297 if (response.success) { 298 $('#maplist-loader').hide(); 299 var markersHTML = ''; 300 if (response.data.markers.length > 0) { 301 302 $.each(response.data.markers, function(index, marker) { 303 markersHTML += '<div class="marker">'; 304 markersHTML += '<a href="' + marker.link + '" class="marker-inner" target="_blank">'; 305 markersHTML += '<div class="c-event-card__img-wrap"><img src="' + marker.image_url + '" alt="' + marker.title + '" /></div>'; 306 markersHTML += '<h3> '+ marker.title + '</h3>'; 307 markersHTML += '</a>'; 308 markersHTML += '</div>'; 309 310 311 }); 312 313 } else { 314 315 $('.bgy-map-load-more-wrap').hide(); 316 317 } 318 319 $('#marker-list').append(markersHTML); 320 321 if(response.data.total > jQuery("#marker-list .marker").length){ 322 323 $('.bgy-map-load-more-wrap').show(); 324 325 }else{ 326 327 $('.bgy-map-load-more-wrap').hide(); 328 329 } 330 331 } 332 }, 333 complete: function (resp) { 334 }, 335 }); 336 } 337 }); 338 339}); 340 341/*document.addEventListener('DOMContentLoaded', function () { 342 const main = document.getElementById('main'); 343 const filterBarMobile = main ? main.querySelector('.c-event-bar-mobile') : null; 344 345 console.log('.c-event-bar-mobile', filterBarMobile ? 1 : 0); 346 347 if (!filterBarMobile) { 348 console.error('Element with class .c-event-bar-mobile not found'); 349 return; 350 } 351 352 const stickyPoint = filterBarMobile.getBoundingClientRect().top + window.scrollY; // Get the initial position of the filter 353 console.log("stickyPoint", stickyPoint); 354 355 window.addEventListener('scroll', function () { 356 const scrollPosition = window.scrollY; 357 console.log('Current scroll position:', scrollPosition); 358 359 if (scrollPosition >= stickyPoint) { 360 filterBarMobile.classList.add('sticky'); 361 } else { 362 filterBarMobile.classList.remove('sticky'); 363 } 364 }); 365});*/ 366 367 368 369 370 371 372
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.