r1816 - branches/bxe_2_0/js

[email protected] Thu, 6 Dec 2007 08:37:18 +0100 (CET)
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Thu Dec  6 08:37:17 2007
New Revision: 1816

Log:
fix for BXEB-60
Merge bei rows


Modified:
   branches/bxe_2_0/js/table.js

Modified: branches/bxe_2_0/js/table.js
==============================================================================
--- branches/bxe_2_0/js/table.js	(original)
+++ branches/bxe_2_0/js/table.js	Thu Dec  6 08:37:17 2007
@@ -172,7 +172,24 @@
 		child = nextchild;
 	}
 	this.normalize();
-	downCol.parentNode.removeChild(downCol);
+	var downPar = downCol.parentNode;
+	downPar.removeChild(downCol);
+	// if row below does not have any children anymore, delete it
+	// fix for BXEB-60
+	if (downPar.XMLNode.isWhitespaceOnly) {
+		downPar.parentNode.removeChild(downPar);
+		var child = this.parentNode.firstChild;
+		while (child) {
+			var nextchild = child.nextSibling;
+			if (child.nodeType == 1) {
+				var _rowspan = bxe_table_getSpanCount(child.getAttribute("rowspan") );
+			 	if (_rowspan > 1) {
+					child.setAttribute("rowspan",_rowspan - 1);
+			 	}	
+			}
+			child = nextchild;
+		}
+	}
 	return this.parentNode.parentNode;
 }
 
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs