PageSourceSearch

https://felicia.md/local/templates/aspro-lite/js/blocks/controls.js

js felicia.md collected 2026-10-04 02:53:38 UTC 5,089 bytes, 150 lines download raw bytes

1$(document).ready(function () {
2  // dropdown-select
3  $(document).on("click", ".dropdown-select--with-dropdown .dropdown-select__title", function () {
4    var _this = $(this),
5      menu = _this.parent().find("> .dropdown-select__list");
6    if (!_this.hasClass("clicked") && menu.length) {
7      _this.addClass("clicked");
8
9      _this.toggleClass("opened");
10      menu.stop().slideToggle(100, function () {
11        _this.removeClass("clicked");
12      });
13    }
14  });
15
16  // dropdown-select change item
17  $(document).on("click", ".dropdown-select__list .mixitup-item", function () {
18    var $select = $(this).closest('.dropdown-select');
19    $select.find('.dropdown-select__title span').text($(this).text());
20    $select.find('.dropdown-select__title.opened').click();
21  });
22
23  // close select
24  $("html, body").on("mousedown", function (e) {
25    if (typeof e.target.className == "string" && e.target.className.indexOf("adm") < 0) {
26      e.stopPropagation();
27      $(".dropdown-select .dropdown-select__title.opened").each(function(){
28        if ($(this).closest('#mobilefilter').length) return
29        var $select = $(this).closest('.dropdown-select');
30        if ($select.data('visible_by_class') && $($select.data('visible_by_class')).is(':visible')) return;
31        if(!$(e.target).closest($select).length) { 
32          $(this).click();
33        }
34      });
35    }
36  });
37
38  // mixitUp
39  /*
40  const containerEl = document.querySelector(".mixitup-container");
41  if (containerEl) {
42    var config = {
43      selectors: {
44        target: '[data-ref="mixitup-target"]',
45      },
46      animation: {
47        effects: "", // Set a 'stagger' effect for the loading animation
48      },
49      load: {
50        filter: "none", // Ensure all targets start from hidden (i.e. display: none;)
51      },
52      animation: {
53        duration: 350,
54      },
55      controls: {
56        scope: "local",
57      },
58      callbacks: {
59        onMixStart: function (state) {
60          // console.log(state);
61        },
62        onMixClick: function (state, event) {
63          let $item = event.target.children.length ? event.target : event.target.parentElement;
64          $($item).siblings().removeClass("color-theme head-block__item--active active");
65          $($item).addClass("color-theme head-block__item--active active");
66        },
67        onMixEnd: function () {
68          // InitLazyLoad();
69        },
70      },
71    };
72    var mixer = mixitup(containerEl, config);
73
74    containerEl.classList.add("mixitup-ready");
75
76    mixer.show().then(function () {
77      // Remove the stagger effect for any subsequent operations
78      mixer.configure({
79        animation: {
80          effects: "fade scale",
81        },
82      });
83    });
84  }*/
85
86  /*show password*/
87  $(".form-group:not(.eye-password-ignore) [type=password]").each(function (item) {
88    let inputBlock = $(this).closest(".input");    
89    if (inputBlock.length) {
90      inputBlock.addClass("eye-password");
91    } else {
92      let passBlock = $(this).closest(".form-group");
93      let labelBlock = passBlock.find(".label_block");
94      if (labelBlock.length) {
95        labelBlock.addClass("eye-password");
96      } else {
97        passBlock.addClass("eye-password");
98      }
99    }
100  });
101
102  $(document).on("click", ".eye-password:not(.eye-password-ignore)", function (event) {
103    let input = this.querySelector("input");
104    let eyeWidth = 56;
105    if (this.clientWidth - eyeWidth < event.offsetX) {
106      if (input.type == "password") {
107        input.type = "text";
108        this.classList.add("password-show");
109      } else if (input.type == "text") {
110        input.type = "password";
111        this.classList.remove("password-show");
112      }
113      event.stopPropagation();
114    }
115  });
116  /**/
117});
118
119// gallery switch
120$(document).on("click", ".gallery-view_switch__icons:not(.active)", function () {
121  var $this = $(this);
122  var animationTime = 200;
123  var bSmall = $this.hasClass("gallery-view_switch__icons--small");
124  var $switchGallery = $this.closest(".gallery-view_switch");
125  var $bigGallery = ($this.closest(".big_gallery").length
126    ? $this.closest(".big_gallery")
127    : $this.closest(".gallery")
128  ).find(".gallery-big");
129  var $bigGalleryCounter = $switchGallery.find(".gallery-view_switch__count-wrapper--big");
130  var $smallGallery = ($this.closest(".big_gallery").length
131    ? $this.closest(".big_gallery")
132    : $this.closest(".gallery")
133  ).find(".gallery-small");
134  var $smallGalleryCounter = $switchGallery.find(".gallery-view_switch__count-wrapper--small");
135  var $toHideGallery = bSmall ? $bigGallery : $smallGallery;
136  var $toHideGalleryCounter = bSmall ? $bigGalleryCounter : $smallGalleryCounter;
137  var $toShowGallery = bSmall ? $smallGallery : $bigGallery;
138  var $toShowGalleryCounter = bSmall ? $smallGalleryCounter : $bigGalleryCounter;
139
140  $this.addClass("active");
141  $this.siblings(".active").removeClass("active");
142
143  $toHideGalleryCounter.fadeOut(animationTime, function () {
144    $toShowGalleryCounter.fadeIn(animationTime);
145  });
146
147  $toHideGallery.fadeOut(animationTime, function () {
148    $toShowGallery.fadeIn(animationTime);
149  });
150});

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.