1 2var cookie_site = ""; 3var cookie_idioma = ""; 4var cookie_enabled = false; 5 6function estableixCookieAccepted(nom_cookie, valor, mostra_missatge_permanent, secure) { 7 // secure parameter set true by default 8 secure = (typeof secure !== 'undefined') ? secure : true; 9 10 // saved for 60 days 11 setCookie(nom_cookie, valor, 60, secure); 12} 13 14 15function loadCookieManager(site, idioma, mostra_manager, force, gestionar) 16{ 17 if ((typeof force === 'undefined')) { 18 force = false; 19 } 20 if ((typeof gestionar === 'undefined')) { 21 gestionar = false; 22 } 23 24 $("body").prepend("<div id='cookie-manager'" + (mostra_manager !== "S" ? " class='nodisplay'" : "") + "></div>"); 25 26 cookie_site = site; 27 cookie_idioma = idioma; 28 29 // adding variable: var show_d2web_cookie=false in script page causes not to show popup 30 if ((typeof show_d2web_cookie === 'undefined') || show_d2web_cookie) { 31 $("#cookie-manager").load("/comu/cookies.php" + (force ? "?force=Y": ""), {"site": site, "idioma": idioma, "manage": mostra_manager, "gestionar": (gestionar ? "S": "N")}); 32 } 33} 34 35 36function MissatgesCookies(permanent, secure, pop) 37{ 38 pop = (typeof pop !== 'undefined') ? pop : null; 39 secure = (typeof secure !== 'undefined') ? secure : true; 40 41 /* Opció amb inputs checkbox: 42 "cookie_preferences" : $("#cookies_preferences:checked").val()==="S"?"S":"N", 43 "cookie_statistics" : $("#cookies_statistics:checked").val()==="S"?"S":"N", 44 "cookie_marketing" : $("#cookies_marketing:checked").val()==="S"?"S":"N" 45 */ 46 47 $(document).on("click","#cookie_acceptar_selected",function(){ 48 estableixCookieAccepted("cookies_accepted", 49 JSON.stringify({ 50 "accepted" : "S", 51 "cookie_preferences" : $("#cookie_preferences").attr('data-prop') === "checked"?"S":"N", 52 "cookie_statistics" : $("#cookie_statistics").attr('data-prop') === "checked"?"S":"N", 53 "cookie_marketing" : $("#cookie_marketing").attr('data-prop') === "checked"?"S":"N" 54 } 55 ), 56 permanent, secure); 57 58 $("body").prepend("<div id='cookie-manager-scripts'></div>"); 59 //$("#cookie-manager-scripts").load("/comu/cookies.php", { "site": cookie_site, "idioma": cookie_idioma } ); 60 //Control checkboxs 61 62 63 destroyPopup(pop); 64 }); 65 66 $(document).on("click","#cookie_acceptar_tot",function(){ 67 68 69 estableixCookieAccepted("cookies_accepted", 70 JSON.stringify({ 71 "accepted" : "S", 72 "cookie_preferences" : "S", 73 "cookie_statistics" : "S", 74 "cookie_marketing" : "S" 75 } 76 ), 77 permanent, secure); 78 79 $("body").prepend("<div id='cookie-manager-scripts'></div>"); 80 //$("#cookie-manager-scripts").load("/comu/cookies.php", { "site": cookie_site, "idioma": cookie_idioma } ); 81 //Control checkboxs 82 83 84 destroyPopup(pop); 85 }); 86 87 $(document).on("click","#cookie_rebutjar_tot",function(){ 88 89 90 estableixCookieAccepted("cookies_accepted", 91 JSON.stringify({ 92 "accepted" : "S", 93 "cookie_preferences" : "N", 94 "cookie_statistics" : "N", 95 "cookie_marketing" : "N" 96 } 97 ), 98 permanent, secure); 99 100 $("body").prepend("<div id='cookie-manager-scripts'></div>"); 101 //$("#cookie-manager-scripts").load("/comu/cookies.php", { "site": cookie_site, "idioma": cookie_idioma } ); 102 //Control checkboxs 103 104 destroyPopup(pop); 105 }); 106} 107 108function destroyPopup($cpopup){ 109 $(".d2w-popup-background").remove(); 110 $cpopup.remove(); 111 $("body").css("overflow","auto"); 112}
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.