PageSourceSearch

https://lacabinerie.com/wp-content/plugins/elex-request-a-quote/assets/js/front_script.min.js?ver=2.3.3.1a

js lacabinerie.com collected 2026-10-07 15:32:51 UTC 7,283 bytes, 190 lines download raw bytes

1/******/ (() => { // webpackBootstrap
2var __webpack_exports__ = {};
3/*!***********************************!*\
4  !*** ./assets/js/front_script.js ***!
5  \***********************************/
6jQuery(document).ready(function () {
7  jQuery(".menuContainer ul").append("<ul><li>Minicart</li></ul>");
8  jQuery(".elex-raq-maximize-btn").click(function () {
9    jQuery(".elex-raq-quote-list-popup").removeClass("elex-raq-minimize");
10    jQuery(".elex-raq-minimize-btn").removeClass("d-none");
11    jQuery(this).addClass("d-none");
12  });
13});
14jQuery(document).ready(function () {
15  jQuery(".elex-raq-minimize-btn").click(function () {
16    jQuery(".elex-raq-quote-list-popup").addClass("elex-raq-minimize");
17    jQuery(".elex-raq-maximize-btn ").removeClass("d-none");
18    jQuery(this).addClass("d-none");
19  });
20  jQuery(".elex-raq-quote-list-popup-container").hide();
21  jQuery(".elex-raq-view-quote-list-open-btn").click(function () {
22    jQuery(".elex-raq-quote-list-popup-container").show("slow");
23  });
24  jQuery(".elex-raq-view-quote-list-close-btn").click(function () {
25    jQuery(".elex-raq-quote-list-popup-container").hide("slow");
26  });
27});
28jQuery(window).on("load", function () {
29  // jQuery(document).ready(function(){
30  flag = false;
31  attr = [];
32  var pid = jQuery(".component_options_select").val();
33  jQuery(".component_options_select").each(function () {
34    is_variable = false;
35    var pid = jQuery(this).val();
36    component_id = jQuery(this).closest('.composite_component').attr('data-item_id');
37    item = {
38      component_id: component_id,
39      attribute_name: '',
40      attribute_value: '',
41      variation_id: '',
42      pid: pid
43    };
44    var existingObj = jQuery.grep(attr, function (obj) {
45      return obj.component_id === item.component_id && obj.pid === item.pid;
46    });
47    if (existingObj < 1) {
48      attr.push(item);
49    }
50    localStorage.setItem('composite_products', JSON.stringify(attr));
51    var count = 0;
52    jQuery(".attribute_options select").each(function () {
53      if (this.value === '') {
54        count++;
55      }
56    });
57    if (count === 0) {
58      jQuery('.add_to_quote').removeClass('disabled');
59      jQuery('.add_to_quote').css('opacity', '1');
60      jQuery('.add_to_quote').attr('disabled', false);
61
62      // all select boxes has selected option 
63    } else {
64      jQuery('.add_to_quote').addClass('disabled');
65      jQuery('.add_to_quote').css('opacity', '0.5');
66      jQuery('.add_to_quote').attr('disabled', true);
67    }
68  });
69  jQuery(".component_options_select").change(function () {
70    pid = jQuery(this).val();
71    component_id = jQuery(this).closest('.composite_component').attr('data-item_id');
72    item = {
73      component_id: component_id,
74      attribute_name: '',
75      attribute_value: '',
76      variation_id: '',
77      pid: pid
78    };
79    attr.push(item);
80    var existingObj = jQuery.grep(attr, function (obj) {
81      return obj.component_id === item.component_id;
82    });
83    if (existingObj.length > 0) {
84      existingObj[0].pid = item.pid;
85    } else {
86      // Object does not exist, push the new object to the array
87      attr.push(item);
88    }
89    localStorage.setItem('composite_products', JSON.stringify(attr));
90    jQuery(".single_variation_wrap").on("show_variation", function (event, variation) {
91      component_id = jQuery(this).closest('.composite_component').attr('data-item_id');
92      jQuery(this).closest('.composite_component').find('.attribute_options select').each(function () {
93        var pid = jQuery(this).closest('.component_options_select').val();
94        attr_val = jQuery(this).val();
95        attr_name = jQuery(this).attr('id');
96        item = {
97          component_id: component_id,
98          attribute_name: attr_name,
99          attribute_value: attr_val,
100          variation_id: variation.variation_id,
101          pid: pid
102        };
103        var existingObj = jQuery.grep(attr, function (obj) {
104          return obj.component_id === item.component_id && obj.component_id === item.pid;
105        });
106        if (existingObj.length > 0) {
107          // Object already exists, override some properties
108          existingObj[0].attribute_value = item.attribute_value;
109          existingObj[0].attribute_name = item.attribute_name;
110        } else {
111          // Object does not exist, push the new object to the array
112          attr.push(item);
113        }
114      });
115      attr_length = jQuery(".attribute_options select ").length;
116      localStorage.setItem('composite_products', JSON.stringify(attr));
117    });
118  });
119  jQuery(document).on("show_variation", ".single_variation_wrap", function (event, variation) {
120    component_id = jQuery(this).closest('.composite_component').attr('data-item_id');
121    jQuery(this).closest('.composite_component').find('.attribute_options select').each(function () {
122      attr_val = jQuery(this).val();
123      attr_name = jQuery(this).attr('id');
124      item = {
125        component_id: component_id,
126        attribute_name: attr_name,
127        attribute_value: attr_val,
128        variation_id: variation.variation_id,
129        pid: pid
130      };
131      //  if( attr.length === 0){
132      attr.push(item);
133      //  }
134
135      var existingObj = jQuery.grep(attr, function (obj) {
136        return obj.component_id === item.component_id && obj.attribute_name === item.attribute_name;
137      });
138      if (existingObj.length > 0) {
139        // Object already exists, override some properties
140        existingObj[0].attribute_value = item.attribute_value;
141      } else {
142        // Object does not exist, push the new object to the array
143        attr.push(item);
144      }
145    });
146    attr_length = jQuery(".attribute_options select ").length;
147    localStorage.setItem('composite_products', JSON.stringify(attr));
148    var storeddata = localStorage.getItem('composite_products');
149  });
150  jQuery(".single_variation_wrap").on("hide_variation", function (event, variation) {
151    jQuery('.add_to_quote').addClass('disabled');
152    jQuery('.add_to_quote').css('opacity', '0.5');
153    jQuery('.add_to_quote').attr('disabled', true);
154  });
155  jQuery('.reset_variations').click(function () {
156    localStorage.setItem('composite_products', '');
157    jQuery('.add_to_quote').addClass('disabled');
158    jQuery('.add_to_quote').css('opacity', '0.5');
159    jQuery('.add_to_quote').attr('disabled', true);
160  });
161  jQuery("table.variations select").each(function () {
162    if (jQuery(this).val() == "" || jQuery(this).val() == undefined) {
163      localStorage.removeItem("currently_selected_variation_id");
164      localStorage.removeItem("selected_variation_attributes");
165    }
166  });
167  jQuery(document).ready(function () {
168    jQuery(document).on('change', 'select', function () {
169      var count = 0;
170      jQuery(".attribute_options select").each(function () {
171        if (this.value === '') {
172          count++;
173        }
174      });
175      if (count === 0) {
176        jQuery('.add_to_quote').removeClass('disabled');
177        jQuery('.add_to_quote').css('opacity', '1');
178        jQuery('.add_to_quote').attr('disabled', false);
179
180        // all select boxes has selected option 
181      } else {
182        jQuery('.add_to_quote').addClass('disabled');
183        jQuery('.add_to_quote').css('opacity', '0.5');
184        jQuery('.add_to_quote').attr('disabled', true);
185      }
186    }).change();
187  });
188});
189/******/ })()
190;

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.