1$(document).ready(function() { 2 3 var divMain = "favorite-content"; 4 var favoritelist = new Favoritelist(divMain); 5 favoritelist.setFavoritelistContent(); 6 7 var data_lang = ["shop3"]; 8 9 var dataLang = common.getLangData(); 10 11 getDataBegin(); 12 13 function getDataBegin() { 14 function recalcCartAmount(obj, newVal) { 15 16 var amountValue = obj.closest(".cart-content-item").find(".cart-content-amount-value"); 17 var amountText = obj.closest(".cart-content-item").find(".cart-content-amount"); 18 19 var priceValue = obj.closest(".cart-content-item").find(".cart-content-price-value").val(); 20 21 var result = priceValue * newVal; 22 23 amountValue.val(result); 24 amountText.text(result.toCurrencyGrn()); 25 } 26 27 $(document).on("click", ".favoritelist-close-icon", function (event) { 28 29 var component = $(this).closest(".favoritelist-content-item"); 30 31 var inputData = { 32 "product_id" : component.find(".input-quantity").attr("product-id") 33 } 34 35 $.ajax({ 36 url: '/ajax/favoritelistajax/deletefromfavoritelist', 37 dataType: 'json', 38 type: 'POST', 39 global: false, 40 data : inputData, 41 success: function(dataOutput, textStatus, jQxhr) { 42 if (dataOutput.code == 'success') { 43 if (dataOutput.fl_count > 0) { 44 component.remove(); 45 } else { 46 $(".header-favoritelist-count").removeClass("show"); 47 var favoritelist = new Favoritelist("favoritelist-content"); 48 favoritelist.setFavoritelistContent(); 49 } 50 51 $(".headerfavoritelistquantityvalue").text(dataOutput.fl_count); 52 53 } 54 }, 55 error: function( jqXhr, textStatus, errorThrown ) { 56 console.log(errorThrown); 57 } 58 }); 59 }); 60 61 $(document).on("click", ".favoritelist-move-to-cart-icon", function (event) { 62 63 var component = $(this).closest(".favoritelist-content-item"); 64 65 var inputData = { 66 "product_id" : component.find(".input-quantity").attr("product-id") 67 } 68 69 $.ajax({ 70 url: '/ajax/favoritelistajax/deletefromfavoritelist', 71 dataType: 'json', 72 type: 'POST', 73 global: false, 74 data : inputData, 75 success: function(dataOutput, textStatus, jQxhr) { 76 if (dataOutput.code == 'success') { 77 if (dataOutput.fl_count > 0) { 78 component.remove(); 79 80 } else { 81 $(".header-favoritelist-count").removeClass("show"); 82 var favoritelist = new Favoritelist("favoritelist-content"); 83 favoritelist.setFavoritelistContent(); 84 } 85 setCartContent(inputData); 86 87 $(".headerfavoritelistquantityvalue").text(dataOutput.fl_count); 88 89 } 90 }, 91 error: function( jqXhr, textStatus, errorThrown ) { 92 console.log(errorThrown); 93 } 94 }); 95 96 function setCartContent(inputData) { 97 98 inputData.quantity = 1; 99 100 $.ajax({ 101 url: '/ajax/cartajax/addtocart', 102 dataType: 'json', 103 type: 'POST', 104 global: false, 105 data : inputData, 106 success: function(dataOutput, textStatus, jQxhr) { 107 if (dataOutput.code == 'success') { 108 $(".headercartquantityvalue").text(dataOutput.cart_count); 109 110 if (!$(".header-cart-basket-count").hasClass("show")) { 111 $(".header-cart-basket-count").addClass( "show" ); 112 } 113 114 var cart = new Cart("cart-content"); 115 cart.setCartContent(); 116 } 117 }, 118 error: function( jqXhr, textStatus, errorThrown ) { 119 console.log(errorThrown); 120 } 121 }); 122 } 123 }); 124 } 125 126 127 128 129 130 131 132 133 134});
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.