context: FCKTableHandler.MergeCells = function(){	// Get all selected cells.	var aCells = FCKTableHandler.GetSelectedCells() ;		// At least 2 cells must be selected.	if ( aCells.length < 2 )		return ;			// The merge can occour only if the selected cells are from the same row.	if ( aCells[0].parentNode != aCells[aCells.length-1].parentNode )		return ;	// Calculate the new colSpan for the first cell.	var iColSpan = isNaN( aCells[0].colSpan ) ? 1 : aCells[0].colSpan ;	var sHtml = '' ;	var oCellsContents = FCK.EditorDocument.createDocumentFragment() ;		for ( var i = aCells.length - 1 ; i >= 0 ; i-- )	{		var eCell = aCells[i] ;				// Move its contents to the document fragment.		for ( var c = eCell.childNodes.length - 1 ; c >= 0 ; c-- )		{			var eChild = eCell.removeChild( eCell.childNodes[c] ) ;				if ( ( eChild.hasAttribute && eChild.hasAttribute('_moz_editor_bogus_node') ) || ( eChild.getAttribute && eChild.getAttribute( 'type', 2 ) == '_moz' ) )				continue ;							oCellsContents.insertBefore( eChild, oCellsContents.firstChild ) ;		}				if ( i > 0 )		{			// Accumulate the colspan of the cell.			iColSpan += isNaN( eCell.colSpan ) ? 1 : eCell.colSpan ;			// Delete the cell.			FCKTableHandler.DeleteCell( eCell ) ;		}	}		// Set the innerHTML of the remaining cell (the first one).	aCells[0].colSpan = iColSpan ;		if ( FCKBrowserInfo.IsGecko && oCellsContents.childNodes.length == 0 )		aCells[0].innerHTML = GECKO_BOGUS ;	else		aCells[0].appendChild( oCellsContents ) ;}
meta: 8533	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8533/9e983f26dc3628701a539d2377aaa3db1e8f1f71/fcktablehandler.js/clean/library/src/webapp/editor/FCKeditor/editor/_source/internals/fcktablehandler.js