1$(document).ready(function(){ 2 ellipsis(); 3}); 4 5function addWishlist(event, prod){ 6 event.preventDefault(); 7 event.stopPropagation(); 8 9 if( $(prod).hasClass('sel') ){ 10 var pid = $(prod).attr('data-pid'); 11 12 $.get("/api/api.php/removeFromWishList/"+pid).done(function() { 13 if($(prod).attr('wishlist-page') == 1){ 14 $(prod).parents(".column").remove(); 15 }else{ 16 if($(window).width() >= 768){ 17 $('.desktop-rem-wish-notice').fadeIn(300); 18 setTimeout(function(){ 19 $('.desktop-rem-wish-notice').fadeOut(300); 20 }, 3000); 21 }else{ 22 $('.mobile-rem-wish-notice').slideDown(300); 23 setTimeout(function(){ 24 $('.mobile-rem-wish-notice').slideUp(300); 25 }, 3000); 26 } 27 28 } 29 var totalProducts = parseInt($("#itemsWishlist").text()) - 1; 30 $(".user-wishlist #itemsWishlist").html(totalProducts); 31 if( totalProducts == 0 ){ 32 $('.user-wishlist').addClass('disabled'); 33 $('.wishlist .share-wishlist').hide(); 34 $('.wishlist .empty-notice').show(); 35 } 36 $(prod).attr('title', JSVars['expressions']['21']); 37 $(prod).removeClass('sel'); 38 39 40 return; 41 }); 42 }else{ 43 var pid = $(prod).attr('data-pid'); 44 var pc = $(prod).attr('data-pc'); 45 $.get( "/api/api.php/addToWishList/"+pid+"/"+ JSVars.selectedPage.id +"/"+ JSVars.selectedPage.cat +"/"+ pc).done(function(data) { 46 var totalProducts = $.parseJSON(data).response.wishlist.length; 47 if($(window).width() >= 768){ 48 $(".user-wishlist").removeClass('disabled'); 49 $(".user-wishlist #itemsWishlist").html(totalProducts); 50 $('.desktop-wish-notice').fadeIn(300); 51 setTimeout(function(){ 52 $('.desktop-wish-notice').fadeOut(300); 53 }, 3000); 54 }else{ 55 $(".user-wishlist").removeClass('disabled'); 56 $('.mobile-wish-notice').slideDown(300); 57 setTimeout(function(){ 58 $('.mobile-wish-notice').slideUp(300); 59 }, 3000); 60 } 61 }); 62 $(prod).attr('title', JSVars['expressions']['1018']); 63 $(prod).addClass('sel'); 64 } 65 66} 67 68function removeWishlist(event, prod){ 69 event.preventDefault(); 70 var pid = $(prod).attr('data-pid'); 71 72 $.get("/api/api.php/removeFromWishList/"+pid).done(function() { 73 $(prod).parents(".column").remove(); 74 var totalProducts = $('.wishlist .container-list .column').length; 75 if($(window).width() >= 768){ 76 $(".user-wishlist #itemsWishlist").html(totalProducts); 77 if( totalProducts == 0 ){ 78 $('.user-wishlist').addClass('disabled'); 79 $('.wishlist .share-wishlist').hide(); 80 $('.wishlist .empty-notice').show(); 81 } 82 } 83 }); 84} 85 86function ellipsis(){ 87 /* $('article.product-row .description').dotdotdot({ 88 ellipsis: '\u2026', 89 watch : true, 90 wrap : 'letter', 91 height : 20 * 3 92 }).data('dotdotdot'); 93 94 $('article.product:not(.product-row) .name').dotdotdot({ 95 ellipsis: '\u2026', 96 watch : true, 97 wrap : 'letter', 98 height : 20 * 2 99 }).data('dotdotdot'); */ 100} 101 102function productItemAngular(data, item, position){ 103 104 // item.expression21="{{response.expressions.21|raw}}"; 105 item.expression48="{{response.expressions.48|raw}}"; 106 // item.expression50="{{response.expressions.50|raw}}"; 107 // item.expression52="{{response.expressions.52|raw}}"; 108 // item.expression123="{{response.expressions.123|raw}}"; 109 // item.expression167="{{response.expressions.167|raw}}"; 110 // item.expression212="{{response.expressions.212|raw}}"; 111 item.grid_view=data.response.grid_view; 112 113 var stock = 0; 114 angular.forEach( item.variants, function(value,index){ 115 stock = stock+parseInt(value.inventory_quantity); 116 }); 117 118 item.totalStock = stock; 119 item.totalTags = item.tags.length; 120 item.totalColors = item.available_colors.length; 121 // item.comparator = data.response.shop.TEMPLATES_PARAMS.list_allow_compare; 122 // item.quickSearch = data.response.shop.TEMPLATES_PARAMS.list_quick_shop; 123 124 if(item.sku != "ADS") { 125 item.previous_price.available = (item.previous_price.value != 0 && item.previous_price.value != item.price.value) ? true : false;
126 127 if(item.previous_price.available) 128 item.previous_price.value = number_format(item.previous_price.value, item.previous_price.currency.number_dec, item.previous_price.currency.separator_dec, item.previous_price.currency.separator_mil); 129 130 item.price.value = number_format(item.price.value, item.price.currency.number_dec, item.price.currency.separator_dec, item.price.currency.separator_mil); 131 item.price_min.value = number_format(item.price_min.value, item.price_min.currency.number_dec, item.price_min.currency.separator_dec, item.price_min.currency.separator_mil); 132 item.price_max.value = number_format(item.price_max.value, item.price_max.currency.number_dec, item.price_max.currency.separator_dec, item.price_max.currency.separator_mil); 133 } 134 135 item.CDNIMG = windowLocation.JSVars.shop.CDN 136 if(item.featured_image.resource_url.regular.search("getImage") > 0) 137 item.CDNIMG = '/'; 138 139 item.imgDESKTOP = item.CDNIMG + item.featured_image.resource_url.small; 140 item.imgDESKTOP2X = item.CDNIMG + item.featured_image.resource_url.regular; 141 item.imgMOBILE2X = (windowLocation.JSVars.shop.templatesParams.list_mobile_grid == 50) ? item.imgDESKTOP : item.imgDESKTOP2X; 142 143 item.imgDESKTOP_H = ""; 144 if(item.images.length > 1 && item.productHoverImage == 1) { 145 item.imgDESKTOP_H = item.CDNIMG + item.images[1].resource_url.small; 146 item.imgDESKTOP2X_H = item.CDNIMG + item.images[1].resource_url.regular; 147 item.imgMOBILE2X_H = (windowLocation.JSVars.shop.templatesParams.list_mobile_grid == 50) ? item.imgDESKTOP_H : item.imgDESKTOP2X_H; 148 } 149 150 if( typeof paramTeste == "undefined") 151 paramTeste = 0; 152 153 if( paramTeste == 1 ) 154 item.teste = 1; 155 156 //console.log(data); 157 158 return item; 159 160 161}
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.