<%@ page language="C#" autoeventwireup="true" inherits="ims.advSearch, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="advSearch">
<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 runat="server" id="htmlBody">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="sm" runat="server" OnAsyncPostBackError="AsyncError" />
        <div class="headerZone" runat="server" id="divHeader">
            <table><tr><td runat="server" id="header">设置条件：</td><td class="right"><img runat="server" id="btnHelp" src="images/help1.gif" onclick="return showHelp();" /></td></tr></table>
        </div>
        <div class="inlineBlock autoWidth">
        <ul class="cond" id="conds">
			<li Runat="server" id="Cond1">
			<asp:CheckBox runat="server" ID="cb1" Checked="true" />&nbsp;<asp:DropDownList Runat="server" ID="dplFileds1" CssClass="fn"></asp:DropDownList>
			<asp:DropDownList Runat="server" ID="dplOper1"></asp:DropDownList><span id="s1">
			<asp:DropDownList ID="dplYN1" Runat="server" CssClass="hide">
				<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
				<asp:ListItem Value="false">否</asp:ListItem>
			</asp:DropDownList><asp:TextBox ID="tb1_1" Runat="server" CssClass="tb"></asp:TextBox><span
			id="span1" class="hide">～<asp:TextBox id="tb2_1" Runat="server" CssClass="tb"></asp:TextBox></span></span><asp:TextBox runat="server" ID="tb3_1" Width="24" Text="1" CssClass="hide"></asp:TextBox><asp:DropDownList runat="server" ID="d_1" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
			<li Runat="server" id="Cond2">
				<asp:RadioButtonList Runat="server" ID="rbl1" RepeatLayout="Flow" RepeatDirection="Horizontal" CssClass="rblCond"></asp:RadioButtonList>
				<asp:CheckBox runat="server" ID="cb2" />&nbsp;<asp:DropDownList Runat="server" ID="dplFileds2" CssClass="fn"></asp:DropDownList>
				<asp:DropDownList Runat="server" ID="dplOper2"></asp:DropDownList><span id="s2">
				<asp:DropDownList ID="dplYN2" Runat="server" CssClass="hide">
					<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
					<asp:ListItem Value="false">否</asp:ListItem>
				</asp:DropDownList><asp:TextBox ID="tb1_2" Runat="server" CssClass="tb"></asp:TextBox><span
				id="span2" class="hide">～<asp:TextBox id="tb2_2" Runat="server" CssClass="tb"></asp:TextBox></span></span><asp:TextBox runat="server" ID="tb3_2" Width="24" Text="1" CssClass="hide"></asp:TextBox><asp:DropDownList runat="server" ID="d_2" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
			<li Runat="server" id="Cond3" class="hide">
				<asp:RadioButtonList Runat="server" ID="rbl2" RepeatLayout="Flow" RepeatDirection="Horizontal" CssClass="rblCond"></asp:RadioButtonList>
				<asp:CheckBox runat="server" ID="cb3" />&nbsp;<asp:DropDownList Runat="server" ID="dplFileds3" CssClass="fn"></asp:DropDownList>
				<asp:DropDownList Runat="server" ID="dplOper3"></asp:DropDownList><span id="s3">
				<asp:DropDownList ID="dplYN3" Runat="server" CssClass="hide">
					<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
					<asp:ListItem Value="false">否</asp:ListItem>
				</asp:DropDownList><asp:TextBox ID="tb1_3" Runat="server" CssClass="tb"></asp:TextBox><span
				id="span3" class="hide">～<asp:TextBox id="tb2_3" Runat="server" CssClass="tb"></asp:TextBox></span></span><asp:TextBox runat="server" ID="tb3_3" Width="24" Text="1" CssClass="hide"></asp:TextBox><asp:DropDownList runat="server" ID="d_3" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
			<li Runat="server" id="Cond4" class="hide">
				<asp:RadioButtonList Runat="server" ID="rbl3" RepeatLayout="Flow" RepeatDirection="Horizontal" CssClass="rblCond"></asp:RadioButtonList>
				<asp:CheckBox runat="server" ID="cb4" />&nbsp;<asp:DropDownList Runat="server" ID="dplFileds4" CssClass="fn"></asp:DropDownList>
				<asp:DropDownList Runat="server" ID="dplOper4"></asp:DropDownList><span id="s4">
				<asp:DropDownList ID="dplYN4" Runat="server" CssClass="hide">
					<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
					<asp:ListItem Value="false">否</asp:ListItem>
				</asp:DropDownList><asp:TextBox ID="tb1_4" Runat="server" CssClass="tb"></asp:TextBox><span
				id="span4" class="hide">～<asp:TextBox id="tb2_4" Runat="server" CssClass="tb"></asp:TextBox></span></span><asp:TextBox runat="server" ID="tb3_4" Width="24" Text="1" CssClass="hide"></asp:TextBox><asp:DropDownList runat="server" ID="d_4" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
			<li Runat="server" id="Cond5" class="hide">
				<asp:RadioButtonList Runat="server" ID="rbl4" RepeatLayout="Flow" RepeatDirection="Horizontal" CssClass="rblCond"></asp:RadioButtonList>
				<asp:CheckBox runat="server" ID="cb5" />&nbsp;<asp:DropDownList Runat="server" ID="dplFileds5" CssClass="fn"></asp:DropDownList>
				<asp:DropDownList Runat="server" ID="dplOper5"></asp:DropDownList><span id="s5">
				<asp:DropDownList ID="dplYN5" Runat="server" CssClass="hide">
					<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
					<asp:ListItem Value="false">否</asp:ListItem>
				</asp:DropDownList><asp:TextBox ID="tb1_5" Runat="server" CssClass="tb"></asp:TextBox><span
				id="span5" class="hide">～<asp:TextBox id="tb2_5" Runat="server" CssClass="tb"></asp:TextBox></span></span><asp:TextBox runat="server" ID="tb3_5" Width="24" Text="1" CssClass="hide"></asp:TextBox><asp:DropDownList runat="server" ID="d_5" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
		</ul>
		<div class="right"><a href="#" onclick="return addCond();" runat="server" id="addCond">添加条件</a></div>
        </div>
        <asp:UpdatePanel ID="up" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional" class="bigger">
            <ContentTemplate>
                <asp:Button ID="btnDoSearch" runat="server" OnClick="doSearch" CssClass="btn" Text="搜索" />
                <asp:Button runat="server" ID="btnSaveTempFilter" OnClick="btnSaveTempFilter_Click" OnClientClick="return preSave();" Text="确定" Visible="false" CssClass="btn" />
                <asp:Button runat="server" ID="btnCanel" OnClientClick="CancelFilter();" Text="取消" Visible="false" CssClass="btn" />
                <asp:Button ID="btnSave" OnClientClick="return showSaveMenu();" runat="server" CssClass="btn" Text="保存…" />
                <asp:Button ID="btnLayout" OnClientClick="return showLayoutMenu();" runat="server" CssClass="btn" Text="版式" />
                <input type="button" runat="server" id="btnBack" onclick="back();" value="返回" class="btn" />
            </ContentTemplate>
        </asp:UpdatePanel>

        <div runat="server" id="divPrompt" class="middle">
            <img src="images/info.gif" /> <a href="#" onclick="What('CondVar');" title="查看关于使用变量的说明" class="u">可在条件中使用字段或变量</a>：<asp:DropDownList runat="server" ID="ddlVars" onchange="ddlVarsChanged(this);">
            </asp:DropDownList>： <span id="varName"></span>
            <asp:UpdatePanel runat="server" ID="upSc" UpdateMode="Conditional" RenderMode="Inline"><ContentTemplate><asp:ImageButton runat="server" ID="ibSavesc" OnClick="SaveasShortcut" CssClass="hide" /></ContentTemplate></asp:UpdatePanel>
        </div>

        <div class="menu" id="menuSave" runat="server">
            <a accesskey="F" href="#" id="aFilter" onclick="return toSaveFilter();" title="将当前条件设置保存为公共的过滤器">保存为过滤器</a>
            <div></div>
            <a accesskey="L" href="#" id="aLayout" onclick="return toSaveLayout();" title="将当前条件设置保存为搜索版式">保存为版式</a>
            <div></div>
            <a accesskey="S" href="#" id="aSc" onclick="return toPrompt('快捷方式名称：', toSavesc);" title="将当前设置保存为私有的快捷方式">保存为快捷方式</a>
        </div>

        <ims:Pop runat="server" ID="filterAttr" Title="保存过滤器" OnOkClick="SaveFilter" OkButtonText="保存" HideOnOkClientClick="false" ShowProgress="false">
        <ContentTemplate>
            <table class="fixedLayout mtop_m">
                <tr><td class="right" style="width:4em">名称：</td><td><asp:TextBox ID="tbFilterName" runat="server" onkeydown="return enterTo('filterAttr_btnOK');" Width="280"></asp:TextBox></td></tr>
                <tr><td></td><td style="padding-top:3px"><asp:CheckBox ID="cbFilterHide" Text="隐藏该过滤器，仅供设计中引用" runat="server" /></td></tr>
            </table>
        </ContentTemplate>
        </ims:Pop>

        <ims:Pop runat="server" ID="addl" CustomCss="noline" OnOkClick="SaveLayout" Width="400" HelpSubject="searchLayout" OkButtonText="保存" OnOkClientClick="return preSaveLayout();" HideOnOkClientClick="false">
            <ContentTemplate>
                <table class="fixedLayout">
                    <tr><td class="center" style="width:5.5em">版式名称：</td><td><asp:TextBox runat="server" ID="tbTitle" Width="160"></asp:TextBox></td></tr>
                    <tr>
                        <td colspan="2">
                            <div class="middle ui-corner-all" id="pmt">当前设置的下列条件，勾选的将由搜索时指定，其余按当前预设：</div>
                        </td>
                    </tr>
                    <tr><td class="center vtop" id="condKey">占位条件：</td><td class="vtop" id="condList"></td></tr>
                </table>
            </ContentTemplate>
        </ims:Pop>

        <ims:Pop runat="server" ID="manage" Title="版式管理" ShowOkButton="false" HelpSubject="searchLayoutManage" OnClientUpdated="initPoshytip();" CanelButtonText="关闭" Width="420" CustomCss="noline" ShowProgress="false">
            <ContentTemplate>
                <table class="normal" id="lays">
                    <tr><th>版 式</th><th style="width:60px">设为默认</th><th style="width:32px">更名</th><th style="width:32px">删除</th></tr>
                    <asp:PlaceHolder runat="server" ID="phLayouts"></asp:PlaceHolder>
                </table>
                <fieldset class="mtop_n mbottom_s"><legend>默认版式规则</legend>
                    <div class="padbox">
                        <ol runat="server" id="olRules" class="olRules"></ol>
                        <div class="right"><a href="#" id="aAddRule" onclick="return toAddRule();" runat="server" onserverclick="ToAddRule" class="u">添加规则</a></div>
                    </div>
                </fieldset>
                <asp:CheckBox runat="server" ID="cbDisChange" Text="禁止普通用户切换版式" onclick="switchChange();" />
            </ContentTemplate>
        </ims:Pop>
        <ims:Pop runat="server" ID="rule" ShowProgress="false" CustomCss="noline" OnClientUpdated="setTimeout(initRule,0);" OnOkClick="SaveRule" HideOnOkClientClick="false">
            <ContentTemplate>
                <table class="fixedLayout">
                    <tr><td class="ruleKey">指定角色：</td><td><asp:TextBox runat="server" ID="tbRoles" TextMode="MultiLine" Rows="3" Width="99%" acfid="RoleName" chars=";；,，、" ToolTip="输入角色名。多项之间以逗号、分号或顿号分隔"></asp:TextBox></td></tr>
                    <tr><td class="ruleKey">默认版式：</td><td><asp:DropDownList runat="server" ID="ddlAll"></asp:DropDownList></td></tr>
                </table>
            </ContentTemplate>
        </ims:Pop>
        <asp:UpdatePanel ID="layouts" runat="server" UpdateMode="conditional" RenderMode="Block" class="menu" />
        <asp:Button runat="server" ID="btnOpera" CssClass="hide" OnClick="OperaLayout" />
    <script src="js/comm.js"></script><script src="js/advSearch.js"></script>
    </form>
</body>
</html>
