亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fcktablehandler.js

?? 本程序用jsp+servlet+javaBean+EJB實現交友系統
?? JS
字號:
?/*
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
 * 
 * Licensed under the terms of the GNU Lesser General Public License:
 * 		http://www.opensource.org/licenses/lgpl-license.php
 * 
 * For further information visit:
 * 		http://www.fckeditor.net/
 * 
 * "Support Open Source software. What about a donation today?"
 * 
 * File Name: fcktablehandler.js
 * 	Manage table operations.
 * 
 * File Authors:
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
 */

var FCKTableHandler = new Object() ;

FCKTableHandler.InsertRow = function()
{
	// Get the row where the selection is placed in.	
	var oRow = FCKSelection.MoveToAncestorNode("TR") ;
	if ( !oRow ) return ;

	// Create a clone of the row.
	var oNewRow = oRow.cloneNode( true ) ;

	// Insert the new row (copy) before of it.
	oRow.parentNode.insertBefore( oNewRow, oRow ) ;

	// Clean the row (it seems that the new row has been added after it).
	FCKTableHandler.ClearRow( oRow ) ;
}

FCKTableHandler.DeleteRows = function( row )
{
	// If no row has been passed as a parameer,
	// then get the row where the selection is placed in.	
	if ( !row )
		row = FCKSelection.MoveToAncestorNode("TR") ;
	if ( !row ) return ;

	// Get the row's table.	
	var oTable = FCKTools.GetElementAscensor( row, 'TABLE' ) ;

	// If just one row is available then delete the entire table.
	if ( oTable.rows.length == 1 ) 
	{
		FCKTableHandler.DeleteTable( oTable ) ;
		return ;
	}

	// Delete the row.
	row.parentNode.removeChild( row ) ;
}

FCKTableHandler.DeleteTable = function( table )
{
	// If no table has been passed as a parameer,
	// then get the table where the selection is placed in.	
	if ( !table )
	{
		var table = FCKSelection.GetSelectedElement() ;
		if ( !table || table.tagName != 'TABLE' )
			table = FCKSelection.MoveToAncestorNode("TABLE") ;
	}
	if ( !table ) return ;

	// Delete the table.
	FCKSelection.SelectNode( table ) ;
	FCKSelection.Collapse();
	table.parentNode.removeChild( table ) ;
}

FCKTableHandler.InsertColumn = function()
{
	// Get the cell where the selection is placed in.
	var oCell = FCKSelection.MoveToAncestorNode("TD") ;
	if ( !oCell )
	    oCell =  FCKSelection.MoveToAncestorNode("TH") ;

	if ( !oCell ) return ;
	
	// Get the cell's table.
	var oTable = FCKTools.GetElementAscensor( oCell, 'TABLE' ) ;

	// Get the index of the column to be created (based on the cell).
	var iIndex = oCell.cellIndex + 1 ;

	// Loop throw all rows available in the table.
	for ( var i = 0 ; i < oTable.rows.length ; i++ )
	{
		// Get the row.
		var oRow = oTable.rows[i] ;
	
		// If the row doens't have enought cells, ignore it.
		if ( oRow.cells.length < iIndex )
			continue ;
		
		oCell = oRow.cells[iIndex-1].cloneNode(false) ;
		
		if ( FCKBrowserInfo.IsGecko )
			oCell.innerHTML = GECKO_BOGUS ;
		
		// Get the cell that is placed in the new cell place.
		var oBaseCell = oRow.cells[iIndex] ;

		// If the cell is available (we are not in the last cell of the row).
		if ( oBaseCell )
			oRow.insertBefore( oCell, oBaseCell ) ;	// Insert the new cell just before of it.
		else
			oRow.appendChild( oCell ) ;				// Append the cell at the end of the row.
	}
}

FCKTableHandler.DeleteColumns = function()
{
	// Get the cell where the selection is placed in.
	var oCell = FCKSelection.MoveToAncestorNode('TD') || FCKSelection.MoveToAncestorNode('TH') ;

	if ( !oCell ) return ;
	
	// Get the cell's table.	
	var oTable = FCKTools.GetElementAscensor( oCell, 'TABLE' ) ;

	// Get the cell index.
	var iIndex = oCell.cellIndex ;

	// Loop throw all rows (from down to up, because it's possible that some
	// rows will be deleted).
	for ( var i = oTable.rows.length - 1 ; i >= 0 ; i-- )
	{
		// Get the row.
		var oRow = oTable.rows[i] ;
		
		// If the cell to be removed is the first one and the row has just one cell.
		if ( iIndex == 0 && oRow.cells.length == 1 )
		{
			// Remove the entire row.
			FCKTableHandler.DeleteRows( oRow ) ;
			continue ;
		}
		
		// If the cell to be removed exists the delete it.
		if ( oRow.cells[iIndex] )
			oRow.removeChild( oRow.cells[iIndex] ) ;
	}
}

FCKTableHandler.InsertCell = function( cell )
{
	// Get the cell where the selection is placed in.
	var oCell = cell ? cell : FCKSelection.MoveToAncestorNode("TD") ;
	if ( !oCell ) return ;

	// Create the new cell element to be added.
	var oNewCell = FCK.EditorDocument.createElement("TD");
	if ( FCKBrowserInfo.IsGecko )
		oNewCell.innerHTML = GECKO_BOGUS ;
//	oNewCell.innerHTML = "&nbsp;" ;

	// If it is the last cell in the row.
	if ( oCell.cellIndex == oCell.parentNode.cells.length - 1 )
	{
		// Add the new cell at the end of the row.
		oCell.parentNode.appendChild( oNewCell ) ;
	}
	else
	{
		// Add the new cell before the next cell (after the active one).
		oCell.parentNode.insertBefore( oNewCell, oCell.nextSibling ) ;
	}
	
	return oNewCell ;
}

FCKTableHandler.DeleteCell = function( cell )
{
	// If this is the last cell in the row.
	if ( cell.parentNode.cells.length == 1 )
	{
		// Delete the entire row.
		FCKTableHandler.DeleteRows( FCKTools.GetElementAscensor( cell, 'TR' ) ) ;
		return ;
	}

	// Delete the cell from the row.
	cell.parentNode.removeChild( cell ) ;
}

FCKTableHandler.DeleteCells = function()
{
	var aCells = FCKTableHandler.GetSelectedCells() ;
	
	for ( var i = aCells.length - 1 ; i >= 0  ; i-- )
	{
		FCKTableHandler.DeleteCell( aCells[i] ) ;
	}
}

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 ) ;
}

FCKTableHandler.SplitCell = function()
{
	// Check that just one cell is selected, otherwise return.
	var aCells = FCKTableHandler.GetSelectedCells() ;
	if ( aCells.length != 1 )
		return ;
	
	var aMap = this._CreateTableMap( aCells[0].parentNode.parentNode ) ;
	var iCellIndex = FCKTableHandler._GetCellIndexSpan( aMap, aCells[0].parentNode.rowIndex , aCells[0] ) ;
		
	var aCollCells = this._GetCollumnCells( aMap, iCellIndex ) ;
	
	for ( var i = 0 ; i < aCollCells.length ; i++ )
	{
		if ( aCollCells[i] == aCells[0] )
		{
			var oNewCell = this.InsertCell( aCells[0] ) ;
			if ( !isNaN( aCells[0].rowSpan ) && aCells[0].rowSpan > 1 )
				oNewCell.rowSpan = aCells[0].rowSpan ;
		}
		else
		{
			if ( isNaN( aCollCells[i].colSpan ) )
				aCollCells[i].colSpan = 2 ;
			else
				aCollCells[i].colSpan += 1 ;
		}
	}
}

// Get the cell index from a TableMap.
FCKTableHandler._GetCellIndexSpan = function( tableMap, rowIndex, cell )
{
	if ( tableMap.length < rowIndex + 1 )
		return null ;
	
	var oRow = tableMap[ rowIndex ] ;
	
	for ( var c = 0 ; c < oRow.length ; c++ )
	{
		if ( oRow[c] == cell )
			return c ;
	}
	
	return null ;
}

// Get the cells available in a collumn of a TableMap.
FCKTableHandler._GetCollumnCells = function( tableMap, collumnIndex )
{
	var aCollCells = new Array() ;

	for ( var r = 0 ; r < tableMap.length ; r++ )
	{
		var oCell = tableMap[r][collumnIndex] ;
		if ( oCell && ( aCollCells.length == 0 || aCollCells[ aCollCells.length - 1 ] != oCell ) )
			aCollCells[ aCollCells.length ] = oCell ;
	}
	
	return aCollCells ;
}

// This function is quite hard to explain. It creates a matrix representing all cells in a table.
// The difference here is that the "spanned" cells (colSpan and rowSpan) are duplicated on the matrix
// cells that are "spanned". For example, a row with 3 cells where the second cell has colSpan=2 and rowSpan=3
// will produce a bi-dimensional matrix with the following values (representing the cells):
//		Cell1, Cell2, Cell2, Cell 3
//		Cell4, Cell2, Cell2, Cell 5
FCKTableHandler._CreateTableMap = function( table )
{
	var aRows = table.rows ;
	
	// Row and Collumn counters.
	var r = -1 ;
	
	var aMap = new Array() ;
	
	for ( var i = 0 ; i < aRows.length ; i++ )
	{
		r++ ;
		if ( !aMap[r] )
			aMap[r] = new Array() ;
		
		var c = -1 ;
		
		for ( var j = 0 ; j < aRows[i].cells.length ; j++ )
		{
			var oCell = aRows[i].cells[j] ;
		
			c++ ;
			while ( aMap[r][c] )
				c++ ;
			
			var iColSpan = isNaN( oCell.colSpan ) ? 1 : oCell.colSpan ;
			var iRowSpan = isNaN( oCell.rowSpan ) ? 1 : oCell.rowSpan ;

			for ( var rs = 0 ; rs < iRowSpan ; rs++ )
			{
				if ( !aMap[r + rs] )
					aMap[r + rs] = new Array() ;
					
				for ( var cs = 0 ; cs < iColSpan ; cs++ )
				{
					aMap[r + rs][c + cs] = aRows[i].cells[j] ;
				}
			}
			
			c += iColSpan - 1 ;
		}
	}
	return aMap ;
}

FCKTableHandler.ClearRow = function( tr )
{
	// Get the array of row's cells.
	var aCells = tr.cells ;

	// Replace the contents of each cell with "nothing".
	for ( var i = 0 ; i < aCells.length ; i++ ) 
	{
		if ( FCKBrowserInfo.IsGecko )
			aCells[i].innerHTML = GECKO_BOGUS ;
		else
			aCells[i].innerHTML = '' ;
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产乱色国产精品免费视频| 日韩成人伦理电影在线观看| 成人在线一区二区三区| 国产欧美日韩另类视频免费观看| 成人自拍视频在线| 亚洲天堂网中文字| 欧美色手机在线观看| 午夜欧美在线一二页| 欧美精品18+| 国产一区欧美一区| 国产精品欧美久久久久无广告| 91蜜桃在线免费视频| 午夜欧美在线一二页| 精品国产三级a在线观看| 成人av资源在线| 亚洲国产日韩综合久久精品| 欧美成人高清电影在线| kk眼镜猥琐国模调教系列一区二区| 亚洲欧美日韩在线不卡| 在线电影院国产精品| 国产福利一区二区三区| 亚洲一卡二卡三卡四卡| 久久青草欧美一区二区三区| av资源站一区| 麻豆精品新av中文字幕| 最新日韩av在线| 日韩午夜av电影| 99在线精品免费| 久久精品国产在热久久| 亚洲人成网站色在线观看| 日韩视频国产视频| 色综合一区二区| 韩国av一区二区三区四区| 一区二区三区免费观看| 久久久久国产成人精品亚洲午夜| 欧美日韩中文一区| 成人av电影免费在线播放| 美美哒免费高清在线观看视频一区二区| 国产亚洲一区二区三区四区| 欧美猛男男办公室激情| 丁香婷婷综合激情五月色| 日韩成人免费电影| 亚洲综合男人的天堂| 国产日产精品1区| 日韩一区二区视频在线观看| 色久综合一二码| 成人免费视频一区| 久久国产精品99久久久久久老狼| 亚洲另类色综合网站| 国产精品私人自拍| 精品久久久久久综合日本欧美| 欧美日韩在线免费视频| 99re成人精品视频| 成人美女在线观看| 国产精品一区久久久久| 免费美女久久99| 午夜视频在线观看一区二区 | 久久国产精品露脸对白| 伊人色综合久久天天人手人婷| 国产精品日韩成人| 久久综合久久综合久久| 日韩欧美国产午夜精品| 欧美日本韩国一区二区三区视频 | 9191成人精品久久| 欧美性猛交xxxx乱大交退制版 | 欧美国产视频在线| 久久综合色天天久久综合图片| 欧美日本一区二区三区四区| 欧美在线小视频| 色呦呦日韩精品| 色婷婷精品久久二区二区蜜臀av| 2020国产成人综合网| 51精品视频一区二区三区| 欧美色视频在线| 精品视频在线看| 欧美三级韩国三级日本一级| 欧美亚男人的天堂| 欧美中文字幕一区二区三区亚洲| 欧美亚洲一区二区在线观看| 在线免费精品视频| 欧美午夜宅男影院| 欧美精品aⅴ在线视频| 制服.丝袜.亚洲.另类.中文| 欧美群妇大交群中文字幕| 91精品国产一区二区三区蜜臀| 91精品一区二区三区在线观看| 88在线观看91蜜桃国自产| 91精品国产色综合久久不卡蜜臀| 欧美一区二区在线观看| 日韩欧美中文字幕制服| 精品国产一二三| 国产精品免费久久| 亚洲精品免费在线| 亚洲bt欧美bt精品777| 美女国产一区二区三区| 国产成人综合网| 97超碰欧美中文字幕| 欧美亚洲一区二区在线观看| 91麻豆精品国产91久久久久 | 欧美日韩免费电影| 欧美一级日韩一级| 国产色91在线| 亚洲六月丁香色婷婷综合久久| 午夜精品久久久久影视| 极品少妇xxxx精品少妇| 成人免费三级在线| 欧美日韩国产综合视频在线观看| 欧美mv日韩mv国产| 国产精品国产三级国产普通话蜜臀 | 日韩精品一区二区三区三区免费 | 69堂国产成人免费视频| 26uuu亚洲婷婷狠狠天堂| 国产精品久久久久永久免费观看 | 亚洲精品国产高清久久伦理二区| 婷婷综合在线观看| 国产精品亚洲а∨天堂免在线| 97久久久精品综合88久久| 91精品国产欧美一区二区18 | 精品免费视频一区二区| 国产精品欧美极品| 男男视频亚洲欧美| www.欧美.com| 精品成人在线观看| 一区二区理论电影在线观看| 国产综合色视频| 欧美顶级少妇做爰| 亚洲男人都懂的| 国产高清精品久久久久| 91精品国模一区二区三区| 国产精品乱码人人做人人爱| 美女在线视频一区| 欧美日韩午夜精品| 中文字幕一区二区三区蜜月 | 91麻豆精品在线观看| 日韩欧美www| 亚洲国产精品尤物yw在线观看| 国产美女精品人人做人人爽| 欧美日韩午夜精品| 亚洲欧美日韩国产综合在线| 极品少妇xxxx精品少妇| 欧美精品久久99久久在免费线 | 亚洲三级视频在线观看| 狠狠色伊人亚洲综合成人| 欧美日韩视频在线观看一区二区三区| 中文字幕在线一区免费| 国产一区二区在线视频| 日韩欧美综合一区| 日本午夜精品一区二区三区电影 | 免费在线看成人av| 欧美男女性生活在线直播观看| 亚洲精品水蜜桃| 波多野结衣在线一区| 欧美激情综合五月色丁香| 国产乱一区二区| 久久综合色婷婷| 国产一区二区三区在线观看免费| 日韩欧美成人午夜| 卡一卡二国产精品| 日韩欧美一区二区不卡| 日韩精品乱码免费| 91麻豆精品国产自产在线观看一区 | 欧美国产日韩精品免费观看| 久久99精品国产麻豆婷婷洗澡| 制服丝袜中文字幕亚洲| 午夜精品一区二区三区免费视频| 色国产精品一区在线观看| 亚洲乱码国产乱码精品精可以看 | 国产精品福利影院| 成人av在线影院| 欧美日韩一卡二卡三卡| 亚洲欧洲性图库| 一本到三区不卡视频| 亚洲日本欧美天堂| 91视频观看视频| 伊人婷婷欧美激情| 欧美日韩电影一区| 青青草国产成人99久久| 精品毛片乱码1区2区3区| 久久国产尿小便嘘嘘尿| 国产亚洲一本大道中文在线| 成人在线视频首页| 亚洲精品国产视频| 欧美精选午夜久久久乱码6080| 日韩1区2区3区| 日本成人在线电影网| 日韩女优电影在线观看| 国产成人av电影在线播放| 成人免费视频在线观看| 欧美在线观看视频在线| 日韩福利视频导航| 久久免费视频一区| 色天天综合色天天久久| 首页国产丝袜综合| 久久久久九九视频| 91久久久免费一区二区| 日韩黄色免费网站| 中文在线一区二区| 欧美视频第二页| 国产剧情一区在线| 亚洲国产精品麻豆|