X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/177fd6fefd2e3d5a0ea6591c71d660cabdb3c1a4..refs/tags/wordpress-2.9:/wp-includes/js/tinymce/themes/advanced/js/color_picker.js?ver=327-1235 diff --git a/wp-includes/js/tinymce/themes/advanced/js/color_picker.js b/wp-includes/js/tinymce/themes/advanced/js/color_picker.js index db5ac254..c1a65db2 100644 --- a/wp-includes/js/tinymce/themes/advanced/js/color_picker.js +++ b/wp-includes/js/tinymce/themes/advanced/js/color_picker.js @@ -230,7 +230,7 @@ function updateLight(r, g, b) { color = finalR + finalG + finalB; - document.getElementById('gs' + i).style.backgroundColor = '#'+color; + setCol('gs' + i, '#'+color); } } @@ -238,8 +238,16 @@ function changeFinalColor(color) { if (color.indexOf('#') == -1) color = convertRGBToHex(color); - document.getElementById('preview').style.backgroundColor = color; + setCol('preview', color); document.getElementById('color').value = color; } +function setCol(e, c) { + try { + document.getElementById(e).style.backgroundColor = c; + } catch (ex) { + // Ignore IE warning + } +} + tinyMCEPopup.onInit.add(init);