PageSourceSearch

https://ceresit-market.ru/bitrix/templates/elektro_flat/components…/sale.basket.basket.line/.default/script.js

js ceresit-market.ru collected 2026-10-04 20:08:45 UTC 1,604 bytes, 60 lines download raw bytes

1function BitrixSmallCart(){}
2
3BitrixSmallCart.prototype = {
4	activate: function() {
5		this.cartElement = BX(this.cartId);
6		
7		this.setCartBodyClosure = this.closure("setCartBody");
8		BX.addCustomEvent(window, "OnBasketChange", this.closure("refreshCart", {}));
9	},
10
11	closure: function(fname, data) {
12		var obj = this;
13		return data
14			? function(){obj[fname](data)}
15			: function(arg1){obj[fname](arg1)};
16	},
17
18	refreshCart: function(data) {		
19		data.sessid = BX.bitrix_sessid();
20		data.siteId = this.siteId;
21		data.templateName = this.templateName;
22		data.arParams = this.arParams;
23		BX.ajax({
24			url: this.ajaxPath,
25			method: 'POST',
26			dataType: 'html',
27			data: data,
28			onsuccess: this.setCartBodyClosure			
29		});
30	},
31
32	setCartBody: function(result) {		
33		var basketCont,
34			sumOld,
35			sumCurr;
36
37		basketCont = $(this.cartElement);
38		
39		basketCont.find(".qnt").text($(result).find(".qnt").text());
40		
41		basketCont.find(".sum").data("decimal", $(result).find(".sum").data("decimal"));
42		
43		sumOld = basketCont.find(".sum").data("sum");
44		basketCont.find(".sum").data("sum", $(result).find(".sum").data("sum"));
45		sumCurr = basketCont.find(".sum").data("sum");		
46
47		if(sumCurr != sumOld) {
48			var options = {
49				useEasing: false,
50				useGrouping: true,
51				separator: basketCont.find(".sum").data("separator"),
52				decimal: basketCont.find(".sum").data("dec-point")
53			}
54			var counter = new countUp("cartCounter", sumOld, sumCurr, basketCont.find(".sum").data("decimal"), 0.5, options);
55			counter.start();
56		}
57
58		basketCont.find(".oformit_cont").html($(result).find(".oformit_cont").html());
59	}
60};

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.