mirror of
https://github.com/e107inc/e107.git
synced 2025-10-12 21:45:11 +02:00
More fixes and enhancements - bbcodes, tinymce, js
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1144,7 +1144,9 @@
|
||||
}
|
||||
|
||||
function getChildForDirection(parent, up) {
|
||||
return parent && parent[up ? 'lastChild' : 'firstChild'];
|
||||
var child = parent && parent[up ? 'lastChild' : 'firstChild'];
|
||||
// BR is not a valid table child to return in this case we return the table cell
|
||||
return child && child.nodeName === 'BR' ? ed.dom.getParent(child, 'td,th') : child;
|
||||
}
|
||||
|
||||
function moveCursorToStartOfElement(n) {
|
||||
|
@@ -137,7 +137,7 @@ function updateAction() {
|
||||
do {
|
||||
if (cell == tdElm)
|
||||
break;
|
||||
col += cell.getAttribute("colspan");
|
||||
col += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
|
||||
} while ((cell = nextCell(cell)) != null);
|
||||
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
@@ -152,7 +152,7 @@ function updateAction() {
|
||||
cell = updateCell(cell, true);
|
||||
break;
|
||||
}
|
||||
curr += cell.getAttribute("colspan");
|
||||
curr += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
|
||||
} while ((cell = nextCell(cell)) != null);
|
||||
}
|
||||
|
||||
|
@@ -242,13 +242,14 @@ 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) {
|
||||
dom.insertAfter(dom.create('p'), node);
|
||||
}
|
||||
}
|
||||
|
||||
var tdorth = dom.select('td,th', node);
|
||||
try {
|
||||
// IE9 might fail to do this selection
|
||||
inst.selection.setCursorLocation(tdorth[0], 0);
|
||||
|
Reference in New Issue
Block a user