r1329 - branches/bxe_2_0/js
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Fri Jun 3 13:32:51 2005
New Revision: 1329
Modified:
branches/bxe_2_0/js/table.js
Log:
fix some problems with split/merge (MFH)
Modified: branches/bxe_2_0/js/table.js
==============================================================================
--- branches/bxe_2_0/js/table.js (original)
+++ branches/bxe_2_0/js/table.js Fri Jun 3 13:32:51 2005
@@ -45,7 +45,7 @@
var prevSibling = this.previousSibling;
var pos = 1;
while(prevSibling) {
- if (prevSibling.nodeType == 1 && (prevSibling.localName.toLowerCase() == "td" || cell.localName.toLowerCase() == "th")) {
+ if (prevSibling.nodeType == 1 && (prevSibling.localName == "td" || cell.localName == "th")) {
var _attr = prevSibling.getAttribute("colspan");
if (_attr > 0) {
pos += parseInt( _attr);
@@ -175,19 +175,24 @@
first.removeAttribute("rowspan");
}
-
- var nextSibling = first.nextSibling;
+ if (first.nextSibling) {
+ var nextSibling = first.nextSibling;
+ }
while (nextSibling && nextSibling.nodeType != 1) {
nextSibling = nextSibling.nextSibling;
}
if (nextSibling) {
nextSibling.removeAttribute("rowspan");
}
-
- cell = matrix[rowPos + rowspan - 1][colPos + 1][1];
+ var cell = matrix[rowPos + rowspan - 1][colPos + 1];
+ if (cell) {
+ cell = cell[1];
+ }
if (cell) {
cell.parentNode.insertBefore(nextSibling,cell);
} else {
+ //get next tr from first td cell of next row
+ var nexttr = matrix[rowPos + rowspan - 1][1][1].parentNode;
nexttr.appendChild(nextSibling);
}
return first.parentNode.parentNode;
--
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs