@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <title></title>
    <script language="javascript" type="text/javascript">
        function initView() {
            var str = "";
            $("[name='c1'][checked]").each(function () {
                str += $(this).attr("Info") + "<br />";
            })
            $("#UserRoleRela_MidTree .InfoItems").html("");
            $("#UserRoleRela_MidTree .InfoItems").html(str);
        }
        $("[name='c1']").click(function () {
            if ($(this).attr("checked") != "checked") {
                $(this).removeAttr("checked");
            } else {
                $(this).attr('checked', 'checked');
            }
            initView();
        })
        /*
        * 带文件上传的ajax表单提交
        */
        function iframeCallbackTest(form, callback) {
            var $form = $(form), $iframe = $("#callbackframe");
            if (!$form.valid()) { return false; }

            if ($iframe.size() == 0) {
                $iframe = $("<iframe id='callbackframe' name='callbackframe' src='about:blank' style='display:none'></iframe>").appendTo("body");
            }
            if (!form.ajax) {
                $form.append('<input type="hidden" name="ajax" value="1" />');
            }
            form.target = "callbackframe";

            _iframeResponse($iframe[0], callback || navTabAjaxDoneEdit);
        }
        /*
        * 处理结果的回调
        */
        function navTabAjaxDoneEdit(json) {
            ajaxDoneEdit(json);
            //json = window.JSON.parse(json.toString().replace('<pre>', '').replace('</pre>', ''));
            if (json.statusCode == DWZ.statusCode.ok) {
                if (json.navTabId) { //把指定navTab页面标记为需要“重新载入”。注意navTabId不能是当前navTab页面的
                    navTab.reloadFlag(json.navTabId);
                } else { //重新载入当前navTab页面
                    navTabPageBreak({}, json.rel);
                }
                if ("closeCurrent" == json.callbackType) {
                    setTimeout(function () { navTab.closeCurrentTab(json.navTabId); }, 100);
                } else if ("forward" == json.callbackType) {
                    navTab.reload(json.forwardUrl);
                } else if ("forwardConfirm" == json.callbackType) {
                    alertMsg.confirm(json.confirmMsg || DWZ.msg("forwardConfirmMsg"), {
                        okCall: function () {
                            navTab.reload(json.forwardUrl);
                        }
                    });
                } else {
                    navTab.getCurrentPanel().find(":input[defaultValue]").each(function () {
                        var defaultVal = $(this).attr("defaultValue");
                        $(this).val(defaultVal);
                    });
                }
            }
        }
        /*
        * 处理结果的回调
        */
        function ajaxDoneEdit(json) {
            // 添加格式处理
            //json = window.JSON.parse(json.toString().replace('<pre>', '').replace('</pre>', ''));
            if (json.statusCode === undefined && json.message === undefined) { // for iframeCallback
                if (alertMsg) return alertMsg.error(json);
                else return alert(json);
            }
            if (json.statusCode == DWZ.statusCode.error) {
                if (json.message && alertMsg) alertMsg.error(json.message);
            } else if (json.statusCode == DWZ.statusCode.timeout) {
                if (alertMsg) alertMsg.error(json.message || DWZ.msg("sessionTimout"), { okCall: DWZ.loadLogin });
                else DWZ.loadLogin();
            } else {
                if (json.message && alertMsg) {
                    var message = json.message.toString().split('|');
                    alertMsg.correct(message[0]);
                    if (message.length > 1) {
                        //$.pdialog.reload("/Manage/User/Edit?Action=Edit&F_Id=" + message[1] + "&F_TypeId=" + $("#User_TypeId").html(), "", "UserEditPage");
                    }
                }
            }
        }
        /*
        * 重新载入页面
        */
        function reloadPage() {
            //$.pdialog.reload('/Manage/User/Edit?Action=Add&F_TypeId=' + $("#User_TypeId").html(), '', 'UserEditPage');
        }
    </script>
</head>
<body>
    <form method="post" id="NewsEdit" action="/Manage/User/Action_UserRoleRela_Config?F_UserId=@Request.QueryString["F_UserId"].ToString()" class="pageForm required-validate"
    onsubmit="return iframeCallbackTest(this)">
    <div class="tabs" style="margin-bottom:5px;">
        <div id="UserRoleRela_tabsContent" class="tabsContent" style="padding: 0px; border-style: none;">
            <div id="layout">
                <div id="UserRoleRela_sidebar_sMids" class="sidebar_sMid" layoutH="8" style="float: left;
                    width: 24px; height: 100%; display: none; z-index: 21; border: 1px solid #B8D0D6;">
                    <div style="background: none repeat scroll 0 0 #EFF5F6;">
                        <div id="Page_sidebar_sMid" class="toggleCollapse" style="background: none repeat scroll 0 0 transparent;
                            border: 0 none;">
                            <div style="background-position: -2px -147px; border: 0 none; width: 21px;">
                            </div>
                        </div>
                    </div>
                </div>
                @Html.Raw(Html.WebRela_Config(ViewData["ConfigInfo"] as List<RelaInfo>))
            </div>
        </div>
    </div>
    <div class="formBar" style="border-width: 1px;">
        <label style="float: left">
            <input type="checkbox" class="checkboxCtrl" group="c1"  />全选</label>
        <ul>
            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="checkboxCtrl" group="c1" selecttype="invert">
                            反选</button></div>
                </div>
            </li>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">
                            提交</button></div>
                </div>
            </li>
        </ul>
    </div>
    </form>
</body>
</html>
