<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common/common.jsp" %>
<title>运营管理系统</title>
<script type="text/javascript" src="${staticPath}js/system/role.js"></script>
</head>
<body>
<%@ include file="../common/head.jsp" %>
<div class="screen main">
	<%@ include file="../common/left.jsp" %>
	<div class="main-content relative">
		<div class="main-title">新增角色</div>
		<div class="table-content">
			<form id="addRoleForm">
			<ul class="ulFrm">
				<li>
					<span class="label labelW80 labelRight">角色名称：</span>
					<input type="text" class="text" name="name" id="name" size="40" value="" />
				</li>
				<li>
					<span class="label labelW80 labelRight">角色编码：</span>
					<input type="text" class="text" name="code" id="code" size="40" value="" />
				</li>
				<li>
					<span class="label labelW80 labelRight">角色描述：</span>
					<textarea rows="5"  class="textarea" name="info" id="info" cols="42"></textarea>
				</li>
				<li>
					<span class="label labelW80 labelRight alignTop">菜单权限：</span>
					<ul class="auth inline">
						<c:forEach var="first" items="${permissionList}">
							<li>
								<input type="checkbox" name="permissionId" value="${first.permissionId }" class="parent checkbox {click:subAll}" /><label>${first.name}</label>
								<div class="sub_auth">
									<c:forEach var="second" items="${first.subPerms}">
										<input type="checkbox" name="permissionId" value="${second.permissionId }" class="checkbox {click:subchildren} "><label>${second.name}</label>
									</c:forEach>
								</div>
							</li>	
						</c:forEach>
					</ul>
				</li>
				<li>
					<span class="label labelW80 labelRight alignTop">功能权限：</span>
					<div class="auth inline">
					<c:forEach var="func" items="${funcList}">
				    	<li>
							<input type="checkbox" class="parent checkbox {click:subAll}" name="permissionId" value=""/><label>${func.name}</label>
							<div class="sub_auth">
								<c:forEach var="second" items="${func.subPerms}">
									<input type="checkbox" name="permissionId" value="${second.permissionId }" class="checkbox {click:subchildren} "><label>${second.name}</label>
								</c:forEach>
							</div>
						</li>	
					</c:forEach>
					</ul>
				</li>
			</ul>
			</form>
		</div>
		<div class="btn-position">
			<div class="rFloat buttons">
				<div class="search-btn" onclick="checkRoleAdd();">提交</div>
			</div>
		</div>
	</div>
	<div class="clear"></div>
</div>
<%@ include file="../common/footer.jsp" %>
<script type="text/javascript">
$(function(){
	$.resetText();
	$.checkbox();
});
</script>
</body>
</html>