PageSourceSearch

https://www.pro-lada.ru/bitrix/cache/js/s1/main/page_5167ee9a75bf2…bf2ee18d4f7678a79c1c06_v1.js?17802962639761

js pro-lada.ru collected 2026-10-07 21:47:02 UTC 9,761 bytes, 309 lines download raw bytes

1
2; /* Start:"a:4:{s:4:"full";s:89:"/local/components/sebekon/main.mileage.filter/templates/.default/script.js?15610468536179";s:6:"source";s:74:"/local/components/sebekon/main.mileage.filter/templates/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
3var filterTimeOut;
4
5
6$(function () {
7
8    $('.js--filter').on('click', function (e) {
9        e.preventDefault();
10        e.stopPropagation();
11        var $jfilter =  $(e.target).closest('.js--filter');
12
13        if ($(e.target).parents('.filter-item').length) {
14            var id = $(e.target).parents('.filter-item').attr('id')
15            $('.js--filter-dropdown #' + id).trigger('click');
16            return false;
17        } 
18        if ($(e.target).hasClass('.filter-item')) {
19            var id = $(e.target).attr('id')
20            $('.js--filter-dropdown #' + id).trigger('click');
21            return false;
22        }
23
24        var target = $(e.target);
25        if (target.hasClass('inner-content-filters') || target.hasClass('lens')) {
26            $(this).toggleClass('open').next('.dropdown').fadeToggle('fast');
27        }
28
29        return false;
30    });
31	
32	$('#main-mileage-filter-link').click(function() {
33		setTimeout(function() {
34			dividerSliderYearNext();
35		}, 100);
36	});
37});
38
39
40function eq_filter(form) {
41
42    //var $this = $(el);
43	//var $form = $this.parents('form');
44   
45	$form = $(form);
46   
47    var $data = '';
48    var formData = '';
49    var formDataAll = '';
50
51    /*$form.find('#mileage-cars-body').find('button').each(function () {
52        if ($(this).hasClass('disabled')) {
53            return true;
54        }
55        if ($(this).attr('bid') == undefined) {
56            return true;
57        }
58        var k = $(this).attr('bid');
59        var v = $(this).attr('value');
60        //$data += k + ' ' + v + '\n';
61        
62		if(k != undefined && v != undefined) {
63			$data += ($data == '' ? '' : ';') + k + '=' + v;
64			formData += '&' + k + '=' + v;
65		}
66        
67    });*/
68
69    function parseQuery(qstr) {
70        var query = {};
71        var a = qstr.substr(0).split('&');
72        for (var i = 0; i < a.length; i++) {
73            var b = a[i].split('=');
74            if (!b[0] || !b[1]) {
75                continue;
76            }
77            query[decodeURIComponent(b[0])] = decodeURIComponent(b[1] || '');
78        }
79        return query;
80    }
81
82	$form.find('input[name="data"]').val($data);
83	
84	formDataAll = $form.serialize();
85
86    var query = parseQuery(formDataAll);
87
88    var year = $('#year');
89    if (year.data('skip') || !window.filterYear) {
90        year.data('skip', 0);
91        delete(query.year);
92    }
93    var amount = $("#amount");
94    if (amount.data('skip') || !window.filterAmount) {
95        amount.data('skip', 0);
96        delete(query.amount);
97    }
98    var mileage = $("#mileage");
99    if (mileage.data('skip') || !window.filterMileage) {
100        mileage.data('skip', 0);
101        delete(query.mileage);
102    }
103    formDataAll = $.param(query);
104    query.ajaxFilter = 1;
105	console.log(formDataAll, query);
106/*
107    $('<textarea />', {
108        style: 'display: none',
109        name: 'data',
110        text: $data,
111    }).insertAfter($this);
112*/
113    //$form.submit();
114	
115	//console.log(formDataAll);
116
117	
118    //return false;
119
120	SebekonHelpers.showPreloader();
121	$.ajax({
122		url: '/',
123		type: 'POST',
124		data: query,
125		dataType: 'html',
126		success: function (data) {
127			var resultHtml = $('<div/>').append(data);
128
129			/*var content = resultHtml.find('#main-mileage-filter');
130			if(content.length) {
131				$('#main-mileage-filter').html(content.html());
132			}*/
133
134			/*var dataSelectedFilter = resultHtml.find('#mileage-cars-body-selected');
135			if(dataSelectedFilter.length) {
136				$('#mileage-cars-body-selected').html(dataSelectedFilter.html());
137			}*/
138
139			/*var dataFilter = resultHtml.find('#mileage-cars-body');
140
141			if(dataSelectedFilter.length || dataFilter.length) {
142				$('#mileage-cars-body').html(dataFilter.html());
143
144                $('.js--filter-dropdown .filter-item').on('click', clickOnFilter);
145                $('.inner-content-filters .filter-item').on('click', clickOnFilterClear);
146			}*/
147            
148            $('[name="BRAND"]').html(resultHtml.find('[name="BRAND"]').html());
149            $('[name="BRAND"]').trigger("chosen:updated");
150            
151            $('[name="MODEL"]').html(resultHtml.find('[name="MODEL"]').html());
152            $('[name="MODEL"]').trigger("chosen:updated");
153
154            //$('body').find('.bottom__reset').replaceWith(resultHtml.find('.bottom__reset'));
155
156			//history.pushState('', '', $form.attr('action') + (formDataAll == '' ? '' : '?') + formDataAll);
157			$('#show-mileage-cars').attr('href', $form.attr('action') + (formDataAll == '' ? '' : '?') + formDataAll); 
158			
159			//console.log(data);
160		},
161		complete: function(data) {
162			SebekonHelpers.hidePreloader();
163		}
164	});
165	
166	
167	/*
168    $.get(location.href, {
169        action: 'get_equip',
170        data: $data,
171    }, function (html) {
172        $('.constructor__results').remove();
173        $(html).insertAfter($('a[name=found]'));
174    }, 'html');
175	*/
176	
177    //$('.filter__dropdown:visible').fadeOut();
178    //$('.filter__inner.open').removeClass('open');
179
180
181    return false;
182
183
184}
185
186setFilter = function(timeout) {
187    var timeout = timeout || 500
188	clearTimeout(filterTimeOut);
189	filterTimeOut = setTimeout(function() {
190		eq_filter($('#main-mileage-filter'));
191	}, timeout);
192}
193
194function number_format( number, decimals, dec_point, thousands_sep ) {	// Format a number with grouped thousands
195    //
196    // +   original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
197    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
198    // +	 bugfix by: Michael White (http://crestidg.com)
199
200    var i, j, kw, kd, km;
201
202    // input sanitation & defaults
203    if( isNaN(decimals = Math.abs(decimals)) ){
204        decimals = 2;
205    }
206    if( dec_point == undefined ){
207        dec_point = ",";
208    }
209    if( thousands_sep == undefined ){
210        thousands_sep = ".";
211    }
212
213    i = parseInt(number = (+number || 0).toFixed(decimals)) + "";
214
215    if( (j = i.length) > 3 ){
216        j = j % 3;
217    } else{
218        j = 0;
219    }
220
221    km = (j ? i.substr(0, j) + thousands_sep : "");
222    kw = i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + thousands_sep);
223    //kd = (decimals ? dec_point + Math.abs(number - i).toFixed(decimals).slice(2) : "");
224    kd = (decimals ? dec_point + Math.abs(number - i).toFixed(decimals).replace(/-/, 0).slice(2) : "");
225
226
227    return km + kw + kd;
228}
229
230/* End */
231;
232; /* Start:"a:4:{s:4:"full";s:82:"/local/components/sebekon/main.layouts/templates/.default/script.js?17494485822865";s:6:"source";s:67:"/local/components/sebekon/main.layouts/templates/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
233
234var SebekonMainLayouts = function() {};
235
236SebekonMainLayouts.currentBackgroundIndex = 0;
237SebekonMainLayouts.currentTitle = 0;
238SebekonMainLayouts.currentSubTitle = 0;
239
240SebekonMainLayouts.backgrounds = {};
241SebekonMainLayouts.backgroundsSorted = {};
242SebekonMainLayouts.titles = [];
243SebekonMainLayouts.subTitle = [];
244SebekonMainLayouts.mobileBackgrounds = {};
245SebekonMainLayouts.mobileImages = {};
246
247SebekonMainLayouts.changeBackground = function() {
248	SebekonMainLayouts.currentBackgroundIndex++;
249	if(SebekonMainLayouts.currentBackgroundIndex >= Object.keys(SebekonMainLayouts.backgroundsSorted).length) SebekonMainLayouts.currentBackgroundIndex = 0;
250
251	let currentBackgroundSortKey = Object.keys(SebekonMainLayouts.backgroundsSorted)[SebekonMainLayouts.currentBackgroundIndex];
252	let currentBackgroundKey = SebekonMainLayouts.backgroundsSorted[currentBackgroundSortKey];
253
254	$('.clickable-zone[data-binded-background]').addClass('hidden');
255	$('.clickable-zone[data-binded-background="' + currentBackgroundKey + '"]').removeClass('hidden');
256
257	$('.js--content .js--bg-change').fadeOut(300,function() {
258		$('.js--content .js--bg-change').css({
259			'background-image' : "url('" + SebekonMainLayouts.backgrounds[currentBackgroundKey] + "')"
260		});
261		$('.js--content .bg-main_mobile').css({
262			'background-image' : "url('" + SebekonMainLayouts.mobileBackgrounds[currentBackgroundKey] + "')"
263		});
264		$('.bg-main_mobile_top img').attr({
265			'src' : SebekonMainLayouts.mobileImages[currentBackgroundKey]
266		});
267
268
269		$('.js--content .js--bg-change').attr('data-current-background', currentBackgroundKey);
270
271		$('.js--content .js--bg-change').fadeIn(300);
272	});
273
274	setTimeout(SebekonMainLayouts.changeBackground, 5000);
275};
276
277SebekonMainLayouts.changeTitle = function() {
278	SebekonMainLayouts.currentTitle++;
279	if(SebekonMainLayouts.currentTitle >= SebekonMainLayouts.titles.length) SebekonMainLayouts.currentTitle = 0;
280
281	$('.js--content .information__title').fadeOut(300,function() {
282		$('.js--content .information__title').text(SebekonMainLayouts.titles[SebekonMainLayouts.currentTitle]);
283		$('.js--content .information__title').fadeIn(300);
284	});
285
286	setTimeout(SebekonMainLayouts.changeTitle, 5000);
287};
288
289SebekonMainLayouts.changeSubTitle = function() {
290	SebekonMainLayouts.currentSubTitle++;
291	if(SebekonMainLayouts.currentSubTitle >= SebekonMainLayouts.subTitle.length) SebekonMainLayouts.currentSubTitle = 0;
292
293	$('.js--content .information__subtitle').fadeOut(300,function() {
294		$('.js--content .information__subtitle').html(SebekonMainLayouts.subTitle[SebekonMainLayouts.currentSubTitle]);
295		$('.js--content .information__subtitle').fadeIn(300);
296	});
297
298	setTimeout(SebekonMainLayouts.changeSubTitle, 5000);
299};
300
301SebekonMainLayouts.run = function() {
302	setTimeout(this.changeBackground, 5000);        
303	setTimeout(this.changeTitle, 5000);        
304	setTimeout(this.changeSubTitle, 5000);        
305}
306
307/* End */
308;; /* /local/components/sebekon/main.mileage.filter/templates/.default/script.js?15610468536179*/
309; /* /local/components/sebekon/main.layouts/templates/.default/script.js?17494485822865*/

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.