<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="rolemanager.aspx.cs" Inherits="Us.Web.admin.v3basic.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>
    
    <link href="../style/default/style.css" rel="stylesheet" type="text/css" />
    <%=ImportScriptStr %>
    <script language="javascript" src="/admin/js/SystemTree.js" type="text/javascript"></script>
    <asp:Literal ID="litregscript" runat="server" Text=""></asp:Literal>
    <link rel="stylesheet" href="../mtree/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <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" type="text/javascript">
        KindEditor.ready(function (K) {
            K.create('#txtRoleInfo');
        });
    </script>

    <script type="text/javascript">
		<!--
    var setting = {
        check: {
            enable: true
        },
        view: {
            dblClickExpand: false,
            showLine: true,
            fontCss: getFontCss
        },
        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);
            ztreeinitsearch("treeDemo", "txtUserName");
            //$("#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">

        <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%"></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="">
                                        <div class="divSearch">
                                            <div id="searchBox" class="clearsearch">
                                                <p>
                                                    &nbsp;<input type="text" id="txtUserName" placeholder="搜索的菜单名称" />
                                                </p>
                                            </div>
                                        </div>
                                        <div class="divSearch" style="margin-top:5px;">
                                            <div style="width: 260px; height: 439px; overflow: auto;" class="NTree">
                                                <ul id="treeDemo" class="ztree"></ul>
                                            </div>
                                        </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>
