<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="sysAdminGroup_Add.aspx.cs" Inherits="JRAPI.Admin.Systematic.sysAdminGroup_Add" %>
<%@ Register Src="../Controls/SubPageTop.ascx" TagName="SubPageTop" TagPrefix="uc1" %>
<uc1:SubPageTop ID="SubPageTop1" runat="server" />
<body>
<style type="text/css">
	html{_overflow-y:scroll}
</style>
    <script src="../statics/js/jquery.treetable.js" type="text/javascript"></script>
    <link href="../statics/css/jquery.treeTable.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
            $(function () {
                $("#tb_role").treeTable({
                    indent: 20
                });
                SwapTab('setting', 'on', '', 2, 1);
                $.formValidator.initConfig({ formid: "myform", autotip: true, onerror: function (msg, obj) { window.top.art.dialog({ content: msg, lock: true, width: '200', height: '50' }, function () { this.close(); $(obj).focus(); }) } });
                $("#txtGroupName").formValidator({ onshow: "请输入管理组名称", onfocus: "请输入管理组名称" }).inputValidator({ min: 3, max: 20, onerror: "请输入管理组名称" });
            })
            function checknode(obj) {
                var chk = $("input[type='checkbox']");
                var count = chk.length;
                var num = chk.index(obj);
                var level_top = level_bottom = chk.eq(num).attr('level')
                for (var i = num; i >= 0; i--) {
                    var le = chk.eq(i).attr('level');
                    if (eval(le) < eval(level_top)) {
                        chk.eq(i).attr("checked", true);
                        var level_top = level_top - 1;
                    }
                }
                for (var j = num + 1; j < count; j++) {
                    var le = chk.eq(j).attr('level');
                    if (chk.eq(num).attr("checked") == true) {
                        if (eval(le) > eval(level_bottom)) chk.eq(j).attr("checked", true);
                        else if (eval(le) == eval(level_bottom)) break;
                    }
                    else {
                        if (eval(le) > eval(level_bottom)) chk.eq(j).attr("checked", false);
                        else if (eval(le) == eval(level_bottom)) break;
                    }
                }
            }
//-->
</script>
<form method="post" runat="server" id="myform" >
<div class="pad-10">
<div class="col-tab">
<ul class="tabBut cu-li">
            <li id="tab_setting_1" class="on" onclick="SwapTab('setting','on','',2,1);">基本信息</li>
            <li id="tab_setting_2" onclick="SwapTab('setting','on','',2,2);">权限设置</li>

</ul>
<div id="div_setting_1" class="contentList pad-10">
<table width="100%"  class="table_form">
  <tr>
    <th width="120">管理组名称</th>
    <td class="y-bg"><asp:TextBox id="txtGroupName" runat="server" CssClass="input-text"></asp:TextBox></td>
  </tr>
  <tr>
    <th width="120">超级管理组</th>
    <td class="y-bg"> <asp:CheckBox ID="cboxAdministrator" runat="server" /> 超级管理组据有所有权限,请谨慎赋予</td>
  </tr>
  <tr>
    <th width="120">管理组备注</th>
    <td class="y-bg"><asp:TextBox id="txtGroupRemark" runat="server" CssClass="input-text" Width="400px" Height="50px" 
                                    TextMode="MultiLine"></asp:TextBox>
  </tr> 
</table>
</div>
<div id="div_setting_2" class="contentList pad-10 hidden">
<table width="100%" cellspacing="0" class="search-form">
    <tbody>
		<tr>
		<td>
		<div class="explain-col">超级管理此设置不生效
	    </div>
		</td>
		</tr>
    </tbody>
</table>
	<table width="100%"  class="table_form" id="tb_role">
<asp:Literal ID="liMenuList" runat="server"></asp:Literal>
</table>
</div>



<div class="bk15"></div>
    <asp:Button ID="dosubmit" runat="server" Text="提交" CssClass="button" 
        onclick="dosubmit_Click" />
</div>
</div>
</form>
</body>
<script type="text/javascript">

    function SwapTab(name, cls_show, cls_hide, cnt, cur) {
        for (i = 1; i <= cnt; i++) {
            if (i == cur) {
                $('#div_' + name + '_' + i).show();
                $('#tab_' + name + '_' + i).attr('class', cls_show);
            } else {
                $('#div_' + name + '_' + i).hide();
                $('#tab_' + name + '_' + i).attr('class', cls_hide);
            }
        }
    }

    function showsmtp(obj, hiddenid) {
        hiddenid = hiddenid ? hiddenid : 'smtpcfg';
        var status = $(obj).val();
        if (status == 1) $("#" + hiddenid).show();
        else $("#" + hiddenid).hide();
    }
    function test_mail() {
        var mail_type = $('input[checkbox=mail_type][checked]').val();
        var mail_auth = $('input[checkbox=mail_auth][checked]').val();
        $.post('?m=admin&c=setting&a=public_test_mail&mail_to=' + $('#mail_to').val(), { mail_type: mail_type, mail_server: $('#mail_server').val(), mail_port: $('#mail_port').val(), mail_user: $('#mail_user').val(), mail_password: $('#mail_password').val(), mail_auth: mail_auth, mail_from: $('#mail_from').val() }, function (data) {
            alert(data);
        });
    }
    $(function () {
        $(".NumDecText").keyup(function () {
            $(this).val($(this).val().replace(/[^0-9.]/g, ''));
        }).bind("paste", function () {
            $(this).val($(this).val().replace(/[^0-9.]/g, ''));
        }).css("ime-mode", "disabled");
    })
</script>
</html> 