PageSourceSearch

https://it-premier.ru/bitrix/templates/aspro-allcorp3/js/blocks/selectOffer.js?17580132583185

js it-premier.ru collected 2026-10-07 23:48:25 UTC 3,185 bytes, 85 lines download raw bytes

1/*sku change props*/
2if (!("SelectOfferProp" in window) && typeof window.SelectOfferProp != "function") {
3  SelectOfferProp = function () {
4    // return false;
5    var _this = $(this),
6      obParams = {},
7      obSelect = {},
8      objUrl = parseUrlQuery(),
9      add_url = "",
10      container = _this.closest(".sku-props"),
11      item = _this.closest(".js-popup-block"),
12			bDetail = !_this.closest('.catalog-items').length;
13
14    /* request params */
15    obParams = {
16      PARAMS: (
17				bDetail 
18					? $(".js-sku-config:first").data("value") 
19					: _this.closest('.catalog-items').find(".js-sku-config").data("value")
20			),
21      BASKET_PARAMS: item.find(".js-config-btns").data("btn-config"),
22      IMG_PARAMS: item.find(".js-config-img").data("img-config"),
23      PRICE_PARAMS: item.find(".js-popup-price").data("price-config"),
24      ID: container.data("item-id"),
25      OFFER_ID: container.data("offer-id"),
26      SITE_ID: container.data("site-id"),
27      IBLOCK_ID: container.data("iblockid"),
28      SKU_IBLOCK_ID: container.data("offer-iblockid"),
29      DEPTH: _this.closest(".sku-props__inner").index(),
30      VALUE: _this.data("onevalue"),
31      SHOW_GALLERY: arAsproOptions["THEME"]["SHOW_CATALOG_GALLERY_IN_LIST"],
32      MAX_GALLERY_ITEMS: arAsproOptions["THEME"]["MAX_GALLERY_ITEMS"],
33      OID: arAsproOptions["THEME"]["CATALOG_OID"],
34      IS_DETAIL: (bDetail ? 'Y' : 'N'),
35    };
36    /**/
37
38    if ("clear_cache" in objUrl) {
39      if (objUrl.clear_cache == "Y") add_url += "?clear_cache=Y";
40    }
41
42    let isActiveContainer = container.hasClass("js-selected");
43
44    // set active
45    $(".sku-props").removeClass("js-selected");
46    container.addClass("js-selected");
47    _this.closest(".sku-props__values").find(".sku-props__value").removeClass("sku-props__value--active");
48    _this.addClass("sku-props__value--active");
49    _this.closest(".sku-props__item").find(".sku-props__js-size").text(_this.data("title"));
50
51    /* save selected values */
52    for (i = 0; i < obParams.DEPTH + 1; i++) {
53      strName = "PROP_" + container.find(".sku-props__inner:eq(" + i + ")").data("id");
54
55      obSelect[strName] = container.find(".sku-props__inner:eq(" + i + ") .sku-props__value--active").data("onevalue");
56      obParams[strName] = container.find(".sku-props__inner:eq(" + i + ") .sku-props__value--active").data("onevalue");
57    }
58    obParams.SELECTED = JSON.stringify(obSelect);
59    /**/
60
61    /* get sku */
62    if (window.obOffers && typeofExt(obOffers) === "array" && isActiveContainer) {
63      //from /ajax/js_item_detail.php
64      selectedValues = obSelect;
65      strPropValue = obParams["VALUE"];
66      depth = obParams["DEPTH"];
67      wrapper = item;
68      arFilter = {};
69      tmpFilter = [];
70
71      UpdateSKUInfoByProps();
72    } else {
73      $.ajax({
74        url: arAsproOptions["SITE_DIR"] + "ajax/js_item_detail.php" + add_url,
75        type: "POST",
76				contentType: 'application/json',
77				data: JSON.stringify(obParams),
78      }).done(function (html) {
79        var ob = BX.processHTML(html);
80        BX.ajax.processScripts(ob.SCRIPT);
81      });
82    }
83  };
84  $(document).on("click", ".sku-props__value:not(.sku-props__value--active)", SelectOfferProp);
85}

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.