PageSourceSearch

https://akam.ru/local/templates/aspro-allcorp3/js/blocks/selectOffer.js?17061102643083

js akam.ru collected 2026-10-02 17:06:32 UTC 3,083 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: item.find(".js-sku-config").length ? item.find(".js-sku-config").data("value") : $(".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      IS_DETAIL: container.hasClass('sku-props--detail') ? 'Y' : 'N',
30    };
31    /**/
32
33    if ("clear_cache" in objUrl) {
34      if (objUrl.clear_cache == "Y") add_url += "?clear_cache=Y";
35    }
36
37    let isActiveContainer = container.hasClass("js-selected");
38
39    // set active
40    $(".sku-props").removeClass("js-selected");
41    container.addClass("js-selected");
42    _this.closest(".sku-props__values").find(".sku-props__value").removeClass("sku-props__value--active");
43    _this.addClass("sku-props__value--active");
44    _this.closest(".sku-props__item").find(".sku-props__js-size").text(_this.data("title"));
45
46    /* save selected values */
47    for (i = 0; i < obParams.DEPTH + 1; i++) {
48      strName = "PROP_" + container.find(".sku-props__inner:eq(" + i + ")").data("id");
49
50      obSelect[strName] = container.find(".sku-props__inner:eq(" + i + ") .sku-props__value--active").data("onevalue");
51      obParams[strName] = container.find(".sku-props__inner:eq(" + i + ") .sku-props__value--active").data("onevalue");
52    }
53    obParams.SELECTED = JSON.stringify(obSelect);
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.