<%@ page language="C#" autoeventwireup="true" inherits="ims.web.roles, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="roles">
<head runat="server">
    <title>系统中的所有角色</title><meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="curRoleName" runat="server" />
    <asp:ScriptManager ID="s1" runat="server" EnablePageMethods="true" OnAsyncPostBackError="AsyncError" />
    <div class="menu" id="menu_obj">
        <a accesskey="R" href="#" runat="server" onserverclick="ShowAttributes" id="showAttributes">权限 　　　Alt+R</a>
        <a accesskey="N" href="#" onclick="return renameRole()">重命名　　 Alt+N</a>
        <a accesskey="D" href="#" onclick="return del();">删除 　　　Alt+D</a>
        <div></div>
        <a accesskey="L" href="#" onclick="return listUsers();">列出用户　 Alt+L</a>
        <div></div>
        <a href="#" id="anony" onclick="return What('anonyUser')">什么是匿名用户？</a>
    </div>

    <div class="menu" id="menu_body">
        <a accesskey="N" href="#" onclick="return createRole();">添加角色　 Alt+N</a>
        <a accesskey="U" href="#" onclick="location='users.aspx';">用户管理　 Alt+U</a>
   </div>

    <ims:Pop runat="server" ID="attr" OnOkClick="saveAttributes" OnClientUpdated="setReadLevel();" HideOnOkClientClick="false" Width="430" HelpSubject="power" CustomCss="noline" ShowProgress="false">
    <ContentTemplate>
        <fieldset class="mbottom_m"><legend>系统权限</legend>
            <div class="padbox">
                <asp:CheckBox ID="cbSysAdmin" Text="系统管理" runat="server" AutoPostBack="true" OnCheckedChanged="cbSysAdmin_changed" />
                <asp:CheckBox ID="cbTempletAdmin" Text="创建模板" runat="server" />
                <asp:CheckBox ID="cbOrderAdmin" Text="订单管理" runat="server" />
            </div>
        </fieldset>
        <fieldset class="mbottom_m" runat="server" id="commPower"><legend>沟通权限</legend>
            <ul>
                <li runat="server" id="infoPower">
                    <%= ims.Sys.InfoCenterText %>：<asp:CheckBox ID="cbPublish" Text="发布" runat="server" /><asp:CheckBox ID="cbRead" Text="浏览" runat="server" /><span runat="server" id="infoReadLevel"> - 权限级别：<asp:DropDownList runat="server" ID="ddlInfoLevel"></asp:DropDownList> </span><asp:CheckBox ID="cbComment" Text="评论" runat="server" /><asp:CheckBox ID="cbAdmin" Text="管理" runat="server" />
                </li>
                <li runat="server" id="mailPower">
                    邮件权限：<asp:CheckBox ID="cbMailSend" Text="允许发送" runat="server" /><span runat="server" id="spanMailBatch"><asp:CheckBox ID="cbMailBatchSend" Text="允许群发" runat="server" /></span>
                </li>
                <li runat="server" id="smsPower">
                    短信权限：<asp:CheckBox ID="cbSend" Text="允许发送" runat="server" /><span runat="server" id="spanBatch"><asp:CheckBox ID="cbBatchSend" Text="允许群发" runat="server" /></span><span class="hide"><asp:CheckBox ID="cbReceive" Text="允许接收" runat="server" /></span>
                </li>
                <li runat="server" id="msgPower">
                    消息权限：<asp:CheckBox ID="cbMsgSend" Text="允许发送" runat="server" /><span runat="server" id="spanMsgBatch"><asp:CheckBox ID="cbMsgBatchSend" Text="允许群发" runat="server" /></span>
                </li>
                <li runat="server" id="wxPower">
                    微信权限：<asp:CheckBox ID="cbWxSend" Text="允许发送" runat="server" /><span runat="server" id="spanWxBatch"><asp:CheckBox ID="cbWxBatchSend" Text="允许群发" runat="server" /></span>
                </li>
            </ul>
        </fieldset>
        <fieldset runat="server" id="tPowers"><legend>模板权限</legend>
            <div class="padcenter"><asp:LinkButton runat="server" ID="lbShow" OnClick="ShowTempltPowers" CssClass="u" Text="查看模板权限" /></div>
        </fieldset>
        <div class="info_btm" runat="server" id="info">请在<a href="templets.aspx" target="_self">设计中心</a>模板右键菜单中点"权限"来设置模板权限！</div>
    </ContentTemplate>
    </ims:Pop>
    <ims:Pop runat="server" ID="tps" Title="模板权限" Width="624" CustomCss="noline" ShowOkButton="false" HelpSubject="power" CanelButtonText="关闭">
        <ContentTemplate>
            <asp:PlaceHolder runat="server" ID="phPowers"></asp:PlaceHolder>
        </ContentTemplate>
    </ims:Pop>
    <asp:UpdatePanel ID="objsDiv" runat="server" ChildrenAsTriggers="false" UpdateMode="conditional" RenderMode="Block" OnPreRender="RolesPreRender">
    <ContentTemplate>
        <div class="obj role_locked" title="匿名用户，指所有未登录的用户" runat="server" id="anonyRole"><div></div><span>匿名用户</span></div>
        <asp:PlaceHolder runat="server" ID="phRoles"></asp:PlaceHolder>
    </ContentTemplate>
    </asp:UpdatePanel>
    <script src="js/comm.js"></script><script src="js/roles.js"></script>
    </form>
</body>
</html>