PageSourceSearch

https://www.lasavonneriedunouveaumonde.com/modules/poswishlist/js/ajax-wishlist.js

js lasavonneriedunouveaumonde.com collected 2026-10-10 02:19:57 UTC 4,588 bytes, 127 lines download raw bytes

1var wishlistProductsIds = [];
2$(document).ready(function(){	
3	posCopyLink();
4});
5
6function posCopyLink() {
7    var copyText = $('#posCopyLink'),
8	    copied_text = copyText.data('text-copied'),
9	    copy_text = copyText.data('text-copy');
10	copyText.click(function() {
11	    $('.js-to-clipboard').select();
12	    document.execCommand('copy');
13        copyText.text(copied_text);
14        setTimeout(function(){
15        	copyText.text(copy_text);
16        }, 5000);
17	})
18}
19
20function WishlistCart(id, action, id_product, id_product_attribute, quantity, id_wishlist, product_name , product_image)
21{
22	$.ajax({
23		type: 'GET',
24		url: baseDir + 'modules/poswishlist/cart.php?rand=' + new Date().getTime(),
25		headers: { "cache-control": "no-cache" },
26		async: true,
27		cache: false,
28		data: 'action=' + action + '&id_product=' + id_product + '&quantity=' + quantity + '&token=' + static_token + '&id_product_attribute=' + id_product_attribute + '&id_wishlist=' + id_wishlist,
29		success: function(data)
30		{	
31			if (action == 'add')
32			{	
33				if (isLogged == true) {
34
35                    $('.wishlist-top-count').html(data);
36                    $('#qmwishlist-count').html(data);
37
38					var html = '';
39					html += '<div class="modal fade" id="wishlistModal">';
40					html += '<div class="modal-dialog"><div class="modal-content">';
41						html += '<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="material-icons close">close</i></button>';
42						html += '<div class="modal-body">';
43							html += '<div class="wishlist-content">';
44								html += '<img src="' + product_image + '" alt="' + product_name + '" />';
45								html += '<div class="wishlist-data">';
46									html += '<h5>' + product_name + '</h5>';
47									html += added_to_wishlist;
48								html += '</div>'; 
49							html += '</div>'; 
50							html += '<a class="btn-primary wishlist-timer" href="' + wishlist_url + '"><span></span>' + wishlist_text + '</a>';
51						html += '</div>';
52					html += '</div></div></div>';
53					$("body").append(html);
54					$('.quickview').modal('hide')
55					$('#wishlistModal').modal('show');
56					$("body").removeClass('modal-open');
57					$(".modal-backdrop.in").hide();
58					var timer = setTimeout(function(){
59	                    $('#wishlistModal').remove();
60	                }, 5000);
61	                $("#wishlistModal .modal-content").hover(
62	                    function(){
63	                        clearTimeout(timer);
64	                        $('#wishlistModal a.btn-primary').removeClass('wishlist-timer');
65	                    }, function(){
66	                        $('#wishlistModal a.btn-primary').addClass('wishlist-timer');
67	                        timer= setTimeout(function() { 
68	                            $('#wishlistModal').remove();
69	                        }, 5000);
70	                    }
71	                );
72					$('#wishlistModal').on('hidden.bs.modal', function () {
73			        	$('#wishlistModal').remove();
74			        	clearTimeout(timer);
75			      	});
76				}else{
77					var html = '';
78					html += '<div class="modal fade" id="wishlistModalLogin">';
79					html += '<div class="modal-dialog"><div class="modal-content">';
80						html += '<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="material-icons close">close</i></button>';
81						html += '<div class="modal-body">';
82						html += loggin_required;
83						html += '<a class="btn-primary" href="'+ loggin_url +'" class="login_text">'+ loggin_text +'</a>'
84						html += '</div>';
85					html += '</div></div></div>';
86					$("body").append(html);
87					$('.quickview').modal('hide');
88					$('#wishlistModalLogin').modal('show');
89
90					$('#wishlistModalLogin').on('hidden.bs.modal', function () {
91			        	$('#wishlistModalLogin').remove();
92			      	});
93				}
94			}
95			
96			if($('#' + id).length != 0)
97			{
98				$('#' + id).slideUp('normal');
99				document.getElementById(id).innerHTML = data;
100				$('#' + id).slideDown('normal');
101			}
102		}
103	});
104}
105
106/**
107* Delete product wish list
108*
109* @return void
110*/
111function deleteProductWishlist(id_product, id_product_attribute)
112{
113	$.ajax({
114		type: 'GET',
115		async: true,
116		url: baseDir + 'module/poswishlist/mywishlist?rand=' + new Date().getTime() + '&action=delete',
117		headers: { "cache-control": "no-cache" },
118		data: 'id_product=' + id_product + '&id_product_attribute=' + id_product_attribute,
119		cache: false,
120		dataType: 'json',
121		success: function(data)
122		{	
123			$('#wlp_' + data.id_product + '_' + data.id_product_attribute).fadeOut('fast');
124			$('.wishtlist_top .cart-wishlist-number').html(data.current_number);
125		}
126	});
127}

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.