<%@ page language="C#" autoeventwireup="true" inherits="ims.web.dataHome, 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="dataHome">
<head runat="server">
    <title>搜索 - 快捷方式 - 收藏</title>
</head>
<body>
    <form id="form1" runat="server" defaultbutton="btnDo">
    <asp:ScriptManager ID="s1" runat="server">
        <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 class="ui-tabs 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">
            <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="WdatePicker({onpicking:picking, el:'kw',dateFmt:'yyyy-MM-dd'})" />：<br />
            <asp:TextBox ID="kw" runat="server"></asp:TextBox><img src="images/clear.gif" onclick="doClean();" title="清空" id="cleaner" /><asp:Button ID="btnDo" runat="server" Text="搜 索" OnClick="doSearch" /><br />
            <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" class="u" 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();" class="u">搜索技巧</a><b>|</b><a href="select.aspx?action=Search" class="u">高级搜索</a>
		    </div>
        </div>
        <div class="clear" id="shortcuts">
            <asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional" RenderMode="Block">
            <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><a class="del" onclick="return delSc('<%# ((ims.Model.Shortcut)Container.DataItem).ID %>');" title="删除">×</a>
                        </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>
        </div>           
        <div runat="server" id="favs">
		    <asp:UpdatePanel runat="server" ID="upFavs" ChildrenAsTriggers="false" UpdateMode="Conditional" RenderMode="Block">
		    <ContentTemplate>
                <div runat="server" id="prompt" class="footBtnArea gray">暂无收藏！</div>
                <span runat="server" id="items">
                <asp:CheckBoxList CellSpacing="0" ID="cblFavorites" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" />　<img src='images/selectall.gif' class='slt' title='全选/全不选' onclick="SelectAll('favs');" /><img src='images/revselect.gif' class='slt' title='反选' onclick="RevSelect('favs');" />
                <div class="footBtnArea">
                    <asp:Button ID="btnOpen" runat="server" Text="打开选中项" OnClick="OpenItems" OnClientClick="return hasSelected('favs');" CssClass="btn" Width="78" />
                    <asp:Button ID="btnDel" runat="server" Text="删除选中项" OnClick="DelItems" OnClientClick="return hasSelected('favs')?confirm('确定要从收藏夹中删除所有选中项吗？'):false;" CssClass="btn" Width="78" />
                </div>
                </span>
                <div runat="server" id="divFavs">
                <div class="blockTitle">收藏的<%= ims.Comm.Vars.InfoType %>：</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>
    </div>
    <script src="js/comm.js"></script><script src="js/datahome.js"></script>
    </form>
</body>
</html>