<%@ page language="C#" autoeventwireup="true" inherits="ims.dataHome, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="dataHome">
<head runat="server">
    <title>搜索 - 快捷方式 - 收藏</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
    <form id="form1" runat="server" defaultbutton="btnDo">
    <asp:ScriptManager ID="s1" runat="server" 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="ui-tabs nobg noborder">
	    <ul>
		    <li><a href="#search">搜索</a></li>
		    <li><a href="#shortcuts">我的快捷方式</a></li>
		    <li runat="server" id="tabFavs"><a href="#favs">我的收藏</a></li>
	    </ul>
        <div id="search" class="center">
            <div id="searchArea">
                <asp:DropDownList runat="server" ID="ddlts" AutoPostBack="true" OnSelectedIndexChanged="TempletsChanged"></asp:DropDownList>
                <asp:UpdatePanel ID="upRange" runat="server" OnPreRender="AddScript" RenderMode="inline" UpdateMode="conditional">
                    <ContentTemplate>
                        <asp:DropDownList runat="server" ID="ddlfs"></asp:DropDownList>
                        <asp:DropDownList runat="server" ID="modes"></asp:DropDownList>
                    </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="ddlts" EventName="SelectedIndexChanged" />
                </Triggers>
                </asp:UpdatePanel><img id="dtPicker" style="display:none" src="images/datetime.gif" title="选择日期" onclick="toPickDate();" /><input type="text" class="hide" id="datetb" />&nbsp;：
                <div id="keyarea">
                    <asp:TextBox ID="kw" runat="server"></asp:TextBox><i id="cleaner" onclick="doClean();" title="清空"></i><button type="button" id="btnbox" title="搜索" onclick="$('#btnDo').click();"><i></i></button><asp:Button ID="btnDo" runat="server" CssClass="hide" OnClick="doSearch" />
                </div>
                <asp:UpdatePanel ID="divDir" runat="server" OnPreRender="AddScript" RenderMode="Block" UpdateMode="conditional"><ContentTemplate>
                <input type="checkbox" id="cbDir" runat="server" onclick="setSubOptions();" /><label for="cbDir">限定目录：</label><a id="selectDir" runat="server" onclick="return selectDir();" onserverclick="DirChanged"></a>
                <div class="subOptions" id="divSubDir" runat="server"><asp:CheckBox ID="cbSubDir" Checked="true" runat="server" Text="包含子目录" /></div>
                </ContentTemplate></asp:UpdatePanel>
		        <div id="linkZone">
		            <a href="#" onclick="return showHelp();">搜索技巧</a><b>|</b><a href="select.aspx?action=find">快搜</a><b>|</b><a href="select.aspx?action=search">高级搜索</a>
		        </div>
            </div>
        </div>
        <asp:UpdatePanel ID="shortcuts" runat="server" UpdateMode="Conditional" RenderMode="Block" class="clear">
        <ContentTemplate>
            <asp:Repeater runat="server" ID="myShortcuts">
                <ItemTemplate>
                    <div class="item">
                        <a href="view.aspx?shortcut=<%# ((ims.Model.Shortcut)Container.DataItem).ID %>"><%# ((ims.Model.Shortcut)Container.DataItem).Name %></a><b class="del2" onclick="return delSc('<%# ((ims.Model.Shortcut)Container.DataItem).ID %>');" title="删除"></b>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
            <div runat="server" id="msg" class="footBtnArea gray">没有快捷方式！</div>
            <asp:Button runat="server" ID="btnDelSc" OnClick="DelShortcut" CssClass="hide" />
        </ContentTemplate>
        </asp:UpdatePanel>
		<asp:UpdatePanel runat="server" ID="favs" ChildrenAsTriggers="false" UpdateMode="Conditional" RenderMode="Block">
		<ContentTemplate>
            <div runat="server" id="prompt" class="footBtnArea gray">暂无收藏！</div>
            <span runat="server" id="items">
            <asp:CheckBoxList ID="cblFavorites" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" />
            <button type="button" class="f-duoxuan btn smest outline" onclick="SelectAll(this,'favs');">全选</button><button type="button" class="f-ok btn smest outline" onclick="RevSelect('favs');">反选</button>
            <div class="footBtnArea">
                <asp:Button ID="btnOpen" runat="server" Text="打开选中项" OnClick="OpenItems" OnClientClick="return hasSelected('favs');" CssClass="btn" />
                <asp:Button ID="btnDel" runat="server" Text="删除选中项" OnClick="DelItems" OnClientClick="return hasSelected('favs')?confirm('确定要从收藏夹中删除所有选中项吗？'):false;" CssClass="btn" />
            </div>
            </span>
            <div runat="server" id="divFavs">
            <div class="bhead mtop_l"><span>收藏的<%= ims.Sys.InfoType %></span></div>
            <ul runat="server" id="infoFavs"></ul>
            </div>
            <asp:Button runat="server" ID="btnDelFav" OnClick="DelInfoFav" CssClass="hide" />
		</ContentTemplate>
		<Triggers>
		    <asp:AsyncPostBackTrigger ControlID="btnDel" EventName="Click" />
		</Triggers>
		</asp:UpdatePanel>
    </div>
    <script src="js/comm.js"></script><script src="js/datahome.js"></script>
    </form>
</body>
</html>