1if(!funcDefined("sliceItemBlock")){ 2 sliceItemBlock = function(){ 3 /*$('.tabs_beauty_box .catalog_block .catalog_item_wrapp.catalog_item:visible').sliceHeight({ 4 classNull: '.footer_button', 5 item:'.tabs_beauty_box .catalog_block .catalog_item_wrapp.catalog_item:visible', 6 classes: [ 7 '.item_info .item-title', 8 '.item_info .sa_block', 9 '.item_info .cost.prices', 10 ], 11 mobile: true, 12 blockNull: { 13 class: 'big', 14 width: 2, 15 }, 16 breakpoint: { 17 '(max-width: 600px)': { 18 blockNull: { 19 width: 1, 20 }, 21 autoslicecount: false, 22 slice: 999, 23 } 24 }, 25 });*/ 26 27 var tmp = [ 28 '.cur ', 29 '.tabs_beauty_box' 30 ]; 31 32 $(tmp).each(function(i,v){ 33 $(v+' .catalog_block .catalog_item_wrapp.catalog_item:visible').sliceHeight({ 34 classNull: '.footer_button', 35 item: v+' .catalog_block .catalog_item_wrapp.catalog_item:visible', 36 classes: [ 37 '.item_info .item-title', 38 '.item_info .sa_block', 39 '.item_info .cost.prices', 40 ], 41 mobile: true, 42 blockNull: { 43 class: 'big', 44 width: 2, 45 }, 46 breakpoint: { 47 '(max-width: 600px)': { 48 blockNull: { 49 width: 1, 50 }, 51 autoslicecount: false, 52 slice: 999, 53 } 54 }, 55 }); 56 57 // console.log($(v)); 58 }); 59 60 InitCustomScrollBar(); 61 } 62} 63if(!funcDefined("sliceItemBlockSlide")){ 64 sliceItemBlockSlide = function(options){ 65 66/* 67 var settings = 68 { 69 classNull: '.footer_button', 70 item:'.tabs_beauty_box .catalog_block.owl-carousel .catalog_item:not(.big)', 71 classes: [ 72 '.item_info .item-title', 73 '.item_info .sa_block', 74 '.item_info .cost.prices', 75 ], 76 mobile: true, 77 autoslicecount: false, 78 slice: 999, 79 }; 80 81 if(options !== undefined) { 82 settings = Object.assign(settings, options); 83 } 84 $('.tabs_beauty_box .catalog_block.owl-carousel .catalog_item_wrapp.catalog_item').sliceHeight(settings); 85*/ 86 87 var tmp = [ 88 '.cur', 89 '.tabs_beauty_box' 90 ]; 91 $(tmp).each(function(i, v){ 92 var settings = 93 { 94 classNull: '.footer_button', 95 item: v+' .catalog_block.owl-carousel .catalog_item:not(.big)', 96 classes: [ 97 '.item_info .item-title', 98 '.item_info .sa_block', 99 '.item_info .cost.prices', 100 ], 101 mobile: true, 102 autoslicecount: false, 103 slice: 999, 104 }; 105 console.log(options) 106 if(options !== undefined) { 107 settings = Object.assign(settings, options); 108 } 109 $(v+' .catalog_block.owl-carousel .catalog_item_wrapp.catalog_item').sliceHeight(settings); 110 }); 111 112 InitCustomScrollBar(); 113 } 114} 115 116$(document).ready(function(){ 117 if(!('SelectOfferProp' in window) && typeof window.SelectOfferProp != 'function') 118 { 119 SelectOfferProp = function(){ 120 // return false; 121 var _this = $(this), 122 obParams = {}, 123 obSelect = {}, 124 objUrl = parseUrlQuery(), 125 add_url = '', 126 container = _this.closest('.bx_catalog_item_scu'); 127 128 /* request params */ 129 obParams = { 130 'PARAMS': _this.closest('.js_wrapper_items').data('params'), 131 'ID': container.data('offer_id'), 132 'SITE_ID': container.data('site_id'), 133 'LINK_ID': container.data('id')+'_block', 134 'IBLOCK_ID': container.data('offer_iblockid'), 135 'PROPERTY_ID': container.data('propertyid'), 136 'DEPTH': _this.closest('.item_wrapper').index(), 137 'VALUE': _this.data('onevalue'), 138 'CLASS': 'inner_content', 139 'PICTURE': _this.closest('.catalog_item_wrapp').find('.thumb img').attr('src'), 140 'ARTICLE_NAME': _this.closest('.catalog_item_wrapp').find('.article_block').data('name'), 141 'ARTICLE_VALUE': _this.closest('.catalog_item_wrapp').find('.article_block').data('value'), 142 } 143 /**/ 144 145 if("clear_cache" in objUrl) 146 { 147 if(objUrl.clear_cache == "Y") 148 add_url += "?clear_cache=Y"; 149 } 150 151 /* save selected values */ 152 for (i = 0; i < obParams.DEPTH+1; i++) 153 { 154 strName = 'PROP_'+container.find('.item_wrapper:eq('+i+') > div').data('id'); 155 obSelect[strName] = container.find('.item_wrapper:eq('+i+') li.item.active').data('onevalue'); 156 obParams[strName] = container.find('.item_wrapper:eq('+i+') li.item.active').data('onevalue'); 157 } 158 159 // obParams.SELECTED = JSON.stringify(obSelect); 160 /**/ 161 162 _this.siblings().removeClass('active'); 163 _this.addClass('active'); 164 165 if(_this.attr('title')) 166 { 167 var skuVal = _this.attr('title').split(':')[1]; 168 _this.closest('.item_wrapper').find('.show_class .val').text(skuVal); 169 } 170 else 171 {
172 var img_row = _this.find(' > i'); 173 if(img_row.length && img_row.attr('title')) { 174 var skuVal = img_row.attr('title').split(':')[1]; 175 _this.closest('.item_wrapper').find('.show_class .val').text(skuVal); 176 } 177 } 178 179 /* get sku */ 180 $.ajax({ 181 url: arMaxOptions['SITE_DIR']+'ajax/js_item_detail.php'+add_url, 182 type: 'POST', 183 data: obParams, 184 }).success(function(html){ 185 var ob = BX.processHTML(html);BX.ajax.processScripts(ob.SCRIPT); 186 }) 187 } 188 $(document).on('click', '.bx_catalog_item_scu li.item', SelectOfferProp) 189 } 190}); 191 192(function (window) { 193if (!window.JCCatalogSectionOnlyElement) 194{ 195 196 window.JCCatalogSectionOnlyElement = function (arParams) 197 { 198 if (typeof arParams === 'object') 199 { 200 this.params = arParams; 201 202 this.obProduct = null; 203 this.set_quantity = 1; 204 205 this.currentPriceMode = ''; 206 this.currentPrices = []; 207 this.currentPriceSelected = 0; 208 this.currentQuantityRanges = []; 209 this.currentQuantityRangeSelected = 0; 210 211 if (this.params.MESS) 212 { 213 this.mess = this.params.MESS; 214 } 215 216 this.init(); 217 } 218 } 219 window.JCCatalogSectionOnlyElement.prototype = { 220 init: function() 221 { 222 var i = 0, 223 j = 0, 224 treeItems = null; 225 226 this.obProduct = BX(this.params.ID); 227 228 if(!!this.obProduct) 229 { 230 $(this.obProduct).find('.counter_wrapp .counter_block input').data('product', 'ob'+this.obProduct.id+'el'); 231 this.currentPriceMode = this.params.ITEM_PRICE_MODE; 232 this.currentPrices = this.params.ITEM_PRICES; 233 this.currentQuantityRanges = this.params.ITEM_QUANTITY_RANGES; 234 } 235 236 }, 237 238 setPriceAction: function() 239 { 240 this.set_quantity = this.params.MIN_QUANTITY_BUY; 241 if($(this.obProduct).find('input[name=quantity]').length) 242 this.set_quantity = $(this.obProduct).find('input[name=quantity]').val(); 243 244 this.checkPriceRange(this.set_quantity); 245 246 $(this.obProduct).find('.not_matrix').hide(); 247 $(this.obProduct).find('.with_matrix .price_value_block').html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].PRICE, this.currentPrices[this.currentPriceSelected].CURRENCY, this.currentPrices[this.currentPriceSelected].PRINT_PRICE)); 248 249 if($(this.obProduct).find('.with_matrix .discount')) 250 { 251 $(this.obProduct).find('.with_matrix .discount').html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].BASE_PRICE, this.currentPrices[this.currentPriceSelected].CURRENCY, this.currentPrices[this.currentPriceSelected].PRINT_BASE_PRICE)); 252 } 253 254 if(this.params.SHOW_DISCOUNT_PERCENT_NUMBER == 'Y') 255 { 256 if(this.currentPrices[this.currentPriceSelected].PERCENT > 0 && this.currentPrices[this.currentPriceSelected].PERCENT < 100) 257 { 258 if(!$(this.obProduct).find('.with_matrix .sale_block .sale_wrapper .value').length) 259 $('<div class="value"></div>').insertBefore($(this.obProduct).find('.with_matrix .sale_block .sale_wrapper .text')); 260 261 $(this.obProduct).find('.with_matrix .sale_block .sale_wrapper .value').html('-<span>'+this.currentPrices[this.currentPriceSelected].PERCENT+'</span>%'); 262 } 263 else 264 { 265 if($(this.obProduct).find('.with_matrix .sale_block .sale_wrapper .value').length) 266 $(this.obProduct).find('.with_matrix .sale_block .sale_wrapper .value').remove(); 267 } 268 } 269 $(this.obProduct).find('.with_matrix .sale_block .text .values_wrapper').html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].DISCOUNT, this.currentPrices[this.currentPriceSelected].CURRENCY, this.currentPrices[this.currentPriceSelected].PRINT_DISCOUNT)); 270 271 if('NOT_SHOW' in this.params && this.params.NOT_SHOW != 'Y') 272 $(this.obProduct).find('.with_matrix').show(); 273 274 if(arMaxOptions['THEME']['SHOW_TOTAL_SUMM'] == 'Y') 275 { 276 if(typeof this.currentPrices[this.currentPriceSelected] !== 'undefined') 277 setPriceItem($(this.obProduct), this.set_quantity, this.currentPrices[this.currentPriceSelected].PRICE); 278 } 279 }, 280 281 checkPriceRange: function(quantity) 282 { 283 if (typeof quantity === 'undefined'|| this.currentPriceMode != 'Q') 284 return; 285 286 var range, found = false; 287 288 for (var i in this.currentQuantityRanges) 289 { 290 if (this.currentQuantityRanges.hasOwnProperty(i)) 291 { 292 range = this.currentQuantityRanges[i]; 293 294 if ( 295 parseInt(quantity) >= parseInt(range.SORT_FROM) 296 && ( 297 range.SORT_TO == 'INF' 298 || parseInt(quantity) <= parseInt(range.SORT_TO) 299 ) 300 ) 301 { 302 found = true; 303 this.currentQuantityRangeSelected = range.HASH; 304 break; 305 } 306 } 307 } 308 309 if (!found && (range = this.getMinPriceRange())) 310 { 311 this.currentQuantityRangeSelected = range.HASH; 312 } 313 314 for (var k in this.currentPrices) 315 { 316 if (this.currentPrices.hasOwnProperty(k)) 317 { 318 if (this.currentPrices[k].QUANTITY_HASH == this.currentQuantityRangeSelected) 319 { 320 this.currentPriceSelected = k; 321 break; 322 } 323 } 324 } 325 }, 326 327 getMinPriceRange: function() 328 { 329 var range; 330 331 for (var i in this.currentQuantityRanges) 332 { 333 if (this.currentQuantityRanges.hasOwnProperty(i)) 334 { 335 if ( 336 !range 337 || parseInt(this.currentQuantityRanges[i].SORT_FROM) < parseInt(range.SORT_FROM) 338 ) 339 { 340 range = this.currentQuantityRanges[i]; 341 } 342 } 343 } 344 345 return range; 346 } 347 } 348} 349})(window);
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.