]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/themes/advanced/js/color_picker.js
Wordpress 2.6.2
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / themes / advanced / js / color_picker.js
index db5ac254417e4768aecb5acebc0ef27b3891404c..c1a65db2c47f05fe0c55da17e0c098b53fd08c69 100644 (file)
@@ -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);