From ceab24db2a7bf459684a650c287770b4ff090f54 Mon Sep 17 00:00:00 2001 From: brettp Date: Tue, 7 Jun 2011 22:46:47 +0000 Subject: Refs #3510, #9113. Updated tinyMCE version in trunk. git-svn-id: http://code.elgg.org/elgg/trunk@9140 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../jscripts/tiny_mce/plugins/table/js/cell.js | 20 ++++++------- .../jscripts/tiny_mce/plugins/table/js/row.js | 31 +++++++++----------- .../jscripts/tiny_mce/plugins/table/js/table.js | 33 +++++++++++----------- 3 files changed, 39 insertions(+), 45 deletions(-) (limited to 'mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js') diff --git a/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js b/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js index b5fc1fda3..45e6061fd 100644 --- a/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js +++ b/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js @@ -83,8 +83,6 @@ function updateAction() { return; } - ed.execCommand('mceBeginUndoLevel'); - switch (getSelectValue(formObj, 'action')) { case "cell": var celltype = getSelectValue(formObj, 'celltype'); @@ -166,15 +164,15 @@ function updateCell(td, skip_id) { var dom = ed.dom; if (!skip_id) - td.setAttribute('id', formObj.id.value); - - td.setAttribute('align', formObj.align.value); - td.setAttribute('vAlign', formObj.valign.value); - td.setAttribute('lang', formObj.lang.value); - td.setAttribute('dir', getSelectValue(formObj, 'dir')); - td.setAttribute('style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value))); - td.setAttribute('scope', formObj.scope.value); - ed.dom.setAttrib(td, 'class', getSelectValue(formObj, 'class')); + dom.setAttrib(td, 'id', formObj.id.value); + + dom.setAttrib(td, 'align', formObj.align.value); + dom.setAttrib(td, 'vAlign', formObj.valign.value); + dom.setAttrib(td, 'lang', formObj.lang.value); + dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir')); + dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value))); + dom.setAttrib(td, 'scope', formObj.scope.value); + dom.setAttrib(td, 'class', getSelectValue(formObj, 'class')); // Clear deprecated attributes ed.dom.setAttrib(td, 'width', ''); diff --git a/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/row.js b/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/row.js index 70d95b672..b275e6ea9 100644 --- a/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/row.js +++ b/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/row.js @@ -80,8 +80,6 @@ function updateAction() { return; } - inst.execCommand('mceBeginUndoLevel'); - switch (action) { case "row": updateRow(trElm); @@ -123,19 +121,19 @@ function updateRow(tr_elm, skip_id, skip_parent) { // Update row element if (!skip_id) - tr_elm.setAttribute('id', formObj.id.value); + dom.setAttrib(tr_elm, 'id', formObj.id.value); - tr_elm.setAttribute('align', getSelectValue(formObj, 'align')); - tr_elm.setAttribute('vAlign', getSelectValue(formObj, 'valign')); - tr_elm.setAttribute('lang', formObj.lang.value); - tr_elm.setAttribute('dir', getSelectValue(formObj, 'dir')); - tr_elm.setAttribute('style', dom.serializeStyle(dom.parseStyle(formObj.style.value))); + dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align')); + dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign')); + dom.setAttrib(tr_elm, 'lang', formObj.lang.value); + dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir')); + dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value))); dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class')); // Clear deprecated attributes - tr_elm.setAttribute('background', ''); - tr_elm.setAttribute('bgColor', ''); - tr_elm.setAttribute('height', ''); + dom.setAttrib(tr_elm, 'background', ''); + dom.setAttrib(tr_elm, 'bgColor', ''); + dom.setAttrib(tr_elm, 'height', ''); // Set styles tr_elm.style.height = getCSSSize(formObj.height.value); @@ -163,13 +161,10 @@ function updateRow(tr_elm, skip_id, skip_parent) { if (newParent == null) { newParent = doc.createElement(dest); - if (dest == "thead") { - if (theTable.firstChild.nodeName == 'CAPTION') - inst.dom.insertAfter(newParent, theTable.firstChild); - else - theTable.insertBefore(newParent, theTable.firstChild); - } else - theTable.appendChild(newParent); + if (theTable.firstChild.nodeName == 'CAPTION') + inst.dom.insertAfter(newParent, theTable.firstChild); + else + theTable.insertBefore(newParent, theTable.firstChild); } // append the row to the new parent diff --git a/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/table.js b/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/table.js index 36ef6871f..520d857fc 100644 --- a/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/table.js +++ b/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/table.js @@ -12,7 +12,7 @@ function insertTable() { tinyMCEPopup.restoreSelection(); if (!AutoValidator.validate(formObj)) { - tinyMCEPopup.alert(inst.getLang('invalid_data')); + tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); return false; } @@ -21,7 +21,7 @@ function insertTable() { // Get form data cols = formObj.elements['cols'].value; rows = formObj.elements['rows'].value; - border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0; + border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0; cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : ""; cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : ""; align = getSelectValue(formObj, "align"); @@ -58,8 +58,6 @@ function insertTable() { // Update table if (action == "update") { - inst.execCommand('mceBeginUndoLevel'); - dom.setAttrib(elm, 'cellPadding', cellpadding, true); dom.setAttrib(elm, 'cellSpacing', cellspacing, true); dom.setAttrib(elm, 'border', border); @@ -82,7 +80,7 @@ function insertTable() { capEl = elm.ownerDocument.createElement('caption'); if (!tinymce.isIE) - capEl.innerHTML = '
'; + capEl.innerHTML = '
'; elm.insertBefore(capEl, elm.firstChild); } @@ -151,7 +149,7 @@ function insertTable() { html += makeAttrib('border', border); html += makeAttrib('cellpadding', cellpadding); html += makeAttrib('cellspacing', cellspacing); - html += makeAttrib('_mce_new', '1'); + html += makeAttrib('data-mce-new', '1'); if (width && inst.settings.inline_styles) { if (style) @@ -187,7 +185,7 @@ function insertTable() { if (caption) { if (!tinymce.isIE) - html += '
'; + html += '
'; else html += ''; } @@ -197,7 +195,7 @@ function insertTable() { for (var x=0; x 0; orgTableWidth = width; -- cgit v1.2.3