rem: this._popupDialog("/shared/richedit/popups/insert_table.html", function(param) { if (!param) { return false; } var doc = editor._doc;  var table = doc.createElement("table");  for (var field in param) { var value = param[field]; if (!value) { continue; } switch (field) { case "f_width"   : table.style.width = value + param["f_unit"]; break; case "f_align"   : table.align	 = value; break; case "f_border"  : table.border	 = parseInt(value); break; case "f_spacing" : table.cellspacing = parseInt(value); break; case "f_padding" : table.cellpadding = parseInt(value); break; } } var tbody = doc.createElement("tbody"); table.appendChild(tbody); for (var i = 0; i < param["f_rows"]; ++i) { var tr = doc.createElement("tr"); tbody.appendChild(tr); for (var j = 0; j < param["f_cols"]; ++j) { var td = doc.createElement("td"); tr.appendChild(td);  (HTMLArea.is_gecko) && td.appendChild(doc.createElement("br")); } } if (HTMLArea.is_ie) { range.pasteHTML(table.outerHTML); } else {  editor.insertNodeAtSelection(table); } return true; }, null); 
add: function(image) { if (!image) return false;  var htmlSelectionControl = "Control"; var grngMaster = editor._doc.selection.createRange();   if (editor._doc.selection.type == htmlSelectionControl) { grngMaster.execCommand('Delete'); grngMaster = editor._doc.selection.createRange(); }  link_to = image['link_to']; if (link_to.length > 1) { idstr = "556e697175657e537472696e67"; grngMaster.execCommand("CreateLink", null, idstr); coll = editor._doc.getElementsByTagName("A"); for(i=0; i<coll.length; i++) { if (coll[i].href == idstr) { link_element = coll[i]; link_element.href = '/root?node_id=' + image['node_id'] + '&' + link_to; link_element.target = '_blank'; img_element = editor._doc.createElement("IMG"); img_element.src = '/root?node_id=' + image['node_id'] + '&' + image['type']; link_element.appendChild(img_element); } } } else { idstr = "\" id=\"556e697175657e537472696e67"; grngMaster.execCommand("InsertImage", null, idstr); img_element = editor._doc.all['556e697175657e537472696e67']; img_element.removeAttribute("id"); img_element.src = '/root?node_id=' + image['node_id'] + '&' + image['type']; }  img_element.id = image['node_id'] + ':' + image['type'] + ':' + image['link_to']; img_element.border = image['border']; img_element.alt = image['alt']; img_element.align = image['align']; img_element.hspace = image['hspace']; img_element.vspace = image['vspace']; new_width = parseInt(image['width']); new_height = parseInt(image['height']); if (new_width != 0 && !isNaN(new_width)) img_element.width = image['width']; if (new_height != 0 && !isNaN(new_height)) img_element.height = image['height'];  grngMaster.collapse(false); grngMaster.select(); } 
context: 	this._popupDialog("/shared/richedit/popups/insert_table.html", function(param)	 {		if (!param)	 	{	// user must have pressed Cancel			return false;		}		var doc = editor._doc;		// create the table element		var table = doc.createElement("table");		// assign the given arguments		for (var field in param)	 	{			var value = param[field];			if (!value)	 		{				continue;			}			switch (field)	 		{			    case "f_width"   : table.style.width = value + param["f_unit"]; break;			    case "f_align"   : table.align	 = value; break;			    case "f_border"  : table.border	 = parseInt(value); break;			    case "f_spacing" : table.cellspacing = parseInt(value); break;			    case "f_padding" : table.cellpadding = parseInt(value); break;			}		}		var tbody = doc.createElement("tbody");		table.appendChild(tbody);		for (var i = 0; i < param["f_rows"]; ++i)	 	{			var tr = doc.createElement("tr");			tbody.appendChild(tr);			for (var j = 0; j < param["f_cols"]; ++j)	 		{				var td = doc.createElement("td");				tr.appendChild(td);				// Mozilla likes to see something inside the cell.				(HTMLArea.is_gecko) && td.appendChild(doc.createElement("br"));			}		}		if (HTMLArea.is_ie)	 	{			range.pasteHTML(table.outerHTML);		} else {			// insert the table			editor.insertNodeAtSelection(table);		}		return true;	}, null);
meta: 8196	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8196/2a28919f6e958d01456898eb25453990d50e52e9/htmlarea.js/clean/2.2.1/shared/richedit/htmlarea.js