📄 edit_带有编辑器的代码编辑.jsp
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ include file="/inc/pv/admin.jsp"%>
<%@ include file="/inc/public/msg.jsp"%>
<%
/*****
*
* 功能介绍:根据当前的MenuId,对应的action名和当前用户,判断是否有进入此页面的权限
*
*/
if(checkPv(strMenuId,"edit",user)<0){
noPv(out);
return;
}
%>
<%
String strType = igec.util.Tool.getStr(request.getParameter("id"));
if(igec.util.Tool.IsEmpty(strType)){
showError("缺少要编辑的代码信息类型!",out);
return;
}
String strIID = igec.site.base.business.DataUtilBusiness.getFieldValue("IID","TAB_SYSCODE","WHERE TYPEID='" + strType + "'");
String strContent = "";
if(!igec.util.Tool.IsEmpty(strIID)){
strContent = igec.site.base.business.DataUtilBusiness.getContent(strIID);
}
%>
<html>
<head>
<title><%=igec.site.base.bean.SitePara.strWebTitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link rel="stylesheet" type="text/css" href="<%=strCssPath%>">
<script language="javascript" src="<%=igec.site.base.bean.SitePara.strVirtualName%>/js/clear.jsp"></script>
<script language="javascript" src="<%=igec.site.base.bean.SitePara.strVirtualName%>/js/public.js"></script>
<script language="javascript" src="<%=igec.site.base.bean.SitePara.strVirtualName%>/js/check.js"></script>
<script language="javascript" src="<%=igec.site.base.bean.SitePara.strVirtualName%>/js/xmlhttp.js"></script>
<script language="javascript" src="<%=strSkinBase%>/js/forbid.js"></script>
<script language = "JavaScript">
<!--
function getUpFileList(){
return document.myform.UploadFiles.value;
}
function addPic(strFileName){
}
function setAction(lsAction,lsTarget){
document.myform.action = lsAction;
document.myform.target = lsTarget;
if(CheckForm(document.myform)){
document.myform.submit();
}
}
function CheckForm(loObj){
if (editor.EditMode.checked==true)
document.myform.Content.value=editor.HtmlEdit.document.body.innerText;
else
document.myform.Content.value=editor.HtmlEdit.document.body.innerHTML;
if(!Check(loObj)) return false;
document.myform.Content.value = clearSiteUrl(document.myform.Content.value);
//检查是否SESSION已经丢失
var strHref = "<%=site.bean.SitePara.strVirtualName + site.bean.SitePara.strManageFolder%>/work.do?action=timeout&recf=timeIsOut&mr=" + Math.random();
__XmlHttpPool__.PostRemoteData(strHref,function onGetData(strContent){on_aJax_GetReceiveData(strContent,"");},"");
return false;
}
function timeIsOut(lsValue){
if(lsValue=="0"){//没有超时
document.myform.submit();
}else{//超时
alert("警告:您的登录有效期已过,请将当前编辑的信息另外保存,重新登录之后再进行操作!");
}
}
//-->
</script>
</head>
<body class="bodycolor" leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" onload="resizeWin('objBody');SetSelValue('type','<%=strType%>');">
<div name="objBody" id="objBody" style="width:700px">
<form method="POST" name="myform" onSubmit="return CheckForm(this);" action="<%=site.bean.SitePara.strVirtualName + site.bean.SitePara.strManageFolder%>/code.do?action=save&type=<%=strType%>&iid=<%=strMenuId%>&cid=<%=strIID%>" target="_Igec_News_RunForm">
<table border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#000000" class="small" width="100%">
<tr class="TableHeader">
<td height="22" colspan="6" align="center"><b>信 息 编 辑</b></td>
</tr>
<tr style="display:none">
<td align="right" class="TableData"><strong>对应分类:</td>
<td class="TableData" colspan="2"><select name="type" id="type" EmptyDisable label="对应分类">
<option value="">请选择对应分类</option>
<script language="javascript" src="<%=igec.site.base.bean.SitePara.strVirtualName%>/static/js/codetype.js"></script>
</select> <font color="#FF0000">*</font>
</td>
</tr>
<tr>
<td width="100" align="right" valign="top" class="TableData"><p><strong>内容:</p>
<p align="left"><font color="#006600">
· 换行请按Shift+Enter</font><br>
<font color="#006600">· 另起一段请按Enter</font><br>
<font color="#006600">· 上传WORD中的图片请将本站加入信任站点</font>
</p></td>
<td colspan="2" class="TableData">
<textarea name="Content" style="display:none" rows="1" cols="20"><%=strContent%></textarea>
<iframe ID="editor" src="<%=site.bean.SitePara.strVirtualName%>/IgecEditor/editor.jsp?id=Content" frameborder=1 scrolling=no width="600" height="405"></iframe>
</td>
</tr>
<tr style="display:">
<td align="right" class="TableData"><strong>使用代码:</td>
<td class="TableData" colspan="2"><input type="text" size="80" value="<%=site.business.CodeBusiness.getContent("<%=strType%>")%>"></td>
</tr>
</table>
<div align="center">
<p>
<input name="Add" type="button" id="Add" value=" 更 新 " onClick="javascript:setAction('<%=site.bean.SitePara.strVirtualName + site.bean.SitePara.strManageFolder%>/code.do?action=save&type=<%=strType%>&iid=<%=strMenuId%>&cid=<%=strIID%>','_Igec_News_RunForm');" style="cursor:hand;">
<input name="reset" type="button" id="Cancel" value=" 返 回 " style="cursor:hand;" onclick="javascript:window.close();">
</p>
</div>
</form>
</div>
<iframe id="_Igec_News_RunForm" name="_Igec_News_RunForm" src="" width="0" height="0" style="display:none"></iframe>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -