includes/clientside/tinymce/themes/advanced/js/color_picker.js
changeset 588 20484deb89cd
parent 543 dffcbfbc4e59
equal deleted inserted replaced
587:705ed7162315 588:20484deb89cd
   228 			finalB = dechex(b * finalCoef);
   228 			finalB = dechex(b * finalCoef);
   229 		}
   229 		}
   230 
   230 
   231 		color = finalR + finalG + finalB;
   231 		color = finalR + finalG + finalB;
   232 
   232 
   233 		document.getElementById('gs' + i).style.backgroundColor = '#'+color;
   233 		setCol('gs' + i, '#'+color);
   234 	}
   234 	}
   235 }
   235 }
   236 
   236 
   237 function changeFinalColor(color) {
   237 function changeFinalColor(color) {
   238 	if (color.indexOf('#') == -1)
   238 	if (color.indexOf('#') == -1)
   239 		color = convertRGBToHex(color);
   239 		color = convertRGBToHex(color);
   240 
   240 
   241 	document.getElementById('preview').style.backgroundColor = color;
   241 	setCol('preview', color);
   242 	document.getElementById('color').value = color;
   242 	document.getElementById('color').value = color;
   243 }
   243 }
   244 
   244 
       
   245 function setCol(e, c) {
       
   246 	try {
       
   247 		document.getElementById(e).style.backgroundColor = c;
       
   248 	} catch (ex) {
       
   249 		// Ignore IE warning
       
   250 	}
       
   251 }
       
   252 
   245 tinyMCEPopup.onInit.add(init);
   253 tinyMCEPopup.onInit.add(init);