1/** 2 * Setup (required for Joomla! 3) 3 */ 4if(typeof jQuery === 'undefined' || (parseInt(jQuery.fn.jquery) === 1 && parseFloat(jQuery.fn.jquery.replace(/^1\./,'')) < 10)){ 5 var head = document.getElementsByTagName('head')[0]; 6 var script = document.createElement('script'); 7 script.src = '//ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js'; 8 script.type = 'text/javascript'; 9 script.onload = script.onreadystatechange = function() { 10 if (script.readyState) { 11 if (script.readyState === 'complete' || script.readyState === 'loaded') { 12 script.onreadystatechange = null; 13 onload(jQuery.noConflict(true)); 14 } 15 } 16 else { 17 onload(jQuery.noConflict(true)); 18 } 19 }; 20 head.appendChild(script); 21} 22if(typeof(j2store) == 'undefined') { 23 var j2store = {}; 24} 25if(typeof(j2store.jQuery) == 'undefined') { 26 j2store.jQuery = jQuery.noConflict(); 27} 28 29if(typeof(j2storeURL) == 'undefined') { 30 var j2storeURL = ''; 31} 32 33//make sure the ajax requests are not cached 34(function($) { 35 $(document).ready(function() { 36 $.ajaxSetup({ 37 cache: false, 38 headers: { 39 'Cache-Control': 'no-cache, no-store, must-revalidate', 40 'Pragma': 'no-cache', 41 'Expires': '0' 42 } 43 }); 44 }); 45})(j2store.jQuery); 46 47(function($) { 48// Ajax add to cart 49$( document ).on( 'click', '.j2store_add_to_cart_button', function(e) { 50 51 // AJAX add to cart request 52 var $thisbutton = $( this ); 53 54 if ( ! $thisbutton.attr( 'data-product_id' ) ) 55 return true; 56 57 $thisbutton.removeClass( 'added' ); 58 $thisbutton.addClass( 'loading' ); 59 60 var data = { 61 option: 'com_j2store', 62 view: 'carts', 63 task: 'addItem', 64 ajax: '1', 65 }; 66 67 $.each( $thisbutton.data(), function( key, value ) { 68 data[key] = value; 69 }); 70 71 // Trigger event 72 $( 'body' ).trigger( 'adding_to_cart', [ $thisbutton, data ] ); 73 74 var href = $thisbutton.attr('href'); 75 if(typeof href === 'undefined' || href === '') { 76 href = 'index.php'; 77 } 78 79 // Ajax action 80 $.post( href, data, function( response ) { 81 82 if ( ! response ) 83 return; 84 85 var this_page = window.location.toString(); 86 87 this_page = this_page.replace( 'add-to-cart', 'added-to-cart' ); 88 89 if (response['error']) { 90 window.location = response.product_url; 91 return; 92 } 93 94 if (response['redirect']) { 95 window.location.href = response['redirect']; 96 return; 97 } 98 if (response['success']) { 99 $thisbutton.removeClass( 'loading' ); 100 // Changes button classes 101 $thisbutton.addClass( 'added' ); 102 $thisbutton.parent().find('.cart-action-complete').show(); 103 //if module is present, let us update it. 104 $( 'body' ).trigger( 'after_adding_to_cart', [ $thisbutton, response, 'link'] ); 105 //doMiniCart(); 106 } 107 }, 'json'); 108 109 return false; 110 111}); 112})(j2store.jQuery); 113 114 115(function($) { 116 $(document).ready(function(){ 117 $('.j2store-addtocart-form').each(function(){ 118 $(this).submit(function(e) { 119 e.preventDefault(); 120 var form = $(this); 121 122 //this will help detect if the form is submitted via ajax or normal submit. 123 //sometimes people will submit the form before the DOM loads 124 form.find('input[name=\'ajax\']').val(1); 125 /* Get input values from form */ 126 var values = form.find('input[type=\'text\'], input[type=\'number\'], input[type=\'hidden\'], input[type=\'radio\']:checked, input[type=\'checkbox\']:checked, select, textarea'); 127 form.find('input[type=\'submit\']').val(form.find('input[type=\'submit\']').data('cart-action-always')); 128 form.find('input[type=\'submit\']').attr('disabled',true); 129 var href = form.attr('action'); 130 if(typeof href == 'undefined' || href == '') { 131 var href = 'index.php'; 132 } 133 // Trigger event 134 $( 'body' ).trigger( 'adding_to_cart', [ form, values ] ); 135 //var values = form.serializeArray(); 136 var j2Ajax = $.ajax({ 137 url: href, 138 type: 'post', 139 data: values, 140 dataType: 'json' 141 142 }); 143 144 j2Ajax.done(function(json) { 145 form.find('input[type=\'submit\']').attr('disabled',false); 146 form.find('.j2success, .j2warning, .j2attention, .j2information, .j2error').remove(); 147 $('.j2store-notification').hide(); 148 if (json['error']) { 149 150 form.find('input[type=\'submit\']').val(form.find('input[type=\'submit\']').data('cart-action-done')); 151 152 if (json['error']['option']) { 153 for (i in json['error']['option']) { 154 form.find('#option-' + i).after('<span class="j2error">' + json['error']['option'][i] + '</span>'); 155 } 156 } 157 if (json['error']['stock']) { 158 form.find('.j2store-notifications').html('<span class="j2error">' + json['error']['stock'] + '</span>'); 159 } 160 161 if (json['error']['general']) { 162 form.find('.j2store-notifications').html('<span class="j2error">' + json['error']['general'] + '</span>'); 163 } 164 165 if (json['error']['product']) { 166 form.find('.j2store-notifications').after('<span class="j2error">' + json['error']['product'] + '</span>'); 167 } 168 } 169 170 if (json['redirect']) { 171 window.location.href = json['redirect']; 172 return; 173 } 174 175 if (json['success']) { 176 setTimeout(function() { 177 form.find('input[type=\'submit\']').val(form.find('input[type=\'submit\']').data('cart-action-done'));
178 form.find('.cart-action-complete').fadeIn('slow'); 179 }, form.find('input[type=\'submit\']').data('cart-action-timeout')); 180 181 $( 'body' ).trigger( 'after_adding_to_cart', [form, json, 'normal'] ); 182 //if module is present, let us update it. 183 // doMiniCart(); 184 } 185 }) 186 .fail(function( jqXHR, textStatus, errorThrown) { 187 form.find('input[type=\'submit\']').val(form.find('input[type=\'submit\']').data('cart-action-done')); 188 console.log(textStatus + errorThrown); 189 }) 190 .always(function(jqXHR, textStatus, errorThrown) { 191 //form.find('input[type=\'submit\']').val(form.find('input[type=\'submit\']').data('cart-action-always')); 192 }); 193 }); 194 }); //end of ajax call 195 }); //end of document ready 196})(j2store.jQuery); 197 198 199(function($) { 200$(document).ready(function(){ 201 202 if ($('#j2store_shipping_make_same').length > 0) { 203 if ($('#j2store_shipping_make_same').is(':checked')) { 204 $('#j2store_shipping_section').css({'visible' : 'visible', 'display' : 'none'}); 205 206 $('#j2store_shipping_section').children(".input-label").removeClass("required"); 207 208 $('#j2store_shipping_section').children(".input-text").removeClass("required"); 209 } 210 } 211 212}); 213})(j2store.jQuery); 214 215function doMiniCart() { 216(function($) { 217 var murl = j2storeURL 218 + 'index.php?option=com_j2store&view=carts&task=ajaxmini'; 219 220 $.ajax({ 221 url : murl, 222 type : 'get', 223 cache : false, 224 contentType : 'application/json; charset=utf-8', 225 dataType : 'json', 226 success : function(json) { 227 if (json != null && json['response']) { 228 $.each(json['response'], function(key, value) { 229 if ($('.j2store_cart_module_' + key).length) { 230 $('.j2store_cart_module_' + key).each(function() { 231 $(this).html(value); 232 }); 233 } 234 }); 235 } 236 } 237 238 }); 239 240})(j2store.jQuery); 241 242} 243 244function j2storeDoTask(url, container, form, msg, formdata) { 245 246 (function($) { 247 //to make div compatible 248 container = '#'+container; 249 250 // if url is present, do validation 251 if (url && form) { 252 var str = $(form).serialize(); 253 // execute Ajax request to server 254 $.ajax({ 255 url : url, 256 type : 'get', 257 cache: false, 258 contentType: 'application/json; charset=utf-8', 259 data: formdata, 260 dataType: 'json', 261 beforeSend: function() { 262 $(container).before('<span class="wait"><img src="'+j2storeURL+'media/j2store/images/loader.gif" alt="" /></span>'); 263 }, 264 complete: function() { 265 $('.wait').remove(); 266 }, 267 // data:{"elements":Json.toString(str)}, 268 success: function(json) { 269 if ($(container).length > 0) { 270 $(container).html(json.msg); 271 } 272 return true; 273 } 274 }); 275 } else if (url && !form) { 276 // execute Ajax request to server 277 $.ajax({ 278 url : url, 279 type: 'get', 280 cache: false, 281 contentType: 'application/json; charset=utf-8', 282 data: formdata, 283 dataType: 'json', 284 beforeSend: function() { 285 $(container).before('<span class="wait"><img src="'+j2storeURL+'media/j2store/images/loader.gif" alt="" /></span>'); 286 }, 287 complete: function() { 288 $('.wait').remove(); 289 }, 290 success: function(json) { 291 if ($(container).length > 0) { 292 $(container).html(json.msg); 293 } 294 } 295 }); 296 } 297 })(j2store.jQuery); 298} 299 300function j2storeSetShippingRate(name, price, tax, extra, code, combined, ship_element, css_id ) 301{ 302 303(function($) { 304 $("input[type='hidden'][name='shipping_name']").val(name); 305 $("input[type='hidden'][name='shipping_code']").val(code); 306 $("input[type='hidden'][name='shipping_price']").val(price); 307 $("input[type='hidden'][name='shipping_tax']").val(tax); 308 $("input[type='hidden'][name='shipping_extra']").val(extra); 309 var ship_name = name.replace(' ',''); 310 $('#onCheckoutShipping_wrapper .shipping_element').hide(); 311 $('#onCheckoutShipping_wrapper .'+css_id+'_select_text').show(); 312})(j2store.jQuery); 313 314} 315 316 317function doAjaxFilter(pov_id, product_id, po_id, id) { 318 (function($) { 319 320 if (pov_id == '' || $('#ChildOptions' + po_id).length != 0) { 321 $('#ChildOptions' + po_id).html(''); 322 } 323 324 var form = $(id).closest('form'); 325 //sanity check 326 if(form.data('product_id') != product_id) return; 327 328 var values = form.serializeArray(); 329 // pop these params from values-> task : add & view : mycart 330 values.pop({ 331 name : "task", 332 value : 'addItem' 333 }); 334 335 values.pop({ 336 name : "view", 337 value : 'carts' 338 }); 339 340 values.push({ 341 name : "product_id", 342 value :product_id 343 }); 344 345 var arrayClean = function(thisArray) { 346 "use strict"; 347 $.each(thisArray, function(index, item) { 348 if (item.name == 'task' || item.name == 'view') { 349 delete values[index]; 350 } 351 }); 352 } 353 arrayClean(values); 354 355 //variable check 356 if(form.data('product_type') == 'advancedvariable') { 357 358 var csv = []; 359 form.find('input[type=\'radio\']:checked, select').each( function( index, el ) { 360 if(el.value){ 361 if($(el).data('is-variant')){ 362 csv.push(el.value); 363 } 364 } 365 }); 366 367 //need to sort the csv array to make sure correct array orde passing 368 369 var processed_csv =[]; 370 processed_csv = csv.sort(function(a, b){return a-b}); 371 372 var $selected_variant = processed_csv.join(); 373 374 //get all variants 375 //var $variants = form.data('product_variants'); 376 377 378 var $variants = form.data('product_variants'); 379 380 381 var $variant_id = get_matching_variant($variants, $selected_variant); 382 383 form.find('input[name=\'variant_id\']').val($variant_id); 384 385 386 values.push({ 387 name : "variant_id", 388 value :$variant_id 389 }); 390 } 391 values = values.filter(function( element ) { 392 return element !== undefined; 393 }); 394 values = jQuery.param(values); 395 $( 'body' ).trigger( 'before_doAjaxFilter', [ form, values ] ); 396 $.ajax({ 397 url : j2storeURL+'index.php?option=com_j2store&view=products&task=update&po_id=' 398 + po_id 399 + '&pov_id=' 400 + pov_id 401 + '&product_id=' 402 + product_id, 403 type : 'get', 404 cache : false, 405 data : values, 406 dataType : 'json', 407 beforeSend: function() { 408 $('#option-' + po_id).append('<span class="wait"> <img src="'+j2storeURL+'/media/j2store/images/loader.gif" alt="" /></span>'); 409 }, 410 complete: function() { 411 $('.wait').remove(); 412 }, 413 success : function(response) { 414 415 var $product = $('.product-'+ product_id); 416 417 if ($product.length 418 && typeof response.error == 'undefined') { 419 420 //SKU 421 if (response.sku) { 422 $product.find('.sku').html(response.sku); 423 } 424 //base price 425 if (response.pricing.base_price) { 426 $product.find('.base-price').html(response.pricing.base_price); 427 } 428 //price 429 if (response.pricing.price) { 430 $product.find('.sale-price').html(response.pricing.price); 431 } 432 433 //afterDisplayPrice
434 if (response.afterDisplayPrice) { 435 $product.find('.afterDisplayPrice').html(response.afterDisplayPrice); 436 } 437 438 //qty 439 if (response.quantity) { 440 $product.find('input[name="product_qty"]').val(response.quantity); 441 if(form.data('product_type') == 'variable' || form.data('product_type') == 'advancedvariable') { 442 $product.find('input[name="product_qty"]').attr({ 443 value: response.quantity 444 }); 445 } 446 } 447 448 //dimensions 449 if (response.dimensions) { 450 $product.find('.product-dimensions').html(response.dimensions); 451 } 452 453 //weight 454 if (response.weight) { 455 $product.find('.product-weight').html(response.weight); 456 } 457 // main image change 458 if(response.main_image){ 459 460 /*$product.find('.j2store-product-thumb-image-'+product_id).attr("src", response.main_image); 461 j2store.jQuery('.j2store-product-thumb-image-'+product_id).attr("src", response.main_image);*/ 462 j2store.jQuery('.j2store-product-main-image-'+product_id).attr("src", response.main_image); 463 $product.find('.j2store-mainimage .j2store-img-responsive').attr("src", response.main_image); 464 $product.find('.j2store-product-additional-images .additional-mainimage').attr("src", response.main_image); 465 } 466 467 //discount text 468 if(response.pricing.discount_text){ 469 470 $product.find('.discount-percentage').html(response.pricing.discount_text); 471 }else{ 472 $product.find('.discount-percentage').addClass('no-discount'); 473 } 474 475 //stock status 476 477 if (typeof response.stock_status != 'undefined') { 478 if (response.availability == 1) { 479 $product.find('.product-stock-container').html('<span class="instock">' + response.stock_status + '</span>'); 480 }else { 481 $product.find('.product-stock-container').html('<span class="outofstock">' + response.stock_status + '</span>'); 482 } 483 } 484 485 // option html 486 if (response.optionhtml) { 487 $product.find(' #ChildOptions' + po_id).html(response.optionhtml); 488 } 489 490 } 491 $( 'body' ).trigger( 'after_doAjaxFilter_response', [ $product, response ] ); 492 }, 493 error : function(xhr, ajaxOptions, thrownError) { 494 console.log(thrownError + "\r\n" + xhr.statusText 495 + "\r\n" + xhr.responseText); 496 } 497 }); 498 })(j2store.jQuery); 499} 500 501function get_matching_variant(variants, selected) { 502 for(var i in variants) { 503 if(variants[i] == selected) return i; 504 } 505} 506 507 508function doAjaxPrice(product_id, id) { 509 (function($) { 510 /* Get input values from form */ 511 var form = $(id).closest('form'); 512 //sanity check 513 if(form.data('product_id') != product_id) return; 514 form.find('input[type=\'submit\']').attr('disabled',true); 515 var values = form.serializeArray(); 516 //pop these params from values-> task : add & view : mycart 517 values.pop({ 518 name : "task", 519 value : 'addItem' 520 }); 521 522 values.pop({ 523 name : "view", 524 value : 'carts' 525 }); 526 527 values.push({ 528 name : "product_id", 529 value :product_id 530 }); 531 532 var arrayClean = function(thisArray) { 533 "use strict"; 534 $.each(thisArray, function(index, item) { 535 if (item.name == 'task' || item.name == 'view') { 536 delete values[index]; 537 } 538 }); 539 } 540 arrayClean(values); 541 542 //variable check 543 if(form.data('product_type') == 'variable' || form.data('product_type') == 'advancedvariable' || form.data('product_type') == 'variablesubscriptionproduct') { 544 var csv = []; 545 if(form.data('product_type') == 'advancedvariable') { 546 form.find('input[type=\'radio\']:checked, select').each( function( index, el ) { 547 if(el.value){ 548 if($(el).data('is-variant')){ 549 csv.push(el.value); 550 } 551 } 552 }); 553 }else { 554 form.find('input[type=\'radio\']:checked, select').each( function( index, el ) { 555 csv.push(el.value); 556 }); 557 } 558 var processed_csv =[]; 559 processed_csv = csv.sort(function(a, b){return a-b}); 560 561 var $selected_variant = processed_csv.join(); 562 //get all variants 563 var $variants = form.data('product_variants'); 564 565 var $variant_id = get_matching_variant($variants, $selected_variant); 566 form.find('input[name=\'variant_id\']').val($variant_id); 567 568 values.push({ 569 name : "variant_id", 570 value :$variant_id 571 }); 572 } 573 values = values.filter(function( element ) { 574 return element !== undefined; 575 }); 576 $( 'body' ).trigger( 'before_doAjaxPrice', [ form, values ] ); 577 $('.j2store-notifications .j2error').html(''); 578 $.ajax({ 579 url : j2storeURL+ 'index.php?option=com_j2store&view=product&task=update', 580 type : 'get', 581 data : values, 582 dataType : 'json', 583 success : function(response) { 584 585 var $product = $('.product-'+ product_id); 586 form.find('input[type=\'submit\']').attr('disabled',false); 587 if ($product.length 588 && typeof response.error == 'undefined') { 589 //SKU 590 if (response.sku) { 591 $product.find('.sku').html(response.sku); 592 } 593 //base price 594 if (response.pricing.base_price) { 595 $product.find('.base-price').html(response.pricing.base_price); 596 if(response.pricing.class){ 597 if(response.pricing.class == 'show'){ 598 $product.find('.base-price').show() 599 }else{ 600 $product.find('.base-price').hide() 601 } 602 } 603 } 604 //price 605 if (response.pricing.price) { 606 $product.find('.sale-price').html(response.pricing.price); 607 } 608 609 //afterDisplayPrice
610 if (response.afterDisplayPrice) { 611 $product.find('.afterDisplayPrice').html(response.afterDisplayPrice); 612 } 613 //qty 614 if (response.quantity) { 615 $product.find('input[name="product_qty"]').val(response.quantity); 616 if(form.data('product_type') == 'variable' || form.data('product_type') == 'advancedvariable' || form.data('product_type') == 'variablesubscriptionproduct') { 617 $product.find('input[name="product_qty"]').attr({ 618 value: response.quantity 619 }); 620 } 621 } 622 if(response.main_image){ 623 624 /*$product.find('.j2store-product-thumb-image-'+product_id).attr("src", response.main_image); 625 j2store.jQuery('.j2store-product-thumb-image-'+product_id).attr("src", response.main_image);*/ 626 j2store.jQuery('.j2store-product-main-image-'+product_id).attr("src", response.main_image); 627 $product.find('.j2store-mainimage .j2store-img-responsive').attr("src", response.main_image); 628 $product.find('.j2store-product-additional-images .additional-mainimage').attr("src", response.main_image); 629 } 630 //stock status 631 632 if (typeof response.stock_status != 'undefined') { 633 if (response.availability == 1) { 634 $product.find('.product-stock-container').html('<span class="instock">' + response.stock_status + '</span>'); 635 }else { 636 $product.find('.product-stock-container').html('<span class="outofstock">' + response.stock_status + '</span>'); 637 } 638 } 639 640 //dimensions 641 if (response.dimensions) { 642 $product.find('.product-dimensions').html(response.dimensions); 643 } 644 645 //weight 646 if (response.weight) { 647 $product.find('.product-weight').html(response.weight); 648 } 649 // discount text 650 $product.find('.discount-percentage').html(response.pricing.discount_text); 651 // Trigger event 652 $( 'body' ).trigger( 'after_doAjaxFilter', [ $product, response ] ); 653 $( 'body' ).trigger( 'after_doAjaxPrice', [ $product, response ] ); 654 } 655 }, 656 error : function(xhr, ajaxOptions, thrownError) { 657 console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" 658 + xhr.responseText); 659 } 660 }); 661 })(j2store.jQuery); 662} 663 664function setMainPreview(addimagId, product_id, imageZoom, zoom_type){ 665 zoom_type = zoom_type || "outer"; 666 var src =""; 667 (function($){ 668 src = $("#"+addimagId).attr('src'); 669 //$("#main-image-hidden").show(); 670 $("#j2store-item-main-image-"+product_id + " img").attr('src',''); 671 $("#j2store-item-main-image-"+product_id + " img").attr('src',src); 672 if(imageZoom){ 673 if(zoom_type=='outer') { 674 $('#j2store-item-main-image-'+product_id).elevateZoom({ 675 cursor: "crosshair", 676 zoomWindowFadeIn: 500, 677 zoomWindowFadeOut: 750, 678 zoomWindowWidth:450, 679 zoomWindowHeight:300 680 }); 681 }else if(zoom_type=='inner') { 682 $("#j2store-item-main-image-"+product_id + " .zoomImg").attr('src',src); 683 $("#j2store-item-main-image-"+product_id + " img" ).attr('src',src); 684 $('#j2store-item-main-image-'+product_id).elevateZoom({ 685 cursor: "crosshair", 686 zoomWindowFadeIn: 500, 687 zoomWindowFadeOut: 750, 688 zoomWindowWidth:450, 689 zoomWindowHeight:300 690 }); 691 } 692 } 693 })(j2store.jQuery); 694} 695 696function removeAdditionalImage(product_id, main_image, imageZoom, zoom_type){ 697 zoom_type = zoom_type || "outer"; 698 (function($){ 699 $("#j2store-item-main-image-"+product_id+ " img").attr('src',main_image); 700 setMainPreview('j2store-item-main-image-'+product_id, product_id, imageZoom, zoom_type); 701 })(j2store.jQuery); 702} 703 704/** 705 * Method to Submit the Form 706 * used product list view filters 707 */ 708function getJ2storeFiltersSubmit(){ 709 //show the loading image 710 jQuery("#j2store-product-loading").show(); 711 //submit the form 712 jQuery("#productsideFilters").submit(); 713} 714 715 716 function resetJ2storeBrandFilter(inputid){ 717 if(inputid){ 718 jQuery("#productsideFilters").find("#"+inputid).prop('checked',false); 719 }else{ 720 jQuery(".j2store-brand-checkboxes").each( function(){ 721 this.checked = false; 722 }); 723 } 724 //getJ2storeFiltersSubmit(); 725} 726 727 728/** 729 * Method to reset the vendor filter 730 */
731 function resetJ2storeVendorFilter(inputid){ 732 if(inputid){ 733 jQuery("#productsideFilters").find("#"+inputid).prop('checked',false); 734 }else{ 735 jQuery(".j2store-vendor-checkboxes").each( function(){ 736 this.checked = false; 737 }); 738 } 739// getJ2storeFiltersSubmit(); 740} 741 742 743/** 744 * Method to Reset Product Filter Based on the group 745 * @params string productfilter checkboxes class name 746 * @return result 747 */ 748 function resetJ2storeProductFilter(productfilter_class,inputid){ 749 if(productfilter_class){ 750 //loop the class element 751 jQuery("."+productfilter_class).each( function(){ 752 //set the checked to false 753 this.checked = false; 754 }); 755 756 }else if(inputid){ 757 jQuery("#productsideFilters").find("#"+inputid).prop('checked',false); 758 } 759// getJ2storeFiltersSubmit(); 760} 761 762/** Toggle Methods **/ 763function getPriceFilterToggle(){ 764 (function($) { 765 $('#price-filter-icon-plus').toggle(); 766 $('#price-filter-icon-minus').toggle(); 767 $('#j2store-slider-range').toggle(); 768 $('#j2store-slider-range-box').toggle(); 769 })(j2store.jQuery); 770} 771 772function getCategoryFilterToggle(){ 773 (function($) { 774 $('#cat-filter-icon-plus').toggle(); 775 $('#cat-filter-icon-minus').toggle(); 776 $('#j2store_category').toggle(); 777 })(j2store.jQuery); 778} 779 780function getBrandFilterToggle(){ 781 (function($) { 782 $('#brand-filter-icon-plus').toggle(); 783 $('#brand-filter-icon-minus').toggle(); 784 $('#j2store-brand-filter-container').toggle(); 785 })(j2store.jQuery); 786} 787 788function getVendorFilterToggle(){ 789 (function($) { 790 $('#vendor-filter-icon-plus').toggle(); 791 $('#vendor-filter-icon-minus').toggle(); 792 $('#j2store-vendor-filter-container').toggle(); 793 })(j2store.jQuery); 794} 795 796function getPFFilterToggle(id){ 797 (function($) { 798 $('#pf-filter-icon-plus-'+id).toggle(); 799 $('#pf-filter-icon-minus-'+id).toggle(); 800 $('#j2store-pf-filter-'+id).toggle(); 801 })(j2store.jQuery); 802}
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.