📄 addpermission.jsp
字号:
<%@ page language="java" import="java.util.*,cn.jx.ecjtu.oa.ps.pojo.*,
cn.jx.ecjtu.oa.services.Node" pageEncoding="gbk"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>权限设置</title>
<link href="../../common/defaultFa/css/all.css" rel="stylesheet" type="text/css" />
<link href="../../common/defaultFa/css/css.css" rel="stylesheet" type="text/css" />
<link rel="StyleSheet" href="../../common/defaultFa/css/dtree.css" type="text/css" />
<script type="text/javascript" src="../../common/js/dtree.js"></script>
<script type="text/javascript">
function showTree(){
document.getElementById("dirTree").style.display="block";
}
function choose(path){
document.ptree.resource.value=path;
document.getElementById("dirTree").style.display="none";
}
function Trim(s){
s = s.replace(/^\s*/g,"")
s = s.replace(/\s*$/g,"")
return s;
}
function getResource(source){
document.ptree.resource.value=source;
}
function check(){
var resource = document.ptree.resource.value;
var permissionName = document.ptree.permissionName.value;
if(permissionName==null||Trim(permissionName)==""){
alert('请输入权限名');
return false;
}
if(resource==null||resource==""){
alert('请选择权限');
return false;
}
return true;
}
</script>
</head>
<body style="overflow-y:auto">
<table border="0" align="center" cellpadding="0" cellspacing="0" class="tb_title">
<tr>
<th align="left" valign="middle">权限设置</th>
<td> </td>
</tr>
</table>
<form action="addpermission" method="post" name="ptree" onsubmit="return check()">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb_form">
<tr>
<td width="120" height="22" align="right">权限名:</td>
<td><input name="permissionName" type="text" style="width:100px" />
<span id="errorname" ></span>
</td>
</tr>
<tr>
<td width="120" height="22" align="right">权限目录:</td>
<td>
<input name="resource" value="" readOnly="true" type="text" style="width:100px" onclick="showTree()"/>
<table border="0" width="100%">
<tbody id="dirTree" style="display:none;"><tr><td>
<script language="javascript">
var d=new dTree('d');
<c:forEach items="${filelist}" var="file" varStatus="sort">
<c:choose>
<c:when test="${sort.index==0}">
d.add('${file.id}','${file.parentId}','${file.name}');
</c:when>
<c:otherwise>
d.add('${file.id}','${file.parentId}','${file.name}',"javascript:getResource('${file.resource}')");
</c:otherwise>
</c:choose>
</c:forEach>
document.write(d);
</script>
</td></tr></tbody>
</table>
</td>
</tr>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="0" class="tb_foot">
<tr>
<td align="center">
<input type="reset" value="重置">
<input type="button" name="return" value=" 返 回 " onClick="javascript:location.href='findAllPermission';">
<input type="submit" name="save" value=" 保 存 " ></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -