r1426 - in branches/bxe_2_0: js mozile

[email protected]
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Mon Dec 19 11:13:36 2005
New Revision: 1426

Modified:
   branches/bxe_2_0/js/bxeFunctions.js
   branches/bxe_2_0/js/table.js
   branches/bxe_2_0/mozile/eDOMXHTML.js
Log:
correct new table mode


Modified: branches/bxe_2_0/js/bxeFunctions.js
==============================================================================
--- branches/bxe_2_0/js/bxeFunctions.js	(original)
+++ branches/bxe_2_0/js/bxeFunctions.js	Mon Dec 19 11:13:36 2005
@@ -1567,7 +1567,6 @@
 
 
 function bxe_InsertTableCallback(replaceNode) {
-	
 	var sel = window.getSelection();
 
 	if (bxe_checkForSourceMode(sel)) {
@@ -1575,7 +1574,7 @@
 	}
 	
 	var mod = mozilla.getWidgetModalBox(bxe_i18n.getText("Create Table"), function(values) {
-		var te = documentCreateTable(values["rows"], values["cols"]);
+		var te = documentCreateTable(values["rows"], values["cols"],replaceNode._node);
 		if(!te) {
 			alert(bxe_i18n.getText("Can't create table: invalid data"));
 		}

Modified: branches/bxe_2_0/js/table.js
==============================================================================
--- branches/bxe_2_0/js/table.js	(original)
+++ branches/bxe_2_0/js/table.js	Mon Dec 19 11:13:36 2005
@@ -287,12 +287,12 @@
 }
 
 function bxe_table_InsertTableOnNew(node) {
-	
 	bxe_InsertTableCallback(node);
 }
 
 function bxe_table_InsertRowOnNew(node) {
-	var td = bxe_config.doc	.createElement("td");
+	alert("bxe_table_InsertRowOnNew is deprecated!");
+	var td = bxe_config.doc.createElement("td");
 	td = node._node.appendChild(td);
 	bxe_table_insert_row(td);
 	bxe_table_delete_row(td);

Modified: branches/bxe_2_0/mozile/eDOMXHTML.js
==============================================================================
--- branches/bxe_2_0/mozile/eDOMXHTML.js	(original)
+++ branches/bxe_2_0/mozile/eDOMXHTML.js	Mon Dec 19 11:13:36 2005
@@ -815,12 +815,16 @@
 
 Document.prototype.createTable = documentCreateTable;
 
-function documentCreateTable(noRows, noColumns)
+function documentCreateTable(noRows, noColumns,node)
 {
 	if((/\D+/.test(noRows)) || (/\D+/.test(noColumns)) || (noRows==0) || (noColumns==0))
 		return null; // go to exception
 
-	var te = documentCreateXHTMLElement("table");
+	if (typeof node != "undefined" && node.nodeType == 1) {
+		var te = bxe_config.xmldoc.createElementNS(node.namespaceURI, node.localName);
+	} else {
+		var te = documentCreateXHTMLElement("table");
+	}
 	te.XMLNode = te.getXMLNode();
 	te.appendChild(document.createTextNode("\n"));
 	
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.