1$(document).ready(function(){ 2 3 // SHOW-HIDE LEGAL NOTICE ON ITEM PAGE 4 $('body').on('click', '#bpr-notice .bpr-notice-head a', function(e){ 5 e.preventDefault(); 6 $(this).parent().toggleClass('opened'); 7 $(this).closest('#bpr-notice').find('.bpr-notice-text').slideToggle(200); 8 }); 9 10 // SHOW-HIDE LEGAL NOTICE ON SELLER PAGE 11 $('body').on('click', '.bpr-legal-notice-sidebar .bpr-legal-notice-head', function(e){ 12 e.preventDefault(); 13 $(this).toggleClass('opened'); 14 $(this).closest('.bpr-legal-notice-sidebar').find('.bpr-legal-notice-text').slideToggle(200); 15 }); 16 17 // LIGHTBOX GALLERY 18 if(typeof $.fn.lightGallery !== 'undefined') { 19 $('#bpr-gallery, .bpr-preview.bpr-gal').lightGallery({ 20 mode: 'lg-slide', 21 thumbnail: true, 22 cssEasing : 'cubic-bezier(0.25, 0, 0.25, 1)', 23 selector: 'a.limg', 24 getCaptionFromTitleOrAlt: false, 25 download: false, 26 thumbWidth: 90, 27 thumbContHeight: 80, 28 share: false 29 }); 30 } 31 32 // SHOW PHONE NUMBER 33 $('body').on('click', '.bpr-phone-mask', function(e) { 34 if($(this).attr('href') == '#' && !$(this).hasClass('not-logged')) { 35 e.preventDefault() 36 37 var phoneNumber = $(this).attr('data-part1') + $(this).attr('data-part2'); 38 $(this).text(phoneNumber).addClass('bpr-bold'); 39 $(this).attr('href', 'tel:' + phoneNumber); 40 $(this).attr('title', $(this).attr('data-tip')); 41 42 Tipped.remove('.bpr-has-tooltip-phone'); 43 Tipped.create('.bpr-has-tooltip-phone', { maxWidth: 200, radius: false, behavior: 'hide'}); 44 } 45 }); 46 47 // CATEGORY MULTI SELECT - PROFILE 48 $('body').on('change', '.bpr-select-cat input[type="checkbox"]', function(e){ 49 var ids = []; 50 51 $('.bpr-select-cat input[type="checkbox"]').each(function() { 52 if($(this).is(":checked")) { 53 ids.push($(this).val()); 54 } 55 }); 56 57 var idsList = ids.join(','); 58 59 $(this).closest('.bpr-row-select-multiple').find('input[type="hidden"]').val(idsList); 60 }); 61 62 63 // SEARCH - CATEGORY/CITY AUTOSUBMIT 64 $('body').on('change', '.bpr-search-right select', function(e){ 65 $(this).closest('form').submit(); 66 }); 67 68 69 // PROPERLY SUBMIT CONTACT SELLER 70 $('body').on('click', 'button.bpr-btn', function(e){ 71 e.preventDefault(); 72 $(this).closest('form').submit(); 73 }); 74 75 76 // CATEGORY MULTI SELECT 77 $('body').on('change', '.bpr-row-select-multiple select', function(e){ 78 $(this).closest('.bpr-row-select-multiple').find('input[type="hidden"]').val($(this).val()); 79 }); 80 81 82 // ICON UPLOAD - FILE NAME 83 $('body').on('change', 'input[name="bpr-file-icon"]', function() { 84 if( $(this)[0].files[0]['name'] != '' ) { 85 $('.bpr-row-icon .bpr-attachment .bpr-att-box .bpr-status .bpr-wrap span').text( $(this)[0].files[0]['name'] ); 86 } 87 }); 88 89 90 // COVER UPLOAD - FILE NAME 91 $('body').on('change', 'input[name="bpr-file-cover"]', function() { 92 if( $(this)[0].files[0]['name'] != '' ) { 93 $('.bpr-row-cover .bpr-attachment .bpr-att-box .bpr-status .bpr-wrap span').text( $(this)[0].files[0]['name'] ); 94 } 95 }); 96 97 98 // GALLERY UPLOAD - FILE NAME 99 $('body').on('change', 'input[name="bpr-files-gallery[]"]', function() { 100 if( $(this)[0].files[0]['name'] != '' ) { 101 var name = []; 102 for (let i = 0; i < $(this)[0].files.length; i++) { 103 name.push($(this)[0].files[i]['name']); 104 } 105 106 $('.bpr-row-gallery .bpr-attachment .bpr-att-box .bpr-status .bpr-wrap span').text(name.join(', ')); 107 } 108 }); 109 110 // PAGINATION CLICK - GO TO ITEMS 111 if((typeof bprPage !== 'undefined' && bprPage >= 1) || (typeof bprCategory !== 'undefined' && bprCategory > 0) || (typeof bprCity !== 'undefined' && bprCity > 0)) { 112 $('html, body').animate({ 113 scrollTop: $('.bpr-filters').offset().top 114 }, 0); 115 } 116 117 118 // FILTER ITEMS BASED ON CITY 119 $('body').on('change', 'select#bpr-city', function(e){ 120 var url = bprSearch; 121 var id = $(this).val(); 122 123 if(id != bprCity) { 124 url = url.replace('{city}', id); 125 url = url.replace('{category}', bprCategory); 126 url = url.replace('{page}', ''); 127 128 window.location.href = url; 129 } 130 }); 131 132 // FILTER ITEMS BASED ON CATEGORY 133 $('body').on('change', 'select#bpr-category', function(e){ 134 var url = bprSearch; 135 var id = $(this).val(); 136 137 if(id != bprCategory) { 138 url = url.replace('{category}', id); 139 url = url.replace('{city}', bprCity); 140 url = url.replace('{page}', ''); 141 142 window.location.href = url; 143 } 144 }); 145 146 // CONTACT DISABLED 147 $('body').on('click', 'a.bpr-btn.bpr-disabled', function(e){ 148 e.preventDefault(); 149 }); 150 151 152 // CONTACT ALLOWED 153 $('body').on('click', 'a.bpr-btn.bpr-go, a.bpr-close', function(e){ 154 e.preventDefault(); 155 $('a.bpr-btn.bpr-go').fadeToggle(200); 156 $('#sellerContact').fadeToggle(200); 157 }); 158 159 160 161 // CREATE TOOLTIPS 162 Tipped.create('.bpr-has-tooltip', { maxWidth: 200, radius: false, behavior: 'hide'}); 163 Tipped.create('.bpr-has-tooltip-phone', { maxWidth: 200, radius: false, behavior: 'hide'}); 164 165});
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.