TinyMCE 3.5.8 update; some fixes

This commit is contained in:
Zach Prezkuta 2013-01-27 14:26:43 -07:00
parent c9cce9873d
commit d39a2e8a9d
48 changed files with 2213 additions and 2054 deletions

View file

@ -25,6 +25,7 @@ function init() {
var dir = dom.getAttrib(trElm, 'dir');
selectByValue(formObj, 'rowtype', rowtype);
setActionforRowType(formObj, rowtype);
// Any cells selected
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
@ -234,4 +235,20 @@ function changedColor() {
formObj.style.value = dom.serializeStyle(st);
}
function changedRowType() {
var formObj = document.forms[0];
var rowtype = getSelectValue(formObj, 'rowtype');
setActionforRowType(formObj, rowtype);
}
function setActionforRowType(formObj, rowtype) {
if (rowtype === "tbody") {
formObj.action.disabled = false;
} else {
selectByValue(formObj, 'action', "row");
formObj.action.disabled = true;
}
}
tinyMCEPopup.onInit.add(init);

View file

@ -247,7 +247,10 @@ function insertTable() {
// Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
if (tinymce.isIE && node.nextSibling == null) {
dom.insertAfter(dom.create('p'), node);
if (inst.settings.forced_root_block)
dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
else
dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
}
try {
@ -304,6 +307,15 @@ function init() {
var formObj = document.forms[0];
var elm = dom.getParent(inst.selection.getNode(), "table");
// Hide advanced fields that isn't available in the schema
tinymce.each("summary id rules dir style frame".split(" "), function(name) {
var tr = tinyMCEPopup.dom.getParent(name, "tr") || tinyMCEPopup.dom.getParent("t" + name, "tr");
if (tr && !tinyMCEPopup.editor.schema.isValid("table", name)) {
tr.style.display = 'none';
}
});
action = tinyMCEPopup.getWindowArg('action');
if (!action)