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/editor_template_src.js |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/program/js/tiny_mce/themes/advanced/editor_template_src.js b/program/js/tiny_mce/themes/advanced/editor_template_src.js
index 381ba6b..757b633 100644
--- a/program/js/tiny_mce/themes/advanced/editor_template_src.js
+++ b/program/js/tiny_mce/themes/advanced/editor_template_src.js
@@ -1,5 +1,5 @@
 /**
- * $Id: editor_template_src.js 766 2008-04-03 20:37:06Z spocke $
+ * $Id: editor_template_src.js 852 2008-05-27 05:52:09Z spocke $
  *
  * @author Moxiecode
  * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
@@ -158,7 +158,7 @@
 			return false;
 		},
 
-		_importClasses : function() {
+		_importClasses : function(e) {
 			var ed = this.editor, c = ed.controlManager.get('styleselect');
 
 			if (c.getLength() == 0) {
@@ -188,8 +188,8 @@
 				});
 
 				c.onPostRender.add(function(ed, n) {
-					Event.add(n, 'focus', t._importClasses, t);
-					Event.add(n, 'mousedown', t._importClasses, t);
+					Event.add(n.id + '_text', 'focus', t._importClasses, t);
+					Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
 				});
 			}
 
@@ -210,7 +210,7 @@
 		},
 
 		_createFontSizeSelect : function() {
-			var c, t = this, lo = [
+			var t = this, ed = t.editor, c, lo = [
 				"1 (8 pt)",
 				"2 (10 pt)",
 				"3 (12 pt)",
@@ -220,10 +220,10 @@
 				"7 (36 pt)"
 			], fz = [8, 10, 12, 14, 18, 24, 36];
 
-			c = t.editor.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', cmd : 'FontSize'});
+			c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', cmd : 'FontSize'});
 			if (c) {
-				each(explode(t.settings.theme_advanced_font_sizes), function(v) {
-					c.add(lo[parseInt(v) - 1], v, {'style' : 'font-size:' + fz[v - 1] + 'pt', 'class' : 'mceFontSize' + v});
+				each(ed.getParam('theme_advanced_font_sizes', t.settings.theme_advanced_font_sizes, 'hash'), function(v, k) {
+					c.add(k != v ? k : lo[parseInt(v) - 1], v, {'style' : 'font-size:' + fz[v - 1] + 'pt', 'class' : 'mceFontSize' + v});
 				});
 			}
 
@@ -519,7 +519,7 @@
 			each(explode(s.theme_advanced_containers || ''), function(c, i) {
 				var v = s['theme_advanced_container_' + c] || '';
 
-				switch (c.toLowerCase()) {
+				switch (v.toLowerCase()) {
 					case 'mceeditor':
 						n = DOM.add(tb, 'tr');
 						n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
@@ -530,7 +530,7 @@
 						break;
 
 					default:
-						a = s['theme_advanced_container_' + c + '_align'].toLowerCase();
+						a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
 						a = 'mce' + t._ufirst(a);
 
 						n = DOM.add(DOM.add(tb, 'tr'), 'td', {
@@ -797,7 +797,7 @@
 				c.select(ed.queryCommandValue('FontName'));
 
 			if (c = cm.get('fontsizeselect'))
-				c.select(ed.queryCommandValue('FontSize'));
+				c.select('' + ed.queryCommandValue('FontSize'));
 
 			if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
 				p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
@@ -1023,7 +1023,9 @@
 			var t = this;
 
 			this._mceColorPicker(0, {
+				color: t.fgColor,
 				func : function(co) {
+					t.fgColor = co;
 					t.editor.execCommand('ForeColor', false, co);
 				}
 			});
@@ -1033,7 +1035,9 @@
 			var t = this;
 
 			this._mceColorPicker(0, {
+				color: t.bgColor,
 				func : function(co) {
+					t.bgColor = co;
 					t.editor.execCommand('HiliteColor', false, co);
 				}
 			});

--
Gitblit v1.9.1