<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="rolemanager.aspx.cs" Inherits="School_Web.admin.v3basic.rolemanager" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<!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/green/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">
<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  language="javascript" src="/editor/xheditor.js" type="text/javascript"></script>
    <script type="text/javascript" src="/editor/xheditor_lang/zh-cn.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);
            //alert();
            var idlist = "";
            for (var i = 0; i < nodes.length; i++) {
                idlist += nodes[i].id + "#";
            }
            $("#txtRoleSplit").val(idlist);
            //alert(idlist);
            if (idlist == "") {
                alert("对不起，您必须在右侧选择此角色具有的菜单后才可以提交！");
                return false;
            }
            else {
                return true;
            }
        }



    </script>


</head>
<body onload="win_onLoad();">
<form id="form1" runat="server">
  <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>
  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate> </ContentTemplate>
  </asp:UpdatePanel>
  <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
    <ProgressTemplate>
      <div id="divLoading"> <img src="/admin/style/default/images/loading.gif" /> </div>
    </ProgressTemplate>
  </asp:UpdateProgress>
  <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" width="100px"> 角色编号</td>
                    <td class="tabmanagertr"><asp:TextBox ID="txtRoleID" runat="server" ToolTip="角色编号" Text="" CssClass="1"></asp:TextBox></td>
                  </tr>
                  <tr class="tablisttr">
                    <td class="tablisttitle"> 角色名称</td>
                    <td class="tabmanagertr"><asp:TextBox ID="txtRoleName" 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" ToolTip="开启状态">
                                    <asp:ListItem Value="SysIsUsed" Text="codeno"></asp:ListItem>
                                </asp:DropDownList></td>
                  </tr>
                   
                  <tr class="tablisttr">
                    <td class="tablisttitle"> 显示顺序</td>
                    <td class="tabmanagertr"><asp:TextBox ID="txtShowID" runat="server" CssClass="2" ToolTip="显示顺序">0</asp:TextBox></td>
                  </tr>
                   
                  <tr class="tablisttr">
                    <td class="tablisttitle"> 角色描述</td>
                    <td class="tabmanagertr"><asp:TextBox ID="txtRoleInfo" runat="server" TextMode="MultiLine" Height="200px" Width="98%"
                        class="xheditor {upLinkUrl:s_upLinkUrl,upLinkExt:s_upLinkExt,upImgUrl:s_upLinkUrl,upImgExt:s_upImgExt,upFlashUrl:s_upLinkUrl,upFlashExt:s_upFlashExt,upMediaUrl:s_upLinkUrl,upMediaExt:s_upMediaExt}"></asp:TextBox>                    </td>
                  </tr>
                 
                  <tr class="tablisttr">
                    <td class="tablisttitle">角色说明</td>
                    <td class="tabmanagertr">
                    <div style="height:150px;">

                         <div class="divInfo">
                            <span class="usHelpMessage"> * 注意事项： 
                                <br />
                            1、 请在右侧选择该角色可以操作的菜单；
                            <br />2、选择哪些菜单，此角色的用户就具有此菜单的功能；
                                  <br />3、是否显示只针对登陆页面好用，显示顺序也是针对登陆页面；
                           


                            </span>  
                        </div>

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


                    </div></td>
                  </tr>
                </table></td>
              <td  valign="top">
              
              <div class="divSearch">
              <div style="width:360px; height:502px; 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>
