From 18240a9201d193a5a2420f8644fa05b7bfbceeec Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 18 Jul 2008 10:59:01 -0400
Subject: [PATCH] - Updated TinyMCE to version 3.1.0.1

---
 program/js/tiny_mce/themes/advanced/js/color_picker.js |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/program/js/tiny_mce/themes/advanced/js/color_picker.js b/program/js/tiny_mce/themes/advanced/js/color_picker.js
index da833dc..fd9700f 100644
--- a/program/js/tiny_mce/themes/advanced/js/color_picker.js
+++ b/program/js/tiny_mce/themes/advanced/js/color_picker.js
@@ -230,7 +230,7 @@
 
 		color = finalR + finalG + finalB;
 
-		document.getElementById('gs' + i).style.backgroundColor = '#'+color;
+		setCol('gs' + i, '#'+color);
 	}
 }
 
@@ -238,8 +238,16 @@
 	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);

--
Gitblit v1.9.1