aboutsummaryrefslogtreecommitdiff
path: root/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-10-04 20:59:33 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-10-04 20:59:33 -0700
commit2be122cb5032567e88bb926b8aac250fd488cf68 (patch)
treed8900899a18f29d39c39380bec119823f38f34e5 /mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js
parent34a7e57ef205362d6c093fa7234ca38977560bea (diff)
downloadelgg-2be122cb5032567e88bb926b8aac250fd488cf68.tar.gz
elgg-2be122cb5032567e88bb926b8aac250fd488cf68.tar.bz2
Refs #3853. Upgraded TinyMCE to 3.4.6. Embed still inserts the content in the wrong place for IE 8.
Diffstat (limited to 'mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js')
-rw-r--r--mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js35
-rw-r--r--mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/table/js/row.js5
2 files changed, 40 insertions, 0 deletions
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 45e6061fd..d6f329059 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
@@ -63,6 +63,11 @@ function init() {
function updateAction() {
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
+ if (!AutoValidator.validate(formObj)) {
+ tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
+ return false;
+ }
+
tinyMCEPopup.restoreSelection();
el = ed.selection.getStart();
tdElm = ed.dom.getParent(el, "td,th");
@@ -123,6 +128,36 @@ function updateAction() {
break;
+ case "col":
+ var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr");
+
+ if (cell.nodeName != "TD" && cell.nodeName != "TH")
+ cell = nextCell(cell);
+
+ do {
+ if (cell == tdElm)
+ break;
+ col += cell.getAttribute("colspan");
+ } while ((cell = nextCell(cell)) != null);
+
+ for (var i=0; i<rows.length; i++) {
+ cell = rows[i].firstChild;
+
+ if (cell.nodeName != "TD" && cell.nodeName != "TH")
+ cell = nextCell(cell);
+
+ curr = 0;
+ do {
+ if (curr == col) {
+ cell = updateCell(cell, true);
+ break;
+ }
+ curr += cell.getAttribute("colspan");
+ } while ((cell = nextCell(cell)) != null);
+ }
+
+ break;
+
case "all":
var rows = tableElm.getElementsByTagName("tr");
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 b275e6ea9..a13d69592 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
@@ -56,6 +56,11 @@ function updateAction() {
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
var action = getSelectValue(formObj, 'action');
+ if (!AutoValidator.validate(formObj)) {
+ tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
+ return false;
+ }
+
tinyMCEPopup.restoreSelection();
trElm = dom.getParent(inst.selection.getStart(), "tr");
tableElm = dom.getParent(inst.selection.getStart(), "table");