<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="rolemanager.aspx.cs" Inherits="Us.Web.admin.basic.rolemanager" %>

<!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 id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
<title>系统角色</title>
<asp:Literal ID="litregscript" runat="server" Text=""></asp:Literal>
<link href="../style/default/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="/admin/js/System.js" type="text/javascript"></script>
<script language="javascript" src="/admin/js/SystemTree.js" type="text/javascript"></script>

<link rel="stylesheet" href="../mtree/css/zTreeStyle/zTreeStyle.css" type="text/css">

   <%=ImportScriptStr %>


<script type="text/javascript" src="../mtree/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../mtree/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="../mtree/js/jquery.ztree.excheck-3.5.js"></script>
<script type="text/javascript" src="../mtree/js/jquery.ztree.exedit-3.5.js"></script>

    


    <SCRIPT type="text/javascript">
		<!--
    var setting = {
        check: {
            enable: true
        },
        view: {
            dblClickExpand: false,
            showLine: true
        },
        data: {
            simpleData: {
                enable: true
            }
        }
    ,
        callback: {
            onClick: onClick
        }
    };

   <% =TreeHTML %>

        function onClick(e, treeId, treeNode) {
            var zTree = $.fn.zTree.getZTreeObj("treeDemo");
            zTree.expandNode(treeNode);
        }

        $(document).ready(function () {
            $.fn.zTree.init($("#treeDemo"), setting, zNodes);
            //$("#callbackTrigger").bind("change", {}, setTrigger);
        });
        //-->
	</SCRIPT>

    <script language="javascript" type="text/javascript">

        function jscheckAll() {
            var treeObj = $.fn.zTree.getZTreeObj("treeDemo");
            var nodes = treeObj.getCheckedNodes(true);
            var idlist = "";
            for (var i = 0; i < nodes.length; i++) {
                idlist += nodes[i].id+"#";
            }
            $("#txtRMenuID").val(idlist);
            //alert(idlist);
            if (idlist == "") {
                alert("对不起，您必须在右侧选择此角色具有的菜单后才可以提交！");
                return false;
            }
            else {
                return true;
            }
        }



    </script>


</head>
<body onload="win_onLoad();">
<form id="form1" runat="server">
  
  <div id="tbMain">
    <div class="divTbg">
      <div class="divTbgL"> </div>
      <div class="divTbgInfo">
        <div class="divTbgTitle"> 系统角色管理</div>
      </div>
    </div>
    <div class="divTbgF"> </div>
    <div class="divTNavBG" id="topURL">
      <ul id="topURLul">
        <li class="divURLed" id="div1">
          <div> <img src="../style/default/images/mini_icons_046.gif" width="10" height="10" /> 基本信息</div>
        </li>
      </ul>
    </div>
    <div id="mypanel">
      <div class="divInfoContext">
        <div class="divInfo">
          <div class="divInfoblack">
            <div class="divInfoTopList">
              <div class="listLeft">
                <div class="navtitle"> 系统角色</div>
              </div>
            </div>
          </div>
        </div>
        <div class="divInfo">
          <table width="100%" border="0" cellspacing="0" cellpadding="5">
            <tr>
              <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" id="mainlist" >
                  <tr class="tablisttr">
                    <td class="tablisttitle"> 角色编号<span class="fStar">*</span></td>
                    <td class="tabmanagertr"><asp:TextBox ID="txtRoleID" runat="server" ToolTip="角色编号" Text="" CssClass="1"></asp:TextBox></td>
                  </tr>
                  <tr class="tablisttr">
                    <td class="tablisttitle"> 角色名称<span class="fStar">*</span></td>
                    <td class="tabmanagertr"><asp:TextBox ID="txtRName" runat="server" CssClass="1" ToolTip="角色名称"></asp:TextBox>                    </td>
                  </tr>
                   <tr class="tablisttr">
                    <td class="tablisttitle">系统角色</td>
                    <td class="tabmanagertr"><asp:DropDownList runat="server" ID="drpRState" CssClass="1" tooltip="系统角色">
                        <asp:ListItem Value="RState" Text="codeno"></asp:ListItem>
                      </asp:DropDownList></td>
                  </tr>
                  <tr class="tablisttr">
                    <td class="tablisttitle"> 角色描述</td>
                    <td class="tabmanagertr"><asp:TextBox ID="txtRInfo" runat="server" TextMode="MultiLine" Height="100px" Width="98%"></asp:TextBox>                    </td>
                  </tr>
                 
                  <tr class="tablisttr">
                    <td class="tablisttitle">角色说明</td>
                    <td class="tabmanagertr">
                    <div style="height:206px;">

                         <div class="divInfo">
                            <span class="usHelpMessage"> * 注意事项： 
                                <br />
                            1、 请在右侧选择该角色可以操作的菜单；
                            <br />2、选择哪些菜单，此角色的用户就具有此菜单的功能；
                           


                            </span>  
                        </div>

                   
                        <div style=" display:none">
                            <asp:TextBox ID="txtRMenuID" runat="server"  ToolTip="角色名称"></asp:TextBox>  </div>
                        


                    </div></td>
                  </tr>
                </table></td>
              <td width="50%" valign="top">
              
              <div class="divSearch">
              <div style="width:260px; height:400px; overflow:auto;" class="NTree">
                  <ul id="treeDemo" class="ztree"></ul>
                </div></div></td>
            </tr>
          </table>
          <div class="divSave">
            <asp:Button ID="btnSubmit" runat="server" Text="保存(S)" 
                            CssClass="SkyButtonFocus" onclick="btnSubmit_Click" />
            <asp:Button ID="btnExit" runat="server" Text="取消(C)" CssClass="SkyButtonFocus" 
                            onclick="btnSubmit_Click" />
          </div>
        </div>
      </div>
    </div>
  </div>

</form>
</body>
</html>
