PageSourceSearch

https://shop.okraina.ru/local/templates/okraina_v3/components/b1team/custom.html/catalog.panel/script.js

js okraina.ru collected 2026-10-03 22:45:18 UTC 2,634 bytes, 81 lines download raw bytes

1define('B1TeamOkraina_CustomHtml_CatalogPanel',['jquery', 'main'], function($,B1TeamOkraina_Template) {
2    
3    function B1TeamOkraina_CustomHtml_CatalogPanel(arParams){
4
5        this.container = null;
6        this.arParams = arParams;
7        var _this = this;
8
9        /*
10         * Инициализация
11         */
12        this.Init = function(){
13
14            _this.container = $("#"+_this.arParams.id);
15            
16            //инициализириуем контролы, так как шалон может быть полностью в композитном хите
17            B1TeamOkraina_Template.GetInstance().InitControls(_this.container);
18
19            //изменение выбраннрого представления
20            $(".view",_this.container).click(function(){
21                _this.OnViewClick(this);
22                return false;
23            }); 
24            
25            //изменение выбраннрой сортировки
26            $("input[name=SORT]",_this.container).change(function(){
27                _this.OnSortChange(this);
28                return false;
29            }); 
30            
31            //клик по кнопке фильтра
32            $(".filter",_this.container).click(function(e){
33               e.stopPropagation();
34               BX.onCustomEvent("B1T_OKRAINA_CUSTOM_HTML_MOBILE_FILTER_E_OPEN");
35            }); 
36        };
37        
38        /*
39         * Клик по представлению
40         */
41        this.OnViewClick = function(sender) {
42
43            $(".view",_this.container).removeClass("selected");
44            $(sender).addClass("selected");
45
46            //перезагрузим каталог
47            _this.ReloadCatalog(false);
48        };
49        
50        /*
51         * Смена поля сортировки
52         */
53        this.OnSortChange = function(sender) {
54
55            //перезагрузим каталог
56            _this.ReloadCatalog(false);
57        };
58        
59        /*
60         * Перезагружает каталог
61         */
62        this.ReloadCatalog = function(clearPage){
63            var arEventParams = {
64                sort: $("input[name=SORT]",_this.container).val(),
65                view: $(".view.selected",_this.container).data("code"),
66                clearPage: clearPage
67            };
68
69            BX.onCustomEvent('B1T_OKRAINA_CUSTOM_HTML_CATALOG_PANEL_E_REFRESH_CATALOG', [arEventParams]);
70        };
71        
72
73        $(function(){
74            _this.Init();
75        });
76
77        return this;
78    }
79    
80    return B1TeamOkraina_CustomHtml_CatalogPanel;
81});

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.