|
|
@ -7,13 +7,6 @@ var ListeClassForme = ["rond","carre","triangle","croix","losange","penta","hexa
|
|
|
|
var mode = 0;
|
|
|
|
var mode = 0;
|
|
|
|
var valRange;
|
|
|
|
var valRange;
|
|
|
|
|
|
|
|
|
|
|
|
function settingOpen(){
|
|
|
|
|
|
|
|
var elements = document.getElementsByClassName("pcr-button");
|
|
|
|
|
|
|
|
for (var i = 0; i < elements.length; i++) {
|
|
|
|
|
|
|
|
elements[i].classList.add(ListeClassForme[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function ableCache(formName){
|
|
|
|
function ableCache(formName){
|
|
|
|
cacheName = "cache"+formName;
|
|
|
|
cacheName = "cache"+formName;
|
|
|
|
const pos = FormeSelect.indexOf(formName);
|
|
|
|
const pos = FormeSelect.indexOf(formName);
|
|
|
@ -66,3 +59,45 @@ function varColorToHex(color){
|
|
|
|
hex = hex.substring(1,hex.length);
|
|
|
|
hex = hex.substring(1,hex.length);
|
|
|
|
return hex;
|
|
|
|
return hex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function settingOpen(){
|
|
|
|
|
|
|
|
var elements = document.getElementsByClassName("pcr-button");
|
|
|
|
|
|
|
|
for (var i = 0; i < elements.length; i++) {
|
|
|
|
|
|
|
|
elements[i].classList.add(ListeClassForme[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
recupCookies();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function SettingClose(){
|
|
|
|
|
|
|
|
//save cookies
|
|
|
|
|
|
|
|
document.cookie = "forme1="+FormeSelect[1]+";secure";
|
|
|
|
|
|
|
|
document.cookie = "forme2="+FormeSelect[2]+";secure";
|
|
|
|
|
|
|
|
document.cookie = "forme3="+FormeSelect[3]+";secure";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function recupCookies(){
|
|
|
|
|
|
|
|
var theCookies = document.cookie.split(';');
|
|
|
|
|
|
|
|
theCookies[0] = ' '+theCookies[0];
|
|
|
|
|
|
|
|
var FormeCookie = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(var i = 1; i <= theCookies.length; i++){
|
|
|
|
|
|
|
|
var aString = theCookies[i-1].substring(8);
|
|
|
|
|
|
|
|
if(aString != "undefined"){
|
|
|
|
|
|
|
|
FormeCookie.push(aString);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(const form in FormeCookie)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if(FormeSelect.indexOf(FormeCookie[form]) < 0){
|
|
|
|
|
|
|
|
disableCache(FormeCookie[form]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(FormeCookie);
|
|
|
|
|
|
|
|
console.log("Formes select : "+FormeSelect);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|