📄 function_editor.jsp
字号:
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@page contentType="text/html; charset=GBK"%>
<html:html>
<head>
<link href="<%=request.getContextPath()%>/_normal/css/style.css" rel="stylesheet" type="text/css">
<title>Action编辑</title>
<script language="javascript" src="<%=request.getContextPath()%>/_normal/script/common.js" type="text/javascript"></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/AjaxTopsSystemFunction.js'></script>
<script language="javascript" type="text/javascript">
function doSave() {
if(document.all.funcCode.value==''){
document.all.funcCode.focus();
alert('请输入模块编号!');
return false;
}
if(document.all.funcName.value==''){
document.all.funcName.focus();
alert('请输入模块名称!');
return false;
}
if(document.all.funcPrbit.value==''){
document.all.funcPrbit.focus();
alert('请输入权限位!');
return false;
}
if (confirm("确定保存该信息吗?")) {
var tbl=document.all.detailTbl;
var str="";
for(var i=1;i<tbl.rows.length;i++){
if(tbl.rows[i].cells[1].children[0].value!='' && tbl.rows[i].cells[2].children[0].value!=''){
str=str+tbl.rows[i].cells[1].children[0].value+"_snjatso_"+tbl.rows[i].cells[2].children[0].value+"%#snjatso#%";
}
}
if(str.length>0){
str=str.substring(0,str.lastIndexOf("%#snjatso#%"));
}
document.all.tempStr.value=str;
actfrmTopsSystemFunction.submit();
}
else {
return false;
}
}
function doEdit(obj){
var td=obj.parentElement;
if(td.children[0].style.display==''){
td.children[0].style.display='none';
td.children[1].style.display='';
}else{
td.children[0].style.display='';
td.children[1].style.display='none';
}
}
function imageFileChange(obj){
var td=obj.parentElement;
var fileName=obj.value;
var path=fileName.substring(0,fileName.lastIndexOf("\\"));
fileName=fileName.substring(fileName.lastIndexOf("\\")+1,fileName.length);
path=path.substring(path.lastIndexOf("\\")+1,path.length);
td.children[0].value=path+"/"+fileName;
td.children[0].style.display='';
td.children[1].style.display='none';
}
var trObj;
function actionNameChange(obj){
var tr=obj.parentElement.parentElement;
trObj=tr;
var selectObj=tr.cells[2].children[0];
var len=selectObj.options.length;
for(var i=1;i<len;i++){
selectObj.removeChild(selectObj.options[1]);
}
AjaxTopsSystemFunction.findAllByAction(obj.value,actionNameChangeCallBack);
}
function actionNameChangeCallBack(result){
var selectObj=trObj.cells[2].children[0];
for(var i=0;i<result.length;i++){
var opt=new Option(result[i],result[i]);
selectObj.options.add(opt);
}
}
var actionListObj='<%=request.getAttribute("actionList")%>'
actionListObj=actionListObj.substring(1,actionListObj.length-1);
var actionArray=actionListObj.split(",");
function addNew(){
var tbl=document.all.detailTbl;
var row=tbl.insertRow();
var cell=row.insertCell();
cell.height='20';
cell.align='center';
cell.innerHTML=tbl.rows.length-1;
cell=row.insertCell();
cell.innerHTML='<select onchange="actionNameChange(this)" class="inputBackGround" style="width:100%"><option value="">--请选择Action类名--</option></select>';
cell=row.insertCell();
cell.innerHTML='<select class="inputBackGround" style="width:100%"><option value="">--请选择Action方法名--</option></select>';
cell=row.insertCell();
cell.align='center';
cell.innerHTML='<a onclick="deleteRow(this)" style="cursor:hand" title="删除">删除</a>';
for(var i=0;i<actionArray.length;i++){
var opt=new Option(actionArray[i].trim(),actionArray[i].trim());
row.cells[1].children[0].options.add(opt);
}
}
function deleteRow(obj){
if(confirm("确定要删除吗?")){
obj.parentElement.parentElement.parentElement.removeChild(obj.parentElement.parentElement);
var tbl=document.all.detailTbl;
for(var i=1;i<tbl.rows.length;i++){
tbl.rows[i].cells[0].innerHTML=i;
}
}
}
</script>
</head>
<body>
<p>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="70%" nowrap class="location">您的位置:系统编辑</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="7%" id="save" align="center" valign="middle" nowrap class="toolbar" onMouseOver="OMO()" onMouseOut="OMOU()" onClick="doSave()">
<img src="<%=request.getContextPath()%>/_normal/toolbar_pic/page_save.gif" alt="保存">
保存
</td>
<td width="1%" align="center" valign="middle" nowrap class="toolbar">|</td>
<td width="7%" align="center" valign="middle" nowrap class="toolbar" onMouseOver="OMO()" onMouseOut="OMOU()" onClick="addNew()">
<img src="<%=request.getContextPath()%>/_normal/toolbar_pic/page_add.gif" alt="增加">
增加
</td>
<td width="1%" align="center" valign="middle" nowrap class="toolbar">|</td>
<td width="7%" align="center" valign="middle" nowrap class="toolbar" onMouseOver="OMO()" onMouseOut="OMOU()" onClick="javascript:history.go(-1)">
<img src="<%=request.getContextPath()%>/_normal/toolbar_pic/arrow_undo.gif" alt="返回">
返回
</td>
<td width="74%" align="center" valign="middle" nowrap class="toolbar"> </td>
</tr>
</table>
<html:form action="/actTopsSystemFunction" method="POST">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" align="center">
<table border="0" cellpadding="0" cellspacing="1" width="70%">
<html:hidden property="id"/>
<tr align="center">
<td width="20%" height="20">模块编号</td>
<td width="30%">
<html:text property="funcCode" readonly="false" style="width:100%" styleClass="inputBackGround"/>
</td>
<td width="20%">模块名称</td>
<td width="30%">
<html:text property="funcName" readonly="false" style="width:100%" styleClass="inputBackGround"/>
</td>
</tr>
<tr align="center">
<td height="20">权限位</td>
<td><html:text property="funcPrbit" style="width:100%" styleClass="inputBackGround"/></td>
<td height="20">图片</td>
<td colspan="0" align="left">
<html:text property="funcImage" readonly="false" style="width:80%" styleClass="inputBackGround"/>
<input type="file" style="display:none;width:80%" onchange="imageFileChange(this)" class="inputBackGround"/>
<img alt="切换" src="<%=request.getContextPath()%>/_normal/toolbar_pic/application_form_edit.gif" onclick="doEdit(this)" style="cursor:hand"/>
</td>
</tr>
<tr>
<td align="center" height="20">初始页面</td>
<td colspan="3">
<html:text property="indexUrl" readonly="false" style="width:100%" styleClass="inputBackGround"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
<html:hidden property="method"/>
<html:hidden property="fgId"/>
<html:hidden property="funcSeq"/>
<html:hidden property="fatherUuid"/>
<html:hidden property="isSubFunction"/>
<html:hidden property="zzCreateUser"/>
<html:hidden property="fd_ZzCreateDate"/>
<html:hidden property="zzCurState"/>
<html:hidden property="fd_ZzCurStateSetDate"/>
<html:hidden property="zzRemoveUser"/>
<html:hidden property="fd_ZzRemoveDate"/>
<input type="hidden" name="moduleId" value="<bean:write name="moduleId" scope="request"/>"/>
<input type="hidden" name="tempStr" value=""/>
<hr />
<br />
<table border="0" cellpadding="1" cellspacing="0" width="100%" id="detailTbl">
<tr align="center">
<td class="subTitle" width="10%" height="20">序号</td>
<td class="subTitle" width="50%" height="20">Action类名</td>
<td class="subTitle" width="30%" height="20">Action方法名</td>
<td class="subTitle" width="10%" height="20">删除</td>
</tr>
<logic:notEmpty name="actfrmTopsSystemFunction" property="subFunctionList" scope="request">
<logic:iterate id="subObj" name="actfrmTopsSystemFunction" property="subFunctionList" indexId="index">
<tr align="center">
<td height="20"><%=index.intValue()+1%></td>
<td>
<html:select name="subObj" property="actionClassName" onchange="actionNameChange(this)" styleClass="inputBackGround" style="width:100%">
<html:option value="">--请选择Action类名--</html:option>
<html:options name="actionList"/>
</html:select>
</td>
<td>
<html:select name="subObj" property="actionFunctionName" styleClass="inputBackGround" style="width:100%">
<html:option value="">--请选择Action方法名--</html:option>
<html:options name="subObj" property="tempList"/>
</html:select>
</td>
<td><a onclick="deleteRow(this)" style="cursor:hand" title="删除">删除</a></td>
</tr>
</logic:iterate>
</logic:notEmpty>
</table>
</html:form>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -