PageSourceSearch

https://asimmobilia.pl/wp-content/plugins/photo-gallery/js/bwg_frontend.js?ver=1.3.64

js asimmobilia.pl collected 2026-10-08 07:33:47 UTC 7,481 bytes, 144 lines download raw bytes

1function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_album_id, type, srch_btn, title, sortByParam, load_more) {
2  var masonry_loaded = 0;
3  var mosaic_loaded = 0;
4  if (typeof load_more == "undefined") {
5    var load_more = false;
6  }
7  var page_number = jQuery("#page_number_" + current_view).val();
8  var bwg_load_more = jQuery("#bwg_load_more_" + current_view).val();
9  var bwg_previous_album_ids = jQuery('#bwg_previous_album_id_' + current_view).val();
10  var bwg_previous_album_page_numbers = jQuery('#bwg_previous_album_page_number_' + current_view).val();
11  var post_data = {};
12  if (album_gallery_id == 'back') { // Back from album.
13    var bwg_previous_album_id = bwg_previous_album_ids.split(",");
14    album_gallery_id = bwg_previous_album_id[1];
15    jQuery('#bwg_previous_album_id_' + current_view).val(bwg_previous_album_ids.replace(bwg_previous_album_id[0] + ',', ''));
16    var bwg_previous_album_page_number = bwg_previous_album_page_numbers.split(",");
17    page_number = bwg_previous_album_page_number[0];
18    jQuery('#bwg_previous_album_page_number_' + current_view).val(bwg_previous_album_page_numbers.replace(bwg_previous_album_page_number[0] + ',', ''));
19  }
20  else if (cur_album_id != '') { // Enter album (not change the page).
21    jQuery('#bwg_previous_album_id_' + current_view).val(album_gallery_id + ',' + bwg_previous_album_ids);
22    if (page_number) {
23      jQuery('#bwg_previous_album_page_number_' + current_view).val(page_number + ',' + bwg_previous_album_page_numbers);
24    }
25    page_number = 1;
26  }
27  if (srch_btn) { // Start search.
28    page_number = 1; 
29  }
30  if (typeof title == "undefined" || title == '') {
31    var title = "";
32  }
33  if (typeof sortByParam == "undefined" || sortByParam == '') {
34    var sortByParam = jQuery(".bwg_order_" + current_view).val();
35  }
36  post_data["page_number_" + current_view] = page_number;
37  post_data["bwg_load_more_" + current_view] = bwg_load_more;
38  post_data["album_gallery_id_" + current_view] = album_gallery_id;
39  post_data["bwg_previous_album_id_" + current_view] = jQuery('#bwg_previous_album_id_' + current_view).val();
40  post_data["bwg_previous_album_page_number_" + current_view] = jQuery('#bwg_previous_album_page_number_' + current_view).val();
41  post_data["type_" + current_view] = type;
42  post_data["title_" + current_view] = title;
43	post_data["sortImagesByValue_" + current_view] = sortByParam;
44  if (jQuery("#bwg_search_input_" + current_view).length > 0) { // Search box exists.
45    post_data["bwg_search_" + current_view] = jQuery("#bwg_search_input_" + current_view).val();
46  }
47  post_data["bwg_tag_id_" + id] = jQuery("#bwg_tag_id_" + id).val();
48  // Loading.
49  jQuery("#ajax_loading_" + current_view).css('display', '');
50  jQuery.ajax({
51        type: "POST",
52        url: window.location,
53        data: post_data,
54        success: function (data) {
55			masonry_loaded = jQuery(data).find('#' + form_id).find(".bwg_masonry_thumb_spun_" + current_view + " img").length;
56			mosaic_loaded = jQuery(data).find('#' + form_id).find(".bwg_mosaic_thumb_spun_" + current_view + " img").length;
57			if (load_more) {
58				var strr = jQuery(data).find('#' + id).html();
59				jQuery('#' + id).append(strr);
60
61				jQuery("div[id^='bwg_container1_'] form").each(function () {
62				  if (jQuery(this).data("current") == current_view) {
63					var str = jQuery(data).find('.bwg_nav_cont_' + current_view).html();
64					jQuery('.bwg_nav_cont_' + current_view).html(str);
65				  }
66				  else {
67					var str = jQuery(this).find('span[class^="bwg_nav_cont_"]').html();
68					jQuery(this).find('span[class^="bwg_nav_cont_"]').html(str);
69				  }
70				});
71			}
72			else {
73				var str = jQuery(data).find('#' + form_id).html();
74				jQuery('#' + form_id).html(str);
75			}
76			// There are no images.
77			if (jQuery("#bwg_search_input_" + current_view).length > 0 && album_gallery_id == 0) { // Search box exists and not album view.
78				var bwg_images_count = jQuery('#bwg_images_count_' + current_view).val();
79				if (bwg_images_count == 0) {
80				  var cont = jQuery("#" + id).parent().html();
81				  var error_msg = '<div style="width:95%"><div class="wd_error"><p><strong>' + bwg_objectL10n.bwg_search_result + '</strong></p></div></div>';
82				  jQuery("#" + id).parent().html(error_msg + cont)
83				}
84			}
85        },
86        beforeSend: function(){
87        },
88        complete:function(){
89			jQuery("div[id^='bwg_container1_'] img").each(function () {
90			  if (jQuery(this).attr("data-lazy-src") != '') {
91				jQuery(this).attr("src", jQuery(this).attr("data-lazy-src"));
92			  }
93			  else if (jQuery(this).attr("data-src") != '') {
94				jQuery(this).attr("src", jQuery(this).attr("data-src"));
95			  }
96			});
97			jQuery(".blog_style_image_buttons_conteiner_" + current_view).find(jQuery(".bwg_blog_style_img_" + current_view)).on('load', function(){
98			  jQuery(".bwg_blog_style_img_" + current_view).closest(jQuery(".blog_style_image_buttons_conteiner_" + current_view)).show();
99			});
100			jQuery("#ajax_loading_" + current_view).css('display', 'none');
101			jQuery("#bwg_tags_id_" + id).val(jQuery("#bwg_tag_id_" + id).val());
102
103			if (jQuery(".pagination-links_" + current_view).length) {
104			  jQuery("html, body").animate({scrollTop: jQuery('#' + form_id).offset().top - 150}, 500);
105			}
106			/* For all*/
107			window["bwg_document_ready_" + current_view]();
108			/* For masonry view.*/
109			if (id == "bwg_masonry_thumbnails_" + current_view || id == "bwg_album_masonry_" + current_view) {
110			  window["bwg_masonry_ajax_"+ current_view](masonry_loaded);
111			}
112			/* For mosaic view.*/
113			if (id == "bwg_mosaic_thumbnails_" + current_view) {
114			  window["bwg_mosaic_ajax_" + current_view](mosaic_loaded);
115			}
116			/* For Blog style view.*/
117			jQuery(".blog_style_images_conteiner_" + current_view + " .bwg_embed_frame_16x9_" + current_view).each(function (e) {
118			  jQuery(this).width(jQuery(this).parent().width());
119			  jQuery(this).height(jQuery(this).width() * 0.5625);
120			});
121			jQuery(".blog_style_images_conteiner_" + current_view + " .bwg_embed_frame_instapost_" + current_view).each(function (e) {
122			  jQuery(this).width(jQuery(this).parent().width());
123			  /* 16 is 2*padding inside iframe */
124			  /* 96 is 2*padding(top) + 1*padding(bottom) + 40(footer) + 32(header) */
125			  jQuery(this).height((jQuery(this).width() - 16) * jQuery(this).attr('data-height') / jQuery(this).attr('data-width') + 96);
126			});
127			/* For Image browser view.*/
128			jQuery('#bwg_embed_frame_16x9_' + current_view).width(jQuery('#bwg_embed_frame_16x9_' + current_view).parent().width());
129			jQuery('#bwg_embed_frame_16x9_' + current_view).height(jQuery('#bwg_embed_frame_16x9_' + current_view).width() * 0.5625);
130			jQuery('#bwg_embed_frame_instapost_' + current_view).width(jQuery('#bwg_embed_frame_16x9_' + current_view).parent().width());
131			/* 16 is 2*padding inside iframe */
132			/* 96 is 2*padding(top) + 1*padding(bottom) + 40(footer) + 32(header) */
133			jQuery('.bwg_embed_frame_instapost_' + current_view).height((jQuery('.bwg_embed_frame_instapost_' + current_view).width() - 16) * jQuery('.bwg_embed_frame_instapost_' + current_view).attr('data-height') / jQuery('.bwg_embed_frame_instapost_' + current_view).attr('data-width') + 96);
134        }
135	});
136  return false;
137}
138
139function bwg_select_tag(current_view, form_id, cur_gal_id, album_gallery_id, type, reset) {
140  if (reset) {
141    jQuery("#bwg_tag_id_" + cur_gal_id).val('');
142  }
143  spider_frontend_ajax(form_id, current_view, cur_gal_id, album_gallery_id, '', type, 1);
144}

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.