1// JavaScript Document 2(function($) { 3 $("a#zoom").fancybox(); 4 5 $(".offrir input").click(function(e) { 6 e.stopImmediatePropagation(); 7 if($(this).prop("checked")) { 8 $(this).parent().next("ul").css("display","block"); 9 } else { 10 $(this).parent().next("ul").css("display","none"); 11 } 12 }); 13 14 if($("#paiement-cheque").prop("checked")) { 15 $("#detail-cheque").css("display","block"); 16 } 17 18 $("#paiement-cheque").click(function(e) { 19 e.stopImmediatePropagation(); 20 $("#detail-cheque").css("display","block"); 21 }); 22 23 $("#paiement-cb").click(function(e) { 24 e.stopImmediatePropagation(); 25 $("#detail-cheque").css("display","none"); 26 }); 27 28 29 $(".pass").click(function(e) { 30 e.preventDefault(); 31 e.stopImmediatePropagation(); 32 /*if($("#ps input").attr("type") == "password") { 33 $("#ps input").attr("type","text"); 34 $("#ps a").text("Cacher"); 35 } else{ 36 $("#ps input").attr("type","password"); 37 $("#ps a").text("Montrer"); 38 }*/ 39 if($(this).prev("input").attr("type") == "password") { 40 $(this).prev("input").attr("type","text"); 41 /*$(this).text("Cacher");*/ 42 } else{ 43 $(this).prev("input").attr("type","password"); 44 /*$(this).text("Montrer");*/ 45 } 46 47 48 }); 49 50 $(".addPanier").submit(function(event) { 51 event.preventDefault(); 52 event.stopImmediatePropagation(); 53 //$.get($(this).attr("href")); 54 $.ajax({ 55 type: $(this).attr('method'), 56 url: $(this).attr('action'), 57 data: $(this).serialize(), 58 dataType:"json", 59 }) .done(function( msg ) { 60 if(msg == 1) { 61 $(location).attr('href', '/panier.php'); 62 } else { 63 $("#erreur").html(msg); 64 } 65 }); 66 $.ajax({ 67 url:"/modules/catalogue/frontend/index.php?action=nbProduits", 68 dataType:"json", 69 success: function (data) { 70 $("#total-panier").text(data.qte); 71 }, 72 }); 73 74 }); 75 76 77 function loadURL(url) { 78 $(".details-panier").fadeIn("slow").load(url,function (responseText, textStatus, XMLHttpRequest) { 79 if (textStatus == "success") { 80 $.ajax({
81 url:"/modules/catalogue/frontend/index.php?action=nbProduits", 82 dataType:"json", 83 success: function (data) { 84 $("#total-panier").text(data.qte); 85 $("#total-articles").text(data.qte); 86 $(".totalprix-panier").text(data.total); 87 }, 88 }); 89 } 90 }); 91 } 92 93 $(document).on("click",".qteDown",function(event){ 94 event.preventDefault(); 95 event.stopImmediatePropagation(); 96 var url = $(this).attr("data-url"); 97 loadURL(url); 98 }); 99 100 $(document).on("click",".qteUp",function(event){ 101 event.preventDefault(); 102 event.stopImmediatePropagation(); 103 var url = $(this).attr("data-url"); 104 loadURL(url); 105 }); 106 107 $(document).on("click",".supp",function(event){ 108 event.preventDefault(); 109 event.stopImmediatePropagation(); 110 var url = $(this).attr("data-url"); 111 loadURL(url); 112 }); 113 114 $(document).on("blur", ".quantite",function(event){ 115 event.preventDefault(); 116 event.stopImmediatePropagation(); 117 var url = $(this).attr("data-url"); 118 var quantite = $(this).val(); 119 loadURL(url+"&quantite="+quantite); 120 }); 121 122 123 $(".modifPanier").submit(function(event,value) { 124 event.preventDefault(); 125 event.stopImmediatePropagation(); 126 $.ajax({ 127 type: $(this).attr('method'), 128 url: $(this).attr('action'), 129 data: $(this).serialize()+"¶m1="+value, 130 131 success: function (data) { 132 $(".details-panier").fadeIn("slow").load("/modules/catalogue/frontend/index.php?action=panier&modifPanier&ajax"); 133 }, 134 error: function (data) { 135 console.log('An error occurred.'); 136 console.log(data); 137 }, 138 }); 139 return false; 140 }); 141})(jQuery);
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.