diff --git a/plugins/CookieNoticePro/cookienoticepro.script.js b/plugins/CookieNoticePro/cookienoticepro.script.js index a1b99f6..0e11dc6 100644 --- a/plugins/CookieNoticePro/cookienoticepro.script.js +++ b/plugins/CookieNoticePro/cookienoticepro.script.js @@ -50,7 +50,8 @@ Make your own cookie information popup in minutes. title: "Cenimy prywatność użytkowników", // Title of popup bannner description: "Używamy plików cookie, aby poprawić jakość przeglądania, wyświetlać reklamy lub treści dostosowane do indywidualnych potrzeb użytkowników oraz analizować ruch na stronie. Kliknięcie przycisku „Akceptuj wszystkie” oznacza zgodę na wykorzystywanie przez nas plików cookie.", // Message acceptBtnLabel: "Akceptuj", // Accept cookie button text - declineInfoBtnLabel: "Odrzuć", // Decline cookie button text + declineInfoBtnLabel: "Dostosuj", // Decline cookie button text + acceptBtnSettingsLabel: "Zatwierdź", moreInfoBtnLink: "", // Learn more link(default: privacy policy page) moreInfoBtnLabel: "", // More info link text cookieTypesTitle: "Wybierz pliki cookies do akceptacji", // Title of cookie preference options @@ -121,7 +122,7 @@ Make your own cookie information popup in minutes. } }); - let cookieNotice='
'+ closeIcon +'
'+cookieIcon+"

"+config.title+'

'+config.description+' '+config.moreInfoBtnLabel+'

'+settingsIcon+config.settingsBtnLabel+'
"; + let cookieNotice='
'+ closeIcon +'
'+cookieIcon+"

"+config.title+'

'+config.description+' '+config.moreInfoBtnLabel+'

'+settingsIcon+config.settingsBtnLabel+'
"; setTimeout(() => { @@ -137,9 +138,9 @@ Make your own cookie information popup in minutes. if(!config.showSettingsBtn) { $("#cookieNoticePro #cookieSettings").hide(); } - if(!config.showDeclineBtn) { - $("#cookieNoticePro #cookieReject").hide(); - } + // if(!config.showDeclineBtn) { + // $("#cookieNoticePro #cookieReject").hide(); + // } if(!config.showCookieIcon) { $("#cookieNoticePro #cookieIcon").hide(); } @@ -164,32 +165,40 @@ Make your own cookie information popup in minutes. googleConsentModeHandler(); } }); - $("body").on("click", "#cookieSettings", () => { + $("body").on("click", "#cookieSettings, #cookieReject", () => { if(event === "open"){ $('input[name="gdprPrefItem"]:not(:disabled)').attr("data-compulsory", "off").prop("checked", false); $("#cookieTypes").slideDown("fast", function () { - $("#cookieSettings").prop("disabled", true); + $("#cookieSettings").prop("disabled", true); }); } else { $('input[name="gdprPrefItem"]:not(:disabled)').attr("data-compulsory", "off").prop("checked", config.allCheckboxesChecked); $("#cookieTypes").toggle("fast", function () { - $("#cookieSettings").prop("disabled", false); + $("#cookieSettings").prop("disabled", false); + + if ($("#cookieTypes").is(":visible")) { + $("#cookieAccept .acceptBtnLabel").hide(); + $(".acceptBtnSettingsLabel").show(); + } else { + $("#cookieAccept .acceptBtnLabel").show(); + $("#cookieAccept .acceptBtnSettingsLabel").hide(); + } }); } }); $("body").on("click", "#closeIcon", () => { $("#cookieNoticePro").remove(); }); - $("body").on("click", "#cookieReject", () => { - hideCookieBanner(false, config.expires); - config.onConsentReject.call(this); + // $("body").on("click", "#cookieReject", () => { + // hideCookieBanner(false, config.expires); + // config.onConsentReject.call(this); - // Delete prefs cookie from brower on reject - createCookie(COOKIE_CONSENT_PREFS, "", { - expires: daysToUTC(-365), - path: "/" - }); - }); + // // Delete prefs cookie from brower on reject + // createCookie(COOKIE_CONSENT_PREFS, "", { + // expires: daysToUTC(-365), + // path: "/" + // }); + // }); } // If already consent is accepted, inject preferences else { @@ -230,7 +239,7 @@ Make your own cookie information popup in minutes. }); $("#cookieNoticePro").fadeOut("fast", () => { $('body').off('click', "#cookieSettings"); - $('body').off('click', "#cookieReject"); + // $('body').off('click', "#cookieReject"); $('body').off('click', "#closeIcon"); $('body').off('click', "#cookieAccept"); $(this).remove(); diff --git a/plugins/CookieNoticePro/cookienoticepro.style.css b/plugins/CookieNoticePro/cookienoticepro.style.css index b49962c..e73c07f 100644 --- a/plugins/CookieNoticePro/cookienoticepro.style.css +++ b/plugins/CookieNoticePro/cookienoticepro.style.css @@ -116,6 +116,11 @@ Make your own cookie information popup in minutes. } } + +#cookieNoticePro button#cookieAccept .acceptBtnSettingsLabel{ + display: none; +} + #cookieNoticePro.dark { background-color: #393d4d; background-color: var(--cookieNoticeProDark);