includes/clientside/tinymce/plugins/table/js/cell.js
changeset 543 dffcbfbc4e59
parent 459 31c23016ab62
child 778 57ce13805b6f
--- a/includes/clientside/tinymce/plugins/table/js/cell.js	Mon May 05 20:06:37 2008 -0400
+++ b/includes/clientside/tinymce/plugins/table/js/cell.js	Mon May 05 20:08:44 2008 -0400
@@ -32,6 +32,8 @@
 
 	// Setup form
 	addClassesToList('class', 'table_cell_styles');
+	TinyMCE_EditableSelects.init();
+
 	formObj.bordercolor.value = bordercolor;
 	formObj.bgcolor.value = bgcolor;
 	formObj.backgroundimage.value = backgroundimage;
@@ -42,7 +44,7 @@
 	formObj.style.value = ed.dom.serializeStyle(st);
 	selectByValue(formObj, 'align', align);
 	selectByValue(formObj, 'valign', valign);
-	selectByValue(formObj, 'class', className);
+	selectByValue(formObj, 'class', className, true, true);
 	selectByValue(formObj, 'celltype', celltype);
 	selectByValue(formObj, 'dir', dir);
 	selectByValue(formObj, 'scope', scope);
@@ -56,12 +58,13 @@
 }
 
 function updateAction() {
-	var el = ed.selection.getNode();
-	var inst = ed;
-	var tdElm = ed.dom.getParent(el, "td,th");
-	var trElm = ed.dom.getParent(el, "tr");
-	var tableElm = ed.dom.getParent(el, "table");
-	var formObj = document.forms[0];
+	var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
+
+	tinyMCEPopup.restoreSelection();
+	el = ed.selection.getNode();
+	tdElm = ed.dom.getParent(el, "td,th");
+	trElm = ed.dom.getParent(el, "tr");
+	tableElm = ed.dom.getParent(el, "table");
 
 	ed.execCommand('mceBeginUndoLevel');