⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 templateaddedit.aspx

📁 很不错的公文流转系统
💻 ASPX
📖 第 1 页 / 共 5 页
字号:
}

function _CState()
{
	this.selection=null
	this.bMode=true
	this.customButtons=false
	this.css=this.bgColor="#FFFFFF"
	this.defaultSkin=document.styleSheets.skin.cssText
	this.popupSkin=document.styleSheets.popupSkin.cssText
	this.szSearch=location.search.substring(1)
	this.aBindings=new Array()
	this.aListPopups=new Object()
	this.aCache=new Object()
	this.bLoaded=false
	this.oPhoto=null
	this.RestoreSelection=_CState_RestoreSelection
	this.GetSelection=_CState_GetSelection
	this.SaveSelection=_CState_SaveSelection
}

function _CState_RestoreSelection()
{
	if(this.selection)this.selection.select()
}

function _CState_GetSelection()
{
	var oSel=this.selection
	if(!oSel){
		oSel=idEditbox.document.selection.createRange()
		oSel.type=idEditbox.document.selection.type
	}
	return oSel
}

function _CState_SaveSelection()
{
	g_state.selection=idEditbox.document.selection.createRange()
	if(!g_state.selection)
	g_state.selection=new Object
	g_state.selection.type=idEditbox.document.selection.type
}

function _CPopup_Init()
{
var sz="<HTML ID=popup><STYLE>" +document.styleSheets.defPopupSkin.cssText +"\n" +document.styleSheets.popupSkin.cssText +"</STYLE><BODY ONCONTEXTMENU=\"return false\" ONSCROLL=\"return false\" SCROLL=no TABINDEX=-1 ONSELECTSTART=\"return event.srcElement.tagName=='INPUT'\" ><DIV ID=puRegion><TABLE ID=header><TR><TH NOWRAP ID=caption></TH><TH VALIGN=middle ALIGN=RIGHT><DIV ID=close ONCLICK=\"parent._CPopup_Hide()\">×</DIV></TH></TR></TABLE><DIV ALIGN=CENTER ID=content></DIV></DIV></BODY></HTML>"
idPopup.document.open("text/html","replace")
idPopup.document.write(sz)
idPopup.document.close()
}

function _CPopup_InsertDatabound(eSelect)
{
    if (eSelect.selectedIndex != 0)
    {
        var sElemName = eSelect.options[eSelect.selectedIndex].text;
        var iLen = sElemName.length
        sElemName = sElemName.replace(/"/g, '&#034;')
        insertHTML('<INPUT CLASS=DataBound SIZE=' + (iLen + 2) + ' NAME="' + sElemName +'" VALUE=" ' + sElemName + ' ">')
        eSelect.selectedIndex = 0;
        idEditbox.focus()   
    }
}

function _CPopup_Hide() 
{
	document.all.idPopup.style.zIndex=-1
	document.all.idPopup.style.visibility="hidden"
	idPopup.document._type=""
	idPopup.document.onkeydown=idPopup.document.onmouseover=idPopup.document.onclick=null
	
	g_state.RestoreSelection()
	setFocus()
}

function _CPopup_Show(szType)
{
var oRenderer,szCacheKey="PopupRenderer."+szType
if(!isIE4)
g_state.SaveSelection()
if(idPopup.document._type==szType)
_CPopup_Hide()
else
{
document.all.idPopup.style.zIndex=-1
oRenderer=g_state.aCache[szCacheKey]
if((!oRenderer)||("Link"==szType)||("Image"==szType))
g_state.aCache[szCacheKey]=oRenderer=new _CPopupRenderer(szType)
document.all.idPopup.style.visibility=""
document.all.idPopup.style.pixelHeight=document.all.idPopup.style.pixelWidth=idPopup.document.all.puRegion.style.pixelHeight=idPopup.document.all.puRegion.style.pixelWidth=50
idPopup.document._type=szType
idPopup.document._renderer=oRenderer
idPopup.document.all.caption.innerText=oRenderer.GetCaption()
idPopup.document.all.content.innerHTML=oRenderer.GetHTML()
idPopup.document.onkeydown=new Function("this._renderer.OnKeyDown()")
idPopup.document.onmouseover=new Function("this._renderer.OnMouseOver()")
idPopup.document.onclick=new Function("this._renderer.OnClick()")
oRenderer.ResetContext(idPopup.document)
setTimeout("_CPopupRenderer_Display('"+szType+"')",100)
}
}

function _CPopupRenderer_Display(szType){
var oRenderer,szCacheKey="PopupRenderer."+szType
oRenderer=g_state.aCache[szCacheKey]
if(oRenderer.autoSize){
idPopup.document.all.puRegion.style.pixelHeight=document.all.idPopup.style.pixelHeight=idPopup.document.all.puRegion.offsetHeight
idPopup.document.all.puRegion.style.pixelWidth=document.all.idPopup.style.pixelWidth=idPopup.document.all.puRegion.offsetWidth+50
document.all.idPopup.style.pixelLeft=(document.body.clientWidth - idPopup.document.all.puRegion.offsetWidth)/ 2
}
else{
idPopup.document.all.puRegion.style.pixelHeight=document.all.idPopup.style.pixelHeight=document.body.clientHeight - idToolbar.offsetHeight- document.all.idMode.offsetHeight-20
idPopup.document.all.puRegion.style.pixelWidth=document.all.idPopup.style.pixelWidth=document.body.clientWidth - 50

document.all.idPopup.style.pixelLeft=25
}
document.all.idPopup.style.zIndex=2
idPopup.focus()
}

function _CPopupRenderer(szType)
{
	this.szType     =  szType
    this.elCurrent  =  this.oDocument  = null
    this.ResetContext   =  _CPopupRenderer_ResetContext
    this.GetCaption = _CPopupRenderer_GetCaption    
    this.GetHTML    = _CPopupRenderer_GetHTML
    this.autoSize   = true
    this.OnMouseOver = new Function()
    this.OnKeyDown  = _CListPopupRenderer_GenericOnKeyDown
    
	switch(szType)
	{
		case "formatblock":
        case "font":
        case "fontsize":
            this.OnMouseOver= _CListPopupRenderer_OnMouseOver
            this.OnKeyDown  = _CListPopupRenderer_OnKeyDown
        case "BackColor": 
        case "ForeColor":
            this.OnClick    = _CListPopupRenderer_OnClick
            this.Highlight  = _CListPopupRenderer_Highlight
            this.Select     = _CListPopupRenderer_Select
            break
        default:
            this.OnClick    = new Function()
            break   
	}
	switch(szType)
	{
	case "formatblock":
		this.szCaption="选择当前字体格式"
		this.PrepareHTML=_CFormatBlockPopupRenderer_PrepareHTML
		this.szHTML=this.PrepareHTML()
		break
	case "font":
		this.szCaption="选择当前字体"
		this.PrepareHTML=_CFontFacesPopupRenderer_PrepareHTML
		this.szHTML=this.PrepareHTML()
	break
		case "fontsize":
		this.szCaption="选择当前字体尺寸"
		this.PrepareHTML =_CFontSizesPopupRenderer_PrepareHTML
		this.szHTML=this.PrepareHTML()
		break
	case "Link":
		this.szCaption="创建、修改链接"
		this.PrepareHTML=_CLinkPopupRenderer_PrepareHTML
		this.szHTML=this.PrepareHTML()
		break
	case "Image":
		this.szCaption="创建、修改图片"
		this.PrepareHTML=_CImagePopupRenderer_PrepareHTML
		this.szHTML=this.PrepareHTML()
		break
	case "Table":
		this.szCaption="创建、修改表格"
		this.PrepareHTML=_CTablePopupRenderer_PrepareHTML
		this.szHTML=this.PrepareHTML()
		break
	case "BackColor":
		this.szCaption	= "选择当前背景颜色"
		this.szHTML	= "<DIV ID=ColorPopup ALIGN=CENTER>" + _CUtil_BuildColorTable("") + "</DIV>"
		break;
	case "ForeColor":
		this.szCaption="选择当前字体颜色"
		this.szHTML="<DIV ID=ColorPopup ALIGN=CENTER>"+_CUtil_BuildColorTable("")+"</DIV>"
		break
	case "Emoticon":
         this.szCaption      ="选取图释"
         this.PrepareHTML    = _CEmoticonRenderer_PrepareHTML
         this.szHTML         = this.PrepareHTML()
         break
	default:
		this.szCaption=""
		break
	}
}
function _CPopupRenderer_ResetContext(oDoc)
{
    this.oDocument  = oDoc
    this.elCurrent  = null

    if (this.szType=="Table") {
            var oSel    = idEditbox.document.selection.createRange() 
        var oBlock  = (oSel.parentElement != null ? _CUtil_GetElement(oSel.parentElement(),"TABLE") : _CUtil_GetElement(oSel.item(0),"TABLE"))
        if (oBlock!=null) {
            oDoc.all.tabEdit.className=""
            oDoc.all.tabEditBodytxtPadding.value = oBlock.cellPadding
            oDoc.all.tabEditBodytxtSpacing.value = oBlock.cellSpacing
            oDoc.all.tabEditBodytxtBorder.value = oBlock.border
            oDoc.all.tabEditBodytxtBorderColor.value = oBlock.borderColor
            oDoc.all.tabEditBodytxtBackgroundImage.value = oBlock.background
            oDoc.all.tabEditBodytxtBackgroundColor.value = oBlock.bgColor
        }
        oDoc.elCurrent = oBlock
    }
}
function _CPopupRenderer_GetCaption()
{
	return this.szCaption
}

function _CPopupRenderer_GetHTML()
{
	return this.szHTML
}

function _CEmoticonRenderer_PrepareHTML() {
    var sz = "<TABLE><TR><TD>"
    for (var i=0; i < arEmoticons.length; i++) 
    {
        sz  +=  "<IMG TABINDEX=" + (i+1) + " ONCLICK=\"parent._CEmoticonRenderer_Select(this)\" CLASS=emoticon SRC=\"" + emoticonpath + arEmoticons[i] + "\" WIDTH=19 HEIGHT=19 HSPACE=3 VSPACE=3>"
        if ((i+1)%8==0) sz+="<BR>"
    }           
    if (i%8!=0) sz+="<BR>"
    
    return sz + "</TD></TR></TABLE>"
}

function _CEmoticonRenderer_Select(elImg) {
	var oSel=g_state.GetSelection()
    insertHTML("<IMG SRC=\"" + elImg.src + "\" WIDTH=" + elImg.width + " HEIGHT=" + elImg.height + ">")
    g_state.RestoreSelection()
    oSel.select()
    _CPopup_Hide()
}

function _CFontSizesPopupRenderer_PrepareHTML()
{
	var sz="<TABLE ALIGN=center ID=idList CELLSPACING=0 CELLPADDING=0>"
	for(var i=1;i <= 7;i++)
	{
		sz+="<TR><TD NOWRAP _item="+i+" ALIGN=center STYLE=\"margin:0pt;padding:0pt\"><FONT SIZE="+i+">" +"myoffice.net信息管理平台("+i+")</FONT></TD></TR>"
	}
		sz+="</TABLE>"
	return sz
}
function _CFontFacesPopupRenderer_PrepareHTML()
{
var sz="<TABLE ALIGN=center ID=idList CELLSPACING=0 CELLPADDING=0>"
for(var i=0;i<defaultFonts.length;i++)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -