PageSourceSearch

https://pescetariano.ru/bitrix/templates/dresscode/components/dresscode/offers.product/.default/script.js

js pescetariano.ru collected 2026-10-07 18:58:30 UTC 2,297 bytes, 100 lines download raw bytes

1$(function(){
2	
3	var mainElementID = "#homeCatalog"; //--\\
4	var $self = $(mainElementID);
5	var httpLock = false;
6
7	var getProductByGroup = function(event){
8		if(httpLock == false){
9			if(offersProductParams != ""){
10			
11				var $this = $(this);
12				var $parentThis = $this.parent();
13
14				var page = $this.data("page");			
15				var groupID = $this.data("group");
16				var changeSheet = $this.data("sheet");
17
18				
19				if($parentThis.hasClass("selected") && changeSheet != "Y"){
20					return false;
21				}
22
23				if(changeSheet != "Y"){
24					var $captionEL = $self.find(".caption")
25										.removeClass("selected");
26
27				}
28
29				var $ajaxContainer = $self.find(".ajaxContainer")
30												.addClass("loading");
31
32				$parentThis
33					.addClass("loading");
34
35				$this.data("sheet", "N");	// clear status 
36
37				if(parseInt(groupID, 10) > 0 || groupID == "all"){
38					
39					httpLock = true;
40
41					var sendDataObj = {
42						params: offersProductParams,
43						groupID: groupID,
44						page: page
45					}
46
47					var jqxhr = $.get(ajaxDir + "/ajax.php", sendDataObj, function(http) {
48						if(http){
49							
50							$ajaxContainer.html(http)
51								.removeClass("loading");
52							
53							$parentThis
54								.removeClass("loading");
55
56							if(changeSheet != "Y"){		
57								$this.parents(".caption")
58									.addClass("selected");
59							}
60							httpLock = false;
61							//addCart button reload
62							changeAddCartButton(basketProductsNow);
63							//subscribe button reload
64							subscribeOnline();
65							checkLazyItems();
66						}
67					});
68
69				}else{
70					console.error("check data group (data.group not found)");
71				}
72			
73			}else{
74				console.error("var type (json) not found (name offersProductParams)");
75			}
76		}
77		return event.preventDefault();
78		
79	};
80
81	var getProductNextPage = function(event){
82	
83		var $activeGroup = $self.find(".caption.selected a");
84		var currentPage = parseInt($activeGroup.data("page"), 10);
85
86		$activeGroup.data({
87			"page": currentPage + 1,
88			"sheet": "Y"
89		});
90
91		$activeGroup.trigger("click");
92
93		return event.preventDefault();
94	
95	}
96
97	$(document).on("click", ".getProductByGroup", getProductByGroup);
98	$(document).on("click", ".product .showMore", getProductNextPage);
99
100});

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.