<%@ page language="C#" autoeventwireup="true" inherits="disk__admin_manager_disk_user_disk_user_setAS, App_Web_ym0y0jol" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>用户额外权限设置</title>
    
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/easy_ui/jquery.min.js?v=1.7.2")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/easy_ui/jquery.easyui.min.js?v=1.3")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/easy_ui/locale/easyui-lang-zh_CN.js?v=1.0")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/easy_ui/jquery.load.js?v=1.0")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/easy_ui/jquery.json.js?v=1.0")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/easy_ui/jquery.easyui.validtor.js?v=1.0")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/js/PageDialog.js?v=1.0")%>"></script>
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/disk/control/easy_ui/themes/gray/easyui.css?v=1.0")%>" />
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/disk/control/easy_ui/themes/icon.css?v=1.0")%>" />
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/disk/control/easy_ui/load.css?v=1.0")%>" />
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/disk/control/css/main.css?v=1.0")%>" />
        <script language="javascript" type="text/javascript">
    
    $(function(){
       $("#ayTree").tree({
            url:"disk_user_setAS.aspx?setID=<%=id %>"
            ,checkbox:true
   
       });
    });
    
  function sumbitSelect(){
 
        $.messager.confirm('确认','确定要保存选中栏目操作权限?',function(r){
             if(r){
                 load("保存中...");
                 
                var nodes = $("#ayTree").tree("getChecked");
                var list = new Array();           
                for(var i in nodes){
                  if(nodes[i].attributes.type=="child")
                    list.push(nodes[i].id);
                }
        
                 $.ajax({
                    type: "POST",
                    url:"disk_user_setAS.aspx",
                    dataType:"json",
                    data: {"list": list.join(","),"key":"<%=id %>"}, 
                    success: function(data){
                      unload();
     
                      if(data.state==1){
                            alert(data.data);
                            window.opener.reload("last");
                            window.close();
                      }else{
                         $.messager.alert('错误',data.data,'message');
                      }
              
                   }
                });
             }
        });
    }

    
        </script>
</head>
<body>
    <h3>额外权限设置</h3>

        
    <div>
        如果你希望给一个用户添加一个权限，而不是通过修改角色权限，您可以在这里设置
        <br />
        <input id="btnSubmit" type="button" value="保存设置" onclick='sumbitSelect()' />
        <ul id="ayTree" class="easyui-tree">	  
    
    
        </ul>
        
        
    </div>
    
</body>
</html>
