1var sCookie_property_cart = new sCookie("saved_properties"); 2sCookie_property_cart.addProperty = function (property_id) { 3 var currentCart = []; 4 if (sCookie_property_cart.content.length > 0) { 5 currentCart = sCookie_property_cart.content.split(";"); 6 } 7 if (currentCart.indexOf("" + property_id) == "-1") currentCart.push(property_id); 8 sCookie_property_cart.save(null, currentCart.join(";")); 9 alert("Immobile aggiunto nella Tua Lista dei preferiti"); 10 return true; 11}; 12sCookie_property_cart.removeProperty = function (property_id) { 13 if (sCookie_property_cart.content.length > 0) { 14 var currentCart = sCookie_property_cart.content.split(";"); 15 var currentPos = currentCart.indexOf("" + property_id); 16 if (currentPos > -1) currentCart.splice(currentPos, 1); 17 sCookie_property_cart.save(null, currentCart.join(";")); 18 //alert("Immobile rimosso dalla Tua Lista dei preferiti"); 19 } else { 20 alert("La tua lista è attualmente vuota, aggiungi prima un annuncio"); 21 } 22 return true; 23}; 24 25function changeIcon() { 26 var element = document.getElementById('icona-pref'); 27 if (element) { 28 29 if (!sCookie_property_cart.content) { 30 element.classList.add("fa-user"); 31 element.classList.remove("fa-exclamation"); 32 } else { 33 element.classList.add("fa-exclamation"); 34 element.classList.remove("fa-user"); 35 } 36 } 37 38 var element_w = document.getElementById('widget-pref'); 39 var element_o = document.getElementById('open-modal'); 40 if (element_w) { 41 42 if (!sCookie_property_cart.content) { 43 element_w.classList.add("hide-widget"); 44 element_w.classList.remove("show-widget"); 45 element_o.classList.remove("open"); 46 } else { 47 element_w.classList.add("show-widget"); 48 element_w.classList.remove("hide-widget"); 49 } 50 } 51 52}; 53 54
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.