1var sitePager = $("#product-grid-pager").paging(productResultsCount, { 2 // Set up onclick handler 3 onClick: function (ev) { 4 ev.preventDefault(); 5 6 var sitepage = $(this).data("page"); 7 sitePager.setPage(sitepage); 8 9 // Remove Current Spinner and Display new spinner 10 $(".grid-loading").remove(); 11 $("#product-grid-content").append( 12 '<div class="grid-loading"><div class="spinner"><div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div><div class="rect5"></div></div></div>' 13 ); 14 $("html, body").animate( 15 { 16 scrollTop: 17 $("div#product-grid-content").offset().top - 18 $("header").outerHeight(), 19 }, 20 1200 21 ); 22 setTimeout(function () { 23 $.ajax({ 24 url: "/modules/ecommerce/ajax/get-product-results.php", 25 type: "post", 26 data: { 27 pageType: pageType, 28 pageTypeId: pageTypeId, 29 page: sitepage, 30 filters: currentFilters, 31 sort: sortId, 32 pagingCount: resultsPerPage, 33 key: "UQkVb7MhGeMRc57W4t2KDQq8", 34 }, 35 dataType: "json", 36 success: function (data) { 37 $("#product-grid-content").html(data.html); 38 $(".grid-loading").remove(); 39 $("img.lazy").lazyload({ threshold: 200 }); 40 }, 41 }); 42 }, 750); 43 }, 44 45 // Set up easy format 46 format: "<nncnn>", 47 48 // Typical onFormat handler, copied from source file 49 onFormat: function (type) { 50 switch (type) { 51 case "block": 52 if (!this.active) 53 return '<span class="disabled page">' + this.value + "</span>"; 54 else if (this.value != this.page) 55 return '<em><a class="page" href="#">' + this.value + "</a></em>"; 56 return '<span class="current page">' + this.value + "</span>"; 57 58 case "right": 59 case "left": 60 if (!this.active) { 61 return ""; 62 } 63 return '<a class="page" href="#">' + this.value + "</a>"; 64 65 case "next": 66 if (this.active) { 67 return '<a href="#" class="next">Next »</a>'; 68 } 69 return '<span class="page disabled">Next »</span>'; 70 71 case "prev": 72 if (this.active) { 73 return '<a href="#" class="prev">« Prev</a>'; 74 } 75 return '<span class="disabled page">« Prev</span>'; 76 77 case "first": 78 if (this.active) { 79 return '<a href="#" class="first">|<</a>'; 80 } 81 return '<span class="disabled page">|<</span>'; 82 83 case "last": 84 if (this.active) { 85 return '<a href="#" class="prev">>|</a>'; 86 } 87 return '<span class="disabled page">>|</span>'; 88 89 case "fill": 90 if (this.active) { 91 return "..."; 92 } 93 } 94 return ""; // return nothing for missing branches 95 }, 96}); 97sitePager.setPage(current_page); 98// if results per page is greater than products found, hide the pager 99if (resultsPerPage >= productResultsCount) { 100 $("#product-grid-pager").hide(); 101} else { 102 $("#product-grid-pager").show(); 103}
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.