summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/plugins/table/js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/tiny_mce/plugins/table/js')
-rw-r--r--program/js/tiny_mce/plugins/table/js/row.js17
-rw-r--r--program/js/tiny_mce/plugins/table/js/table.js14
2 files changed, 24 insertions, 7 deletions
diff --git a/program/js/tiny_mce/plugins/table/js/row.js b/program/js/tiny_mce/plugins/table/js/row.js
index a13d69592..0c678de46 100644
--- a/program/js/tiny_mce/plugins/table/js/row.js
+++ b/program/js/tiny_mce/plugins/table/js/row.js
@@ -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);
diff --git a/program/js/tiny_mce/plugins/table/js/table.js b/program/js/tiny_mce/plugins/table/js/table.js
index 1db243b63..f427f5f87 100644
--- a/program/js/tiny_mce/plugins/table/js/table.js
+++ b/program/js/tiny_mce/plugins/table/js/table.js
@@ -91,7 +91,7 @@ function insertTable() {
if (!capEl && caption) {
capEl = elm.ownerDocument.createElement('caption');
- if (!tinymce.isIE)
+ if (!tinymce.isIE || tinymce.isIE11)
capEl.innerHTML = '<br data-mce-bogus="1"/>';
elm.insertBefore(capEl, elm.firstChild);
@@ -199,7 +199,7 @@ function insertTable() {
html += '>';
if (caption) {
- if (!tinymce.isIE)
+ if (!tinymce.isIE || tinymce.isIE11)
html += '<caption><br data-mce-bogus="1"/></caption>';
else
html += '<caption></caption>';
@@ -209,7 +209,7 @@ function insertTable() {
html += "<tr>";
for (var x=0; x<cols; x++) {
- if (!tinymce.isIE)
+ if (!tinymce.isIE || tinymce.isIE11)
html += '<td><br data-mce-bogus="1"/></td>';
else
html += '<td></td>';
@@ -242,16 +242,16 @@ function insertTable() {
} else
inst.execCommand('mceInsertContent', false, html);
- tinymce.each(dom.select('table[data-mce-new]'), function(node) {
+ tinymce.each(dom.select('table[data-mce-new]'), function(node) {
var tdorth = dom.select('td,th', node);
-
+
// 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) {
+ if (tinymce.isIE && !tinymce.isIE11 && node.nextSibling == null) {
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 {
// IE9 might fail to do this selection