Commit 4b72eedb authored by rg's avatar rg

Ajout d'un bouton de validation.

parent 3bdf27ce
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* 'choice': 'Choisir mes cookies', * 'choice': 'Choisir mes cookies',
* 'acceptAll': 'Autoriser tous les cookies', * 'acceptAll': 'Autoriser tous les cookies',
* 'denyAll': 'Interdire tous les cookies', * 'denyAll': 'Interdire tous les cookies',
* 'validate': 'Valider mes choix',
* 'accept': 'Autoriser', * 'accept': 'Autoriser',
* 'deny': 'Interdire', * 'deny': 'Interdire',
* 'close': 'Fermer' * 'close': 'Fermer'
...@@ -109,6 +110,7 @@ ...@@ -109,6 +110,7 @@
'choice': 'Choisir mes cookies', 'choice': 'Choisir mes cookies',
'acceptAll': 'Autoriser tous les cookies', 'acceptAll': 'Autoriser tous les cookies',
'denyAll': 'Interdire tous les cookies', 'denyAll': 'Interdire tous les cookies',
'validate': 'Valider mes choix',
'accept': 'Autoriser', 'accept': 'Autoriser',
'deny': 'Interdire', 'deny': 'Interdire',
'close': 'Fermer' 'close': 'Fermer'
...@@ -257,9 +259,6 @@ ...@@ -257,9 +259,6 @@
case "ok": case "ok":
$('<button>'+locale.ok+'</button>').appendTo(txt).click(function() { $('<button>'+locale.ok+'</button>').appendTo(txt).click(function() {
div.slideUp(); div.slideUp();
//consentOptions.forEach(function(e) {
// e.value=true;
//});
saveCookieConsent(cookieName,consentOptions); saveCookieConsent(cookieName,consentOptions);
runCallbacks(consentOptions); runCallbacks(consentOptions);
}); });
...@@ -296,6 +295,11 @@ ...@@ -296,6 +295,11 @@
buttonAcceptAll.removeClass('selected'); buttonAcceptAll.removeClass('selected');
saveConsent(null,false); saveConsent(null,false);
}).appendTo(row); }).appendTo(row);
var buttonValidateAll=$(document.createElement("button")).addClass('validate').html(locale.validate).click(function() {
div.slideUp();
saveCookieConsent(cookieName,consentOptions);
runCallbacks(consentOptions);
}).appendTo(row);
var buttonClose=$(document.createElement("button")).addClass('action-close').html(locale.close).click(function() { var buttonClose=$(document.createElement("button")).addClass('action-close').html(locale.close).click(function() {
//saveCookieConsent(cookieName,consentOptions); //saveCookieConsent(cookieName,consentOptions);
doc.slideUp(); doc.slideUp();
......
.rgpwhat {background-color: rgba(33,33,33,0.9); color: white; text-align: center; line-height: 2.5em; padding: 2px; vertical-align: middle; position: relative; top: 0;} .rgpwhat {background-color: rgba(33,33,33,0.9); color: white; text-align: center; line-height: 2.5em; padding: 2px; vertical-align: middle; position: relative; top: 0;}
.rgpwhat a {color: #5Aa0f2;} .rgpwhat a {color: #5Aa0f2;}
.rgpwhat button {line-height: 2.2em; margin-top: 2px; opacity: .9; color: white; background-color: #1BD2A4; border-radius: 5px; border: 0; padding: 0 20px; margin-left: 10px; opacity: 1; font-weight: bold;} .rgpwhat button {line-height: 2.2em; margin-top: 2px; opacity: .9; color: white; background-color: #1BD2A4; border-radius: 5px; border: 0; padding: 0 20px; margin-left: 10px; opacity: 1; font-weight: bold;}
.rgpwhat button:hover {opacity: 1;} .rgpwhat button:hover {opacity: .7;}
.rgpwhat .consent-list {background-color: #111; padding: 1em; width: 100%;} .rgpwhat .consent-list {background-color: #111; padding: 1em; width: 100%;}
.rgpwhat .consent-list button {background-color: #500; margin-left: 10px;} .rgpwhat .consent-list button {background-color: #500; margin-left: 10px;}
.rgpwhat .consent-list button.selected {background-color: #1BD2A4;} .rgpwhat .consent-list button.selected {background-color: #1BD2A4;}
.rgpwhat .consent-list .all-cookies-choice {width: 50%; margin: auto; display: inline-block;} .rgpwhat .consent-list .all-cookies-choice {width: 50%; margin: auto; display: inline-block;}
.rgpwhat .consent-list .all-cookies-choice .action-close {border-radius: 20px; line-height: .5em; padding: .5em; float: right; background-color: #555; color: white;} .rgpwhat .consent-list .all-cookies-choice .action-close {border-radius: 20px; line-height: .5em; padding: .5em; float: right; background-color: #555; color: white;}
.rgpwhat .consent-list .all-cookies-choice .action-close:hover {opacity: .5;} .rgpwhat .consent-list .all-cookies-choice .action-close:hover {opacity: .5;}
.rgpwhat .consent-list .all-cookies-choice .validate {background-color: #1BD2A4;}
.rgpwhat .consent-list .cookie-choice {width: 50%; margin: auto; display: flex; flex-direction: row; align-items: center; border-bottom: 1px solid grey;} .rgpwhat .consent-list .cookie-choice {width: 50%; margin: auto; display: flex; flex-direction: row; align-items: center; border-bottom: 1px solid grey;}
.rgpwhat .consent-list .cookie-choice .explanations {text-align: left; flex: 2;} .rgpwhat .consent-list .cookie-choice .explanations {text-align: left; flex: 2;}
.rgpwhat .consent-list .cookie-choice .explanations .title {font-size: 1.5em; font-weight: bold;} .rgpwhat .consent-list .cookie-choice .explanations .title {font-size: 1.5em; font-weight: bold;}
.rgpwhat .consent-list .cookie-choice .explanations .description {line-height: 1em;} .rgpwhat .consent-list .cookie-choice .explanations .description {line-height: 1em;}
.rgpwhat .consent-list .cookie-choice .buttons {flex: 1; text-align: right;} .rgpwhat .consent-list .cookie-choice .buttons {flex: 1; text-align: right;}
.rgpwhat .consent-list .cookie-choice .buttons .accept, .rgpwhat .consent-list .cookie-choice .buttons .deny {color: white;} .rgpwhat .consent-list .cookie-choice .buttons .accept, .rgpwhat .consent-list .cookie-choice .buttons .deny {color: white;}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment