1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| ///////////////////////////////////////////////////////////////// CREATION DE LA PALETTE COULEUR
var pal=document.createElement("DIV");pal.className="palettecouleur";pal.style.zIndex="1";pal.id="palette";pal.style.visibility="hidden";
var btsupf=document.createElement("BUTTON");btsupf.innerText="supprimer la couleur";btsupf.className="rad";btsupf.style.width="100%";
btsupf.style.height="30px";
btsupf.addEventListener("click",function() {this.parentElement.style.visibility="hidden"; retirshadowcolor();});
pal.appendChild(btsupf);
for (var c = 0; c < coul.length;c++) {
var bc=document.createElement("BUTTON");bc.id=coul[c];bc.classname="boutpalette";bc.style.backgroundColor="#"+bc.id;bc.style.height="15px";bc.style.width="14px";
bc.style.border=0;bc.style.margin="2px";
bc.addEventListener("click",function() {this.parentElement.style.visibility="hidden";
ShowStoredSelections();// je resectionne ICI!!!!!!
if(modepal == "forecolor"){execom("forecolor",false,this.style.backgroundColor); }
if(modepal == "backcolor"){execom("backcolor",false,this.style.backgroundColor); }
if(modepal == "shadowcolor"){shadowcolor(this.style.backgroundColor); }
});
pal.appendChild(bc);
}/// fin du for c
var btsupf=document.createElement("BUTTON");btsupf.innerText="fermer la palette";btsupf.className="rad";btsupf.style.width="100%";
btsupf.style.height="30px";
btsupf.addEventListener("click",function() {this.parentElement.style.visibility="hidden";});
pal.appendChild(btsupf);
//pal.addEventListener("mouseout",inOUT,false);
document.getElementById("forecolor").parentElement.appendChild(pal)
/////////////////////////////////////////////////FIN DE CREATION DE LA PALETTE COULEUR |
Partager