<%@ page language="C#" autoeventwireup="true" inherits="ims.templet, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="templet">
<head runat="server">
    <title></title><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
</head>
<body>
    <form id="form1" runat="server" defaultbutton="pop$btnOK">
        <asp:HiddenField ID="curFieldId" runat="server" />
        <asp:ScriptManager ID="s1" runat="server" EnablePageMethods="true" OnAsyncPostBackError="AsyncError">
            <CompositeScript Path="js/msajax.js" ScriptMode="Release">
                <Scripts>
                    <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" /><asp:ScriptReference Name="MicrosoftAjax.js" /><asp:ScriptReference Name="MicrosoftAjaxWebForms.js" />
                </Scripts>
            </CompositeScript>
        </asp:ScriptManager>
        <div class="pageTitle" runat="server" id="pageTitle"></div>
       <asp:UpdatePanel runat="server" ID="upRpt" UpdateMode="Conditional" RenderMode="Block" OnPreRender="AttMouseEvent">
            <ContentTemplate>
                <div runat="server" id="EmptyPrompt" visible="false" class="msgarea"></div>
                <asp:Repeater ID="rpt" runat="server" OnItemCommand="RptItemCommand" OnItemDataBound="RptItemBound">
                    <HeaderTemplate>
                        <table class="hr header">
                            <tr>
                                <td class="h">字段</td>
                                <td class="dtype">类型</td>
                                <td class="hide2">备注</td>
                                <td class="level">密级</td>
                                <td class="opr">操作</td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                    <table id="r_<%# Eval("ID") %>" class="hr">
                        <tr>
                            <td class="h"><i class="type-<%# Eval("DataType") %>"></i><%# Eval("Name") %></td>
                            <td class="dtype"><%# ims.ui.getDataTypeName((ims.Model.DataType)Eval("DataType"))%></td>
                            <td class="hide2 wrap"><asp:Literal runat="server" id="lMent"></asp:Literal></td>
                            <td class="level seclev sec<%# Eval("SecLevel") %>"></td>
                            <td class="opr">
                                <i onclick="return viewAttribu(<%# Eval("ID") %>);" title="编辑字段" class="f-write green fb1"></i>
                                <asp:LinkButton ID="ibDel" ToolTip="删除" CssClass="f-del f0" CommandName="del" runat="server"></asp:LinkButton>
                            </td>
                        </tr>
                    </table>
                    </ItemTemplate>
                </asp:Repeater>
            </ContentTemplate>
        </asp:UpdatePanel>
        <div class="footBtnArea" runat="server" id="btns">
            <input type="button" runat="server" value="添加字段" id="btnAddItem" onclick="$f('curFieldId').value=0;" onserverclick="showAttributes" class="btn" />
            <input type="button" onclick="back();" value="返回" class="btn" />
            <input type="button" onclick="return showHelp('templet');" value="帮助" class="btn" />
        </div>
        
    <ims:Pop runat="server" ID="pop" HelpSubject="templet" OnPreRender="Pop_PreRender" OnOkClick="saveAttributes" OnClientUpdated="popUpdated();" OnOkClientClick="preSave();" Width="488" CustomButtonA_Text="查看引用" CustomButtonA_OnClick="viewRefs();" HideOnOkClientClick="false" CustomCss="withline">
    <ContentTemplate>
       <table>
        <tr title="字段名称：如人的身高、体重；汽车的品牌、价格等。">
          <td>名称：　　<asp:TextBox runat="server" ID="itemName" MaxLength="255" Width="180"></asp:TextBox></td>
        </tr>
        <tr title="数据类型：要在该字段中输入的数据的类型。">
          <td>类型：　　<asp:DropDownList ID="dataType" OnSelectedIndexChanged="controlField" AutoPostBack="true" runat="server">
              </asp:DropDownList>
              <asp:DropDownList runat="server" ID="ddlSubType" onchange="$('#pop_aExer').toggleClass('hide', $(this).val()!='UserName');">
                <asp:ListItem Value="EMail">电子邮箱</asp:ListItem>
                <asp:ListItem Value="MobilePhone">电话号码</asp:ListItem>
                <asp:ListItem Value="QQ">QQ号码</asp:ListItem>
                <asp:ListItem Value="MSN">MSN帐号</asp:ListItem>
                <asp:ListItem Value="Skype">Skype帐号</asp:ListItem>
                <asp:ListItem Value="Ali">淘宝帐号</asp:ListItem>
                <asp:ListItem Value="AliChina">阿里巴巴帐号</asp:ListItem>
                <asp:ListItem Value="UserName">用户名</asp:ListItem>
                <asp:ListItem Value="UnitName">机构名</asp:ListItem>
              </asp:DropDownList>
              <asp:DropDownList runat="server" ID="ddlVars" AutoPostBack="true" OnSelectedIndexChanged="VarChanged"></asp:DropDownList>
              <asp:DropDownList runat="server" ID="ddlUnitLevel"></asp:DropDownList>
                <span id="tr_DateTimeType" runat="server" title="输入模式：设置允许输入的日期和时间格式。">，格式：<asp:DropDownList ID="ddlDateTimeType" runat="server"></asp:DropDownList></span>
              &nbsp;<a href="#" runat="server" id="aExer" onclick="return toShowExers();" title="只允许输入指定范围内的用户">限定用户范围</a>
            </td>
        </tr>
        <tr id="tr_formula" runat="server" title="公式：设置该字段的计算公式，公式的计算结果作为该字段的值。">
          <td>公式：　　<asp:TextBox runat="server" ID="formula" MaxLength="1024" ToolTip="以“[字段编号]”的形式引用模板中的数字字段"></asp:TextBox>
              <div style="padding-left:5em">
                  <asp:DropDownList runat="server" ID="computableItems"></asp:DropDownList>
                  <asp:DropDownList runat="server" ID="symbol">
                    <asp:ListItem Value="" Selected="True">-运算符-</asp:ListItem>
                    <asp:ListItem Value="+">加</asp:ListItem>
                    <asp:ListItem Value="-">减</asp:ListItem>
                    <asp:ListItem Value="*">乘</asp:ListItem>
                    <asp:ListItem Value="/">除</asp:ListItem>
                    <asp:ListItem Value="(">开括号</asp:ListItem>
                    <asp:ListItem Value=")">闭括号</asp:ListItem>
                  </asp:DropDownList><i title="查看公式用法" onclick="What('formula')" class="what"></i>
              </div>
            </td>
        </tr>
        <tr id="tr_valueType" runat="server" title="指定公式计算结果的数据类型">
          <td>结果类型：<asp:DropDownList runat="server" ID="ddlValueType" AutoPostBack="true" OnSelectedIndexChanged="ValueTypeChanged" >
            <asp:ListItem Value="Decimal" Selected="True">数字</asp:ListItem>
            <asp:ListItem Value="DateTime">日期时间</asp:ListItem>
            <asp:ListItem Value="Boolean">是/否</asp:ListItem>
            <asp:ListItem Value="String">文本</asp:ListItem>
          </asp:DropDownList></td>
        </tr>
        <tr id="tr_numformat" runat="server">
            <td>
                <fieldset><legend>数值格式</legend>
                    <div class="pad">
                    货币符号：<asp:TextBox runat="server" ID="tbCurrency" ToolTip="如果不是用于货币的数字，不必填写该项" Width="60"></asp:TextBox>，
                    单位：<asp:TextBox runat="server" ID="tbUnit" Width="59"></asp:TextBox><br />
                    小数设置：<asp:DropDownList runat="server" ID="bitsMode">
                    <asp:ListItem Value="long">固定</asp:ListItem>
                    <asp:ListItem Value="short">最多</asp:ListItem>
                </asp:DropDownList> 保留 <asp:DropDownList runat="server" ID="bits">
                    <asp:ListItem Value="0">0</asp:ListItem>
                    <asp:ListItem Value="1">1</asp:ListItem>
                    <asp:ListItem Value="2" Selected="True">2</asp:ListItem>
                    <asp:ListItem Value="3">3</asp:ListItem>
                    <asp:ListItem Value="4">4</asp:ListItem>
                    <asp:ListItem Value="5">5</asp:ListItem>
                    <asp:ListItem Value="6">6</asp:ListItem>
                    <asp:ListItem Value="7">7</asp:ListItem>
                    <asp:ListItem Value="8">8</asp:ListItem>
                    <asp:ListItem Value="9">9</asp:ListItem>
                    <asp:ListItem Value="10">10</asp:ListItem>
                </asp:DropDownList> 位小数<br />
                    <asp:CheckBox ID="cbSpecial" Text="使用" runat="server" /><asp:DropDownList runat="server" ID="ddlSpecial" onchange="$('#pop_cbSpecial').prop('checked',true);"><asp:ListItem Value="Percentage">百分比(%)</asp:ListItem><asp:ListItem Value="Progress">百分比(进度)</asp:ListItem><asp:ListItem Value="Permillage">千分比(‰)</asp:ListItem><asp:ListItem Value="ThousandthSplit">千位分隔符</asp:ListItem><asp:ListItem Value="AsMyria">以万计数</asp:ListItem></asp:DropDownList><br />
                    <asp:CheckBox ID="cbSciNotation" Text="必要时使用科学计数法" ToolTip="在数值太大或太小时使用科学计数法" runat="server" /><br />
                    <asp:CheckBox ID="cbCustom" Text="自定义格式：" runat="server" /><asp:TextBox runat="server" ID="tbCustom"></asp:TextBox><i title="查看解释" onclick="What('numberformat')" class="what"></i>
                    </div>
                </fieldset>
            </td>
        </tr>
        <tr id="tr_query" runat="server">
            <td>
            <asp:UpdatePanel ID="upQuery" runat="server" RenderMode="inline" ChildrenAsTriggers="true" OnPreRender="InitQueryZone" UpdateMode="conditional">
            <ContentTemplate>
            <fieldset><legend>查询：<asp:DropDownList ID="ddlTemplets" AutoPostBack="true" OnSelectedIndexChanged="InitByTemplet" runat="server"></asp:DropDownList></legend>
                <fieldset runat="server" id="queryCond" class="mbottom_m"><legend>条件<i title="说明" onclick="What('condlogic')" class="what condlogic"></i></legend>
                <asp:CheckBox ID="cbCond1" CssClass="cbfilter" Text="过滤器：" runat="server" onclick="setCondlogic('#pop_queryCond');" /><asp:DropDownList ID="ddlFilters"
                runat="server"></asp:DropDownList>
                <div id="d1" runat="server" class="mtop_s"><div class="fflogic"><asp:RadioButtonList runat="server" ID="rbl1" RepeatDirection="Horizontal" onclick="groupChged(this);" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem><asp:ListItem Value="AndAll" class="morelogic" title="并且满足下列条件之组合">并且(…)</asp:ListItem><asp:ListItem Value="OrAll" class="morelogic" title="或者满足下列条件之组合">或者(…)</asp:ListItem></asp:RadioButtonList> <i title="说明" onclick="What('condgroup')" class="what morelogic vmiddle"></i></div>
                <asp:CheckBox ID="cbCond2" Checked="true" runat="server" /><asp:DropDownList ID="ddlSourceFields" runat="server"></asp:DropDownList>
                    <asp:DropDownList ID="ddlCondOperators" runat="server" Width="52"></asp:DropDownList>
                    当前 <asp:DropDownList ID="ddlTargetFields" runat="server"></asp:DropDownList>
                <a runat="server" id="add1" href="#" onclick="return addCond(this);" title="添加条件"></a>
                </div>
                <div id="d2" runat="server"><asp:RadioButtonList runat="server" ID="rbl2" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList>
                <asp:CheckBox ID="cbCond3" runat="server" /><asp:DropDownList ID="ddlSourceFields3" runat="server"></asp:DropDownList>
                    <asp:DropDownList ID="ddlCondOperators3" runat="server" Width="52"></asp:DropDownList>
                    当前 <asp:DropDownList ID="ddlTargetFields3" runat="server"></asp:DropDownList>
                <a runat="server" id="add2" href="#" onclick="return addCond(this);" title="添加条件"></a>
                </div>
                <div id="d3" runat="server"><asp:RadioButtonList runat="server" ID="rbl3" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList>
                <asp:CheckBox ID="cbCond4" runat="server" /><asp:DropDownList ID="ddlSourceFields4" runat="server"></asp:DropDownList>
                    <asp:DropDownList ID="ddlCondOperators4" runat="server" Width="52"></asp:DropDownList>
                    当前 <asp:DropDownList ID="ddlTargetFields4" runat="server"></asp:DropDownList>
                <a runat="server" id="add3" href="#" onclick="return addCond(this);" title="添加条件"></a>
                </div>
                <div id="d4" runat="server"><asp:RadioButtonList runat="server" ID="rbl4" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList>
                <asp:CheckBox ID="cbCond5" runat="server" /><asp:DropDownList ID="ddlSourceFields5" runat="server"></asp:DropDownList>
                    <asp:DropDownList ID="ddlCondOperators5" runat="server" Width="52"></asp:DropDownList>
                    当前 <asp:DropDownList ID="ddlTargetFields5" runat="server"></asp:DropDownList>
                <a runat="server" id="add4" href="#" onclick="return addCond(this);" title="添加条件"></a>
                </div>
                <div id="d5" runat="server"><asp:RadioButtonList runat="server" ID="rbl5" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList>
                <asp:CheckBox ID="cbCond6" runat="server" /><asp:DropDownList ID="ddlSourceFields6" runat="server"></asp:DropDownList>
                    <asp:DropDownList ID="ddlCondOperators6" runat="server" Width="52"></asp:DropDownList>
                    当前 <asp:DropDownList ID="ddlTargetFields6" runat="server"></asp:DropDownList>
                </div>
                </fieldset>
                <fieldset runat="server" id="queryResult" class="mtop_n"><legend>取值</legend>
                <asp:RadioButton ID="rbResult1" GroupName="QueryResult" Text="" runat="server" /><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>
                <asp:DropDownList ID="ddlResultFields1" runat="server">
                </asp:DropDownList><i title="查看解释" onclick="What('queryValue')" class="what"></i><br />
                <asp:UpdatePanel ID="up" runat="server" RenderMode="Block" UpdateMode="conditional">
                <ContentTemplate>
                <asp:RadioButton ID="rbResult2" Checked="true" GroupName="QueryResult" Text="" runat="server" /><asp:DropDownList
                    ID="ddlResultFields2" runat="server" AutoPostBack="true" OnSelectedIndexChanged="setComputeFuns" OnDataBound="setComputeFuns"></asp:DropDownList> <asp:DropDownList ID="ddlCompute" runat="server">
                </asp:DropDownList>
                </ContentTemplate>
                </asp:UpdatePanel>
                <asp:RadioButton ID="rbResult3" GroupName="QueryResult" Text="数量" runat="server" />
                </fieldset>
                <div id="promptMsg" runat="server" class="padcenter gray">请选择查询源…</div>
            </fieldset>
            </ContentTemplate>
            </asp:UpdatePanel>
            </td>
        </tr>
         <tr id="tr_options" runat="server">
          <td>
              <fieldset><legend title="添加或移除备选的选项" class="middle"><span>候选项： </span><asp:CheckBox runat="server" ID="enTag" Text="彩色显示" ToolTip="将选项显示为彩色标签" onclick="updateItemStyle();"></asp:CheckBox></legend>
                <asp:UpdatePanel ID="upOptions" class="pad" runat="server" OnPreRender="RegSortable" RenderMode="Block" ChildrenAsTriggers="true" UpdateMode="conditional">
                <ContentTemplate>
                  <div id="optionsDiv" runat="server">
                      <asp:CheckBoxList OnPreRender="setHeight" ID="options" runat="server" RepeatLayout="Flow" RepeatDirection="horizontal"></asp:CheckBoxList>
                  </div>
                  <div class="mtop_m">
                      添加：<asp:TextBox ID="newItem" runat="server" Width="90" onkeydown="return enterTo(event,'pop_addItem');"></asp:TextBox>
                      <asp:Button ID="addItem" CssClass="btn sec small" runat="server" Text="添加" OnClick="AddItem" OnClientClick="updateOrder();" />
                      <asp:Button ID="removeItems" CssClass="btn sec small" runat="server" OnClick="RemoveItems" OnClientClick="updateOrder();" Text="删除选定项" />
                      <asp:Button ID="removeAll" CssClass="btn sec small" runat="server" OnClick="RemoveItems" Text="清空" />
                  </div>
                </ContentTemplate>
                </asp:UpdatePanel>
            </fieldset>
          </td>
        </tr>
        <tr id="tr_contentLen" runat="server" title="内容长度：该字段中允许输入的最大字符数。“0”或留空表示不限字数。">
          <td>长度：　　<asp:TextBox runat="server" ID="contentLen" MaxLength="15" Width="70"></asp:TextBox></td>
        </tr>
        <tr class="hide" id="tr_regex_text" runat="server" title="输入规范：用正则表达式确保所输入的数据符合规则。">
          <td>输入规范：<asp:TextBox runat="server" ID="tbReg" ToolTip="输入用于限制和验证数据的正则表达式" MaxLength="255"></asp:TextBox><i title="查看说明" onclick="What('FieldRegex')" class="what"></i></td>
        </tr>
        <tr class="hide" id="tr_note" runat="server" title="在数据输入界面显示给用户的说明文字">
          <td>输入说明：<asp:TextBox runat="server" ID="tbNote" MaxLength="255"></asp:TextBox></td>
        </tr>
        <tr id="tr_defaultVal" runat="server" title="录入时字段的初始值。支持变量或日期函数">
          <td>默认值：　<asp:TextBox runat="server" ID="defaultVal" Width="180" autocomplete="off"></asp:TextBox></td>
        </tr>
        <tr class="hide" title="保密级别：设置该字段的保密级别，以控制用户在浏览时是否可以看到其内容。">
          <td>保密级别：<asp:DropDownList ID="secLevel" runat="server"></asp:DropDownList></td>
        </tr>
         <tr id="tr_enUpdate" runat="server" title="确定在对已有记录进行编辑时，是否自动更新该变量字段的值">
          <td><asp:CheckBox runat="server" ID="updateVar" Text="编辑时更新变量值"></asp:CheckBox></td>
        </tr>
        <tr id="tr_enEditor" runat="server" title="使用编辑器：指定在编辑该字段内容时，是否使用支持格式和样式的在线编辑器。">
          <td><asp:CheckBox runat="server" ID="enEditor" Text="使用编辑器" AutoPostBack="true" OnCheckedChanged="setMutex"></asp:CheckBox></td>
        </tr>
        <tr id="tr_autoNumber" runat="server" title="编号规则：设置自动编号的编号规则。">
          <td>
              <fieldset><legend>编号组成</legend>
                  <div class="pad">
                  <asp:CheckBox runat="server" ID="cbPrefix" Text="前缀："></asp:CheckBox><asp:TextBox runat="server" ID="tbPrefix" MaxLength="110"></asp:TextBox><br />
                  <asp:CheckBox runat="server" ID="cbRandom" onchange="switchNo();" Text="随机字符串"></asp:CheckBox><br />
                  <div id="divNo">
                      <asp:CheckBox runat="server" ID="cbTime" Text="时间字符串："></asp:CheckBox><asp:TextBox runat="server" ID="tbTime" MaxLength="20"></asp:TextBox><i title="查看解释" onclick="What('DateFormat')" class="what"></i>
                      <div class="middle" style="margin:2px 0">
                      <asp:CheckBox runat="server" ID="cbSerial" Text="顺序号："></asp:CheckBox><span>位数 </span><asp:TextBox runat="server" ID="tbSerial" Width="32" MaxLength="2"></asp:TextBox><span> 初始值 </span><asp:TextBox runat="server" ID="tbInitValue" MaxLength="9" Width="48"></asp:TextBox><span> 递增 </span><asp:TextBox runat="server" ID="tbStep" MaxLength="4" Width="32"></asp:TextBox><span>，重置周期 </span><asp:DropDownList runat="server" ID="ddlLoop"></asp:DropDownList>
                      </div>
                  </div>
                  <asp:CheckBox runat="server" ID="cbSuffix" Text="后缀："></asp:CheckBox><asp:TextBox runat="server" ID="tbSuffix" MaxLength="110"></asp:TextBox>              
                  </div>
              </fieldset>
          </td>
        </tr>
        <tr id="tr_autoComplete" runat="server">
          <td>
              <asp:CheckBox runat="server" ID="enAutoComplete" title="输入提示：设置填写时自动产生提示列表的功能。" Text="输入提示" AutoPostBack="true" OnCheckedChanged="setMutex"></asp:CheckBox>
              <fieldset runat="server" id="acOptions"><legend><asp:CheckBox runat="server" ID="cbAc" AutoPostBack="true" OnCheckedChanged="setMutex" Text="输入提示，来源：" /><asp:DropDownList ID="acTemplets" runat="server" AutoPostBack="true" OnSelectedIndexChanged="FillAcFields" OnDataBound="FillAcFields"></asp:DropDownList></legend>
              <fieldset class="mtop_s mbottom_m" id="acConds"><legend>筛选<i title="说明" onclick="What('condlogic')" class="what condlogic"></i></legend>
                <asp:CheckBox runat="server" ID="acCond1" CssClass="cbfilter" Text="过滤器：" onclick="setCondlogic('#acConds');" /><asp:DropDownList ID="ddlFilters_Ac" runat="server"></asp:DropDownList>
                <div id="ac_c1" runat="server" class="mtop_s"><div class="fflogic"><asp:RadioButtonList runat="server" ID="ac_rbl_1" RepeatDirection="Horizontal" onclick="groupChged(this);" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem><asp:ListItem Value="AndAll" class="morelogic" title="并且满足下列条件之组合">并且(…)</asp:ListItem><asp:ListItem Value="OrAll" class="morelogic" title="或者满足下列条件之组合">或者(…)</asp:ListItem></asp:RadioButtonList> <i title="说明" onclick="What('condgroup')" class="what morelogic vmiddle"></i></div>
                <asp:CheckBox ID="acCond2" Checked="true" runat="server" /><asp:DropDownList ID="ddlSrcFields_Ac"
                runat="server" /> <asp:DropDownList ID="ac_operators" Width="52" runat="server" /> 当前 <asp:DropDownList ID="ddlTarFields_Ac" runat="server" />
                <a runat="server" id="ac_add_1" href="#" onclick="return addCond(this);" title="添加条件"></a>
                </div>
                <div id="ac_c2" runat="server"><asp:RadioButtonList runat="server" ID="ac_rbl_2" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList>
                <asp:CheckBox ID="acCond3" Checked="true" runat="server" /><asp:DropDownList ID="ddlSrcFields3_Ac"
                runat="server" /> <asp:DropDownList ID="ac_operators3" Width="52" runat="server" /> 当前 <asp:DropDownList ID="ddlTarFields3_Ac" runat="server" />
                <a runat="server" id="ac_add_2" href="#" onclick="return addCond(this);" title="添加条件"></a>
                </div>
                <div id="ac_c3" runat="server"><asp:RadioButtonList runat="server" ID="ac_rbl_3" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList>
                <asp:CheckBox ID="acCond4" Checked="true" runat="server" /><asp:DropDownList ID="ddlSrcFields4_Ac"
                runat="server" /> <asp:DropDownList ID="ac_operators4" Width="52" runat="server" /> 当前 <asp:DropDownList ID="ddlTarFields4_Ac" runat="server" />
                <a runat="server" id="ac_add_3" href="#" onclick="return addCond(this);" title="添加条件"></a>
                </div>
                <div id="ac_c4" runat="server"><asp:RadioButtonList runat="server" ID="ac_rbl_4" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList>
                <asp:CheckBox ID="acCond5" Checked="true" runat="server" /><asp:DropDownList ID="ddlSrcFields5_Ac"
                runat="server" /> <asp:DropDownList ID="ac_operators5" Width="52" runat="server" /> 当前 <asp:DropDownList ID="ddlTarFields5_Ac" runat="server" />
                <a runat="server" id="ac_add_4" href="#" onclick="return addCond(this);" title="添加条件"></a>
                </div>
                <div id="ac_c5" runat="server"><asp:RadioButtonList runat="server" ID="ac_rbl_5" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList>
                <asp:CheckBox ID="acCond6" Checked="true" runat="server" /><asp:DropDownList ID="ddlSrcFields6_Ac"
                runat="server" /> <asp:DropDownList ID="ac_operators6" Width="52" runat="server" /> 当前 <asp:DropDownList ID="ddlTarFields6_Ac" runat="server" />
                </div>
            </fieldset>
            <asp:UpdatePanel ID="up_Ac" runat="server" RenderMode="Block" OnPreRender="AddScript" UpdateMode="conditional">
            <ContentTemplate>
            <fieldset onclick="setAcOptions();" class="mtop_n"><legend>取值</legend>
                <asp:RadioButton ID="rbResult1_Ac" GroupName="AcQueryResult" Text="" runat="server" /><asp:DropDownList ID="ddlResultSortFields_Ac"
                runat="server"></asp:DropDownList> <asp:DropDownList ID="ddlSortDirection_Ac" runat="server">
                    <asp:ListItem Value="Ascending" Selected="true">最小的</asp:ListItem>
                    <asp:ListItem Value="Descending">最大的</asp:ListItem>
                </asp:DropDownList> <asp:DropDownList runat="server" ID="ddlTopn">
                    <asp:ListItem Value="1">第1项</asp:ListItem>
                    <asp:ListItem Value="10">前10项</asp:ListItem>
                    <asp:ListItem Value="20">前20项</asp:ListItem>
                    <asp:ListItem Value="30">前30项</asp:ListItem>
                    <asp:ListItem Value="50">前50项</asp:ListItem>
                    <asp:ListItem Value="100">前99项</asp:ListItem>
                </asp:DropDownList> <asp:DropDownList ID="ddlResultFields1_Ac" runat="server">
                </asp:DropDownList><br />
                <div runat="server" id="divFuns">
                <asp:RadioButton ID="rbResult2_Ac" Checked="true" GroupName="AcQueryResult" Text="" runat="server" /><asp:DropDownList
                    ID="ddlResultFields2_Ac" runat="server" AutoPostBack="true" OnSelectedIndexChanged="setComputeFuns" OnDataBound="setComputeFuns"></asp:DropDownList> <asp:DropDownList ID="ddlCompute_Ac" runat="server">
                </asp:DropDownList>
                </div>
                <asp:RadioButton ID="rbResult3_Ac" GroupName="AcQueryResult" Text="数量" runat="server" />
            </fieldset>
            <div id="acopts">
                <asp:CheckBox runat="server" ID="cbAutoFill" Text="自动填充" onclick="setDisEdit();" ToolTip="录入时自动取值" />
                <asp:CheckBox runat="server" ID="cbDisEdit" Text="禁止修改" ToolTip="确定是否允许修改自动填充的值" />
                <span id="spanMuti"><asp:CheckBox runat="server" ID="cbEnMutiItems" ToolTip="输入一项后，键入指定分隔符，可继续选取" Text="允许输入多项，" /><asp:DropDownList runat="server" ID="ddlChars">
                    <asp:ListItem Selected="True" Value=",，">逗号</asp:ListItem>
                    <asp:ListItem Value=" 　">空格</asp:ListItem>
                    <asp:ListItem Value=";；">分号</asp:ListItem>
                    <asp:ListItem Value="/">斜杠</asp:ListItem>
                    <asp:ListItem Value="、">顿号</asp:ListItem>
                </asp:DropDownList> 分隔&nbsp;&nbsp;</span>
                <asp:CheckBox runat="server" ID="cbLimit" Text="只接受数据源的值" />
            </div>
            </ContentTemplate>
            </asp:UpdatePanel>
            </fieldset>
          </td>
        </tr>
        <tr id="tr_sign" runat="server">
          <td><asp:CheckBox runat="server" ID="cbDisReSign" Text="禁止修改"></asp:CheckBox></td>
        </tr>
        <tr id="tr_innerLink" runat="server">
          <td>
            <asp:UpdatePanel ID="upLink" runat="server" RenderMode="inline" ChildrenAsTriggers="true" OnPreRender="InitLinkZone" UpdateMode="conditional">
            <ContentTemplate>
              <asp:CheckBox runat="server" ID="linkTo" Text="链接" title="链接：使字段值显示为一个链接，点击可打开设定的目标。" OnCheckedChanged="linkTo_changed" AutoPostBack="true"></asp:CheckBox>
              <fieldset runat="server" id="linkSetting" class="mtop_s"><legend><asp:CheckBox runat="server" ID="cbLinkTo" Text="链接到：" Checked="true" OnCheckedChanged="linkTo_changed" AutoPostBack="true" /></legend>
                <div class="pad">
                  <asp:RadioButton ID="rbTarget1" AutoPostBack="true" Checked="true" OnCheckedChanged="rbTarget_Changed" GroupName="linkTarget" runat="server" /><asp:DropDownList ID="ddlLinkTemplets" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlLinkTemplets_Changed" OnDataBound="ddlLinkTemplets_Changed" /><br />
                  <div id="linkDiv" runat="server">
                    <asp:CheckBox ID="cond1" CssClass="cbfilter" Text="过滤器：" runat="server" onclick="setCondlogic('#pop_linkSetting');" /><asp:DropDownList ID="ddlFilters_Link" runat="server"></asp:DropDownList>
                    <div id="c1" runat="server" class="mtop_s"><div class="fflogic"><asp:RadioButtonList runat="server" ID="rbl_1" RepeatDirection="Horizontal" onclick="groupChged(this);" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem><asp:ListItem Value="AndAll" class="morelogic" title="并且满足下列条件之组合">并且(…)</asp:ListItem><asp:ListItem Value="OrAll" class="morelogic" title="或者满足下列条件之组合">或者(…)</asp:ListItem></asp:RadioButtonList> <i title="说明" onclick="What('condgroup')" class="what morelogic vmiddle"></i></div>
                    <asp:CheckBox ID="cond2" Checked="true" runat="server" /><asp:DropDownList ID="ddlSrcFields"
                    runat="server" /> <asp:DropDownList ID="operators" Width="52" runat="server" /> 当前 <asp:DropDownList ID="ddlTarFields" runat="server" />
                    <a runat="server" id="add_1" href="#" onclick="return addCond(this);" title="添加条件"></a>
                    </div>
                    <div id="c2" runat="server"><asp:RadioButtonList runat="server" ID="rbl_2" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList>
                    <asp:CheckBox ID="cond3" Checked="true" runat="server" /><asp:DropDownList ID="ddlSrcFields3"
                    runat="server" /> <asp:DropDownList ID="operators3" Width="52" runat="server" /> 当前 <asp:DropDownList ID="ddlTarFields3" runat="server" />
                    <a runat="server" id="add_2" href="#" onclick="return addCond(this);" title="添加条件"></a>
                    </div>
                    <div id="c3" runat="server"><asp:RadioButtonList runat="server" ID="rbl_3" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList>
                    <asp:CheckBox ID="cond4" Checked="true" runat="server" /><asp:DropDownList ID="ddlSrcFields4"
                    runat="server" /> <asp:DropDownList ID="operators4" Width="52" runat="server" /> 当前 <asp:DropDownList ID="ddlTarFields4" runat="server" />
                    <a runat="server" id="add_3" href="#" onclick="return addCond(this);" title="添加条件"></a>
                    </div>
                    <div id="c4" runat="server"><asp:RadioButtonList runat="server" ID="rbl_4" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rblCond"><asp:ListItem Value="And" Selected="True">并且</asp:ListItem><asp:ListItem Value="Or">或者</asp:ListItem></asp:RadioButtonList>
                    <asp:CheckBox ID="cond5" Checked="true" runat="server" /><asp:DropDownList ID="ddlSrcFields5"
                    runat="server" /> <asp:DropDownList ID="operators5" Width="52" runat="server" /> 当前 <asp:DropDownList ID="ddlTarFields5" runat="server" />
                    </div>
                  </div>
                  <div class="mtop_s">
                    <asp:RadioButton ID="rbTarget3" AutoPostBack="true" OnCheckedChanged="rbTarget_Changed" GroupName="linkTarget" Text="网址：" runat="server" /><asp:TextBox runat="server" ID="tbUrl" Width="170"></asp:TextBox>＋<asp:DropDownList ID="ddlCurFields" runat="server" />
                  </div>
                  <div class="middle">
                      <asp:RadioButton ID="rbTarget2" AutoPostBack="true" OnCheckedChanged="rbTarget_Changed" GroupName="linkTarget" Text="目录：" runat="server" /><a id="selectedDir" runat="server" href="#" onclick="return showDirTree(true);" class="noicon" onserverclick="DirChanged">目录</a>
                  </div>
                </div>
            </fieldset>
            </ContentTemplate>
            </asp:UpdatePanel>
          </td>
        </tr>
        <tr id="tr_allowNull" runat="server" title="必填字段：指定在编辑时，该字段是否必须输入一个值。">
          <td><asp:CheckBox runat="server" ID="required" Text="必填字段"></asp:CheckBox></td>
        </tr>
        <tr id="tr_allowRepeat" runat="server" title="不允许重复：指定是否允许记录中该字段出现相同的值。">
          <td><asp:CheckBox runat="server" ID="distinct" Text="不允许重复"></asp:CheckBox></td>
        </tr>
        <tr class="hide" title="隐藏：指定在浏览时是否隐藏该字段。">
          <td><asp:CheckBox runat="server" ID="cbVisible" Text="隐藏"></asp:CheckBox></td>
        </tr>
        </table>
        <fieldset class="hide mtop_l"><legend>备忘：</legend>
            <asp:TextBox runat="server" ID="tbMent" TextMode="MultiLine" placeholder="输入备忘内容…" ToolTip="备忘内容不会在其它地方显示" CssClass="nobgborder"></asp:TextBox>
        </fieldset>
        <div class="right mtop_s"><span onclick="$('tr.hide,fieldset.hide','#pop_Body').show();$(this).hide();" class="f-r3 r1">显示所有项</span></div>
    </ContentTemplate>
    </ims:Pop>
    <ims:Pop runat="server" ID="refs" ShowOkButton="false" CanelButtonText="关闭" Width="440">
        <ContentTemplate>
            <div runat="server" id="divRefs" class="mtop_m"></div>
        </ContentTemplate>
    </ims:Pop>
    <ims:Pop runat="server" ID="au" Title="指定用户范围" OnClientUpdated="assignShown();" Width="555" HideOnOkClientClick="false" OnOkClientClick="return storeExer();" CustomCss="notfocus">
        <ContentTemplate>
            <div class="ml_m sparse2 label0">
            <input type="checkbox" id="cbUser" /><label for="cbUser">用户：</label><asp:TextBox runat="server" id="tbUsers" acfid="UserName" chars=";；、,，" ondblclick="showUserTree(this.id);" ToolTip="双击弹出用户选择窗口。多项之间以逗号、分号或顿号分隔" /><br />
            <input type="checkbox" id="cbRole" /><label for="cbRole">角色：</label><asp:TextBox runat="server" id="tbRoles" acfid="RoleName" chars=";；、,，" ToolTip="多项之间以逗号、分号或顿号分隔" /><br />
            <input type="checkbox" id="cbUnit" /><label for="cbUnit">机构：</label><asp:TextBox runat="server" id="tbUnits" acfid="UnitNameWithID" chars=";；、,，" ondblclick="showUserTree(this.id,true);" ToolTip="双击弹出机构选择窗口。多项之间以逗号、分号或顿号分隔" />
            <input type="checkbox" id="cbRector" value="1" checked="checked" /><label for="cbRector">负责人</label> <input type="checkbox" id="cbDirectly" value="2" /><label for="cbDirectly">直属成员</label> <input type="checkbox" id="cbIndirect" value="4" /><label for="cbIndirect">非直属成员</label>
            <div class="sepline"></div>
            <div id="divExclude">
                <input type="checkbox" id="cbFixed" value="4" /><label for="cbFixed">排除：</label><asp:TextBox runat="server" id="tbNoUsers" acfid="UserName" ToolTip="双击弹出用户选择窗口。多项之间以逗号、分号或顿号分隔" chars=";；、,，" ondblclick="showUserTree(this.id);" />
            </div>
            </div>
        </ContentTemplate>
    </ims:Pop>
    <div class="menu" id="menuTypes">
        <a href="#" onclick="return addField('Numeric');" class="type-Numeric">数字</a>
        <a href="#" onclick="return addField('DateTime');" class="type-DateTime">日期</a>
        <a href="#" onclick="return addField('YesNo');" class="type-YesNo">是否</a>
        <a href="#" onclick="return addField('SingleList');" class="type-SingleList">单选</a>
        <a href="#" onclick="return addField('MultipleList');" class="type-MultipleList">多选</a>
        <a href="#" onclick="return addField('Formula');" class="type-Formula">公式</a>
        <a href="#" onclick="return addField('Query');" class="type-Query">查询</a>
        <a href="#" onclick="return addField('Photo');" class="type-Photo">图片</a>
        <a href="#" onclick="return addField('File');" class="type-File">文件</a>
    </div>
    <script src="js/comm.js"></script><script src="js/templet.js"></script>
    </form>
</body>
</html>