<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>修改角色</title>
|
|
[#include "/business/pages/include/static.html" /]
|
</head>
|
<body class="edit_txt_body" style="padding:5px 10px 5px 10px;">
|
|
<script type="text/javascript">
|
function _onFormSubmit(){
|
if(!window.top.openConfirm('确定要重新分配人员吗?')) return;
|
document.getElementById("myform").target = window.top.openDialog("1","操作",
|
{},
|
{"width":40,"height":40},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
|
$("#myform").submit();
|
}
|
|
function onUserClick(userid){
|
window.top.openDialog(2,40,40,'人员角色',$.http.getAbsoluteUrl('userInRole.html?userid='+userid),{
|
buttons:[{text:"提交",iconCls:'icon-add',_handler:"_onFormSubmit()"},{text:"关闭",_handler:"closeWin(2)"}]
|
});
|
}
|
</script>
|
|
<form name="myform" action="" method="post" id="myform">
|
<table class="edit_layout" width="99%">
|
[#list ROLE_LIST as d]
|
<tr><td colspan="2" ><input type="checkbox" name="roleid" id="${d.ID}" value="${d.ID}" [#if info[d.ID]??]checked[/#if] /><label style="margin-left:5px;">${d.ROLENAME}</label></td>
|
</tr>
|
[#if d.groupList ?? && d.groupList?size > 0]
|
[#list d.groupList as group]
|
<tr><td > </td><td ><input type="checkbox" name="groupid" class="${d.ID}" value="${group.ID}" [#if group.check??]checked[/#if] /><label style="margin-left:5px;">${group.GROUPNAME}</label></td>
|
</tr>
|
[/#list]
|
[/#if]
|
[/#list]
|
</table>
|
</form>
|
|
|
|
<script type="text/javascript">
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
_onFormSubmit();
|
}
|
}
|
$(function(){
|
$("input[name=roleid]").click(function(){
|
if(!$(this).is(":checked")){
|
var roleid = $(this).val();
|
$("."+roleid).attr("checked",false);
|
}
|
});
|
$("input[name=groupid]").click(function(){
|
if($(this).is(":checked")){
|
var roleid = $(this).attr("class");
|
$("#"+roleid).attr("checked",true);
|
}
|
});
|
});
|
|
</script>
|
|
|
</body>
|
</html>
|