<%@ page language="C#" autoeventwireup="true" inherits="ims.web.editLayout, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!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" id="editLayout">
<head runat="server"><title></title></head>
<body class="waiting" onbeforeunload="confirmExit();">
    <div class="hide"><img src="images/loading.gif" />正在生成，请稍候 …</div>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="sm" runat="server" EnablePageMethods="true">
            <Scripts><asp:ScriptReference Name="MicrosoftAjax.js" ScriptMode="Auto" Path="~/js/MsAjax.js"/><asp:ScriptReference Name="MicrosoftAjaxWebForms.js" ScriptMode="Auto" Path="~/js/MsAjax.js"/></Scripts>
        </asp:ScriptManager>
        <asp:HiddenField runat="server" ID="hfName" />
        <div id="body">
            <table cellspacing="0"><tr>
                <td valign="bottom">
                    <span id="layoutTitle" runat="server"></span>
                    <asp:UpdatePanel ID="layoutList" RenderMode="Inline" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
                        <ContentTemplate><span runat="server" id="spanddl">：<asp:DropDownList runat="server" ID="ddlLayouts" AutoPostBack="true" onfocus="setOldValue();" onchange="return layoutsChanged();" OnSelectedIndexChanged="ddlLayoutsChanged"></asp:DropDownList></span></ContentTemplate>
                    </asp:UpdatePanel>
                </td>
            </tr></table>
            <asp:UpdatePanel ID="content" RenderMode="Block" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
                <ContentTemplate></ContentTemplate>
            </asp:UpdatePanel>
            <div class="mtop_s" id="divMode">
                <asp:RadioButton runat="server" ID="rbEdit" GroupName="mode" Text="编辑模式" Checked="true" onclick="changeMode();" />
                <asp:RadioButton runat="server" ID="rbDrag" GroupName="mode" Text="拖拽模式" onclick="changeMode();" />
            </div>
            <asp:UpdatePanel ID="upBtns" RenderMode="Block" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Button ID="btnSave" runat="server" OnClientClick="return doValidate();" AccessKey="S" ToolTip="保存当前的表单版式&#13;快捷键：Alt+S" Text="保存" OnClick="Save" CssClass="btn" />
                    <asp:Button ID="btnAdd" runat="server" OnClientClick="return toAddNew();" Width="66" Text="添加版式" OnClick="AddNew" CssClass="btn" />
                    <input type="button" runat="server" id="btnManage" value="管理版式" onserverclick="toManage" class="btn" />
                    <input type="button" accesskey="B" onclick="toBack();" value="返回" class="btn" />
                    <input type="button" value="帮助" class="btn" onclick="showHelp();" />
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <div id="rightBar">
            <ul>
	            <li><a href="#divFields">字段</a></li>
	            <li><a href="#tabTemplets">表</a></li>
            </ul>
            <asp:UpdatePanel ID="divFields" RenderMode="Block" runat="server" UpdateMode="Conditional">
                <ContentTemplate></ContentTemplate>
            </asp:UpdatePanel>
            <asp:UpdatePanel ID="tabTemplets" RenderMode="Block" runat="server" UpdateMode="Conditional">
                <ContentTemplate></ContentTemplate>
            </asp:UpdatePanel>
        </div>

        <ims:Pop runat="server" ID="manage" Title="管理版式" ShowOkButton="false" OnClientUpdated="setBtnSave();" CanelButtonText="关闭" Width="420" CustomCss="noline" ShowProgress="false">
            <ContentTemplate>
                <table class="normal" id="layouts" cellspacing="1">
                    <tr><th>版 式</th><th style="width:60px">设为默认</th><th style="width:32px">更名</th><th style="width:32px">编辑</th><th style="width:32px">删除</th></tr>
                    <asp:PlaceHolder runat="server" ID="phLayouts"></asp:PlaceHolder>
                </table>
                <asp:Button runat="server" ID="btnOpera" OnClick="OperaLayout" CssClass="hide" />
            </ContentTemplate>
        </ims:Pop>
    <script src="js/comm.js"></script><script src="js/editLayout.js"></script>
    </form>
</body>
</html>