1/**handles:wcmp-b2b-shop**/ 2"use strict"; 3var b2bmp = jQuery.noConflict(); 4b2bmp(function () { 5 b2bmp(document).ready( (e) => { 6 b2bmp('body').on('click', '.wcmp-b2b-shop-review-form p.wcmp-b2b-star-rating a', function () { 7 var feedType = b2bmp( this ).data('type'); 8 var $star = b2bmp( this ), 9 $rating = b2bmp( this ).closest( '.wcmp-b2b-star-rating' ).siblings( '#feed-' + feedType + '-rating' ), 10 $container = b2bmp( this ).closest( '.wcmp-b2b-star-rating' ); 11 12 $rating.val( $star.data('rate') ); 13 $star.siblings( 'a' ).removeClass( 'active' ); 14 $star.addClass( 'active' ); 15 $container.addClass( 'selected' ); 16 return false; 17 }); 18 19 if(document.querySelector(".b2b-more-info-link")) { 20 document.querySelector(".b2b-more-info-link").addEventListener("click", (e) => { 21 e.preventDefault(); 22 let element = document.querySelector(".b2b-wrap-more-info"); 23 if (element) { 24 if (element.classList.contains("open")) { 25 element.classList.remove("open"); 26 } else { 27 element.classList.add("open"); 28 } 29 } 30 }); 31 } 32 33 // Remove supplier from favourite list 34 b2bmp(".shop-followers .remove-icon").on("click",function(){ 35 let currentElm = b2bmp(this); 36 let supplier = currentElm.data("supplier-id"); 37 let customer = currentElm.data("customer-id"); 38 var confirmation = confirm(b2bmpObj.translation.fajax1); 39 if( confirmation == true ){ 40 b2bmp.ajax({ 41 type: 'POST', 42 url: b2bmpObj.ajax.ajaxUrl, 43 data: { 44 "action": "wcmp_b2b_delete_favourite_shop", 45 "supplier": supplier, 46 "customer":customer, 47 "nonce":b2bmpObj.ajax.ajaxNonce 48 }, 49 success: function(data) { 50 if(data != undefined){ 51 alert(data.message); 52 location.reload(); 53 } 54 } 55 }); 56 } 57 }); 58 59 // Shop review box 60 b2bmp('.wcmp-rating-wrap').on('click', function (event) { 61 b2bmp('.wcmp-avg-rating-box').toggle(); 62 }); 63 }); 64});
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.