PageSourceSearch

https://www.contravt.ru/local/templates/aspro-allcorp3/js/blocks/selectOffer.js?16899341223050

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

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.