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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| var colorPickerNamespace = {
cp:null,
already_open:false,
createColorPicker:function (){
if(this.cp) return;
var imgBase = 'creating/';
//On crée la fenêtre contenant le sélecteur de couleur
var CE1=null;
CE1=document.createElement("div");
CE1.setAttribute("id","ColorPicker");
CE1.setAttribute("position", "absolute");
CE1.setAttribute("z-index","10");
CE1.setAttribute("fontFamily","tahoma, verdana, sans-serif");
CE1.setAttribute("font-size","10px");
CE1.setAttribute("border", "1px solid #000");
CE1.setAttribute("width", "397px");
CE1.setAttribute("height", "305px");
CE1.setAttribute("backgroundColor","#E0DFE3");
document.getElementById("actbtn_color").insertBefore(CE1);
//On crée le titre
var CE2=document.createElement("div");
CE2.setAttribute("id","TitleColorPicker");
CE2.setAttribute("top", "3px");
CE2.setAttribute("left","8px");
CE2.setAttribute("position", "absolute");
CE2.setAttribute("z-index","11");
document.getElementById("ColorPicker").insertBefore(CE2);
var txt=document.createTextNode("Select color :");
document.getElementById("TitleColorPicker").appendChild(txt);
},
attachColorPicker:function(input, cmd)
{
if(!this.already_open)
{
this.createColorPicker();
}
}
} |
Partager