<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AjaxGoods.aspx.cs" Inherits="LMN.Web.Admin.Shop.AjaxGoods" %>

<!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">
<head runat="server">
<title></title>
<script type="text/javascript" src="../Scripts/jquery-1.4.1.min.js"></script>
<style type="text/css">
    * { font-size: 12px; }
    .clear { clear: both; height: 0px; line-height: 0px; overflow: hidden; }
    /*page*/
    .pager { padding: 2px 0; height: 22px; }
    .pager a, .pager span { float: left; border: 1px solid #E6E7E1; line-height: 20px; margin-right: 5px; padding: 0 6px; color: #0046D5; }
    .pager a:hover { text-decoration: none; border-color: #0046D5; }
    .pager .current { background-color: #0046D5; border-color: #0046D5; color: #fff; font-weight: bold; }
    .pager .total, .pager .total strong { color: Gray; padding: 0 3px; }
</style>
</head>
<body>
<form id="form1" runat="server">
    <div>
        <!--通过此页面返回单个或多个GoodsId-->
        <select id="category" name="category" size="1" style="float: left; margin-right: 10px;">
            <option value="0">商品分类</option>
            <%=categoryList%>
        </select> <select name="tag" id="tag" size="1" style="float: left; margin-right: 10px;">
            <option value="0">商品标签</option>
            <option value="1" <%=(TagId==1?" selected=\"selected\"":"") %>>热门</option>
            <option value="2" <%=(TagId==2?" selected=\"selected\"":"") %>>推荐</option>
            <option value="3" <%=(TagId==3?" selected=\"selected\"":"") %>>特价</option>
            <option value="4" <%=(TagId==4?" selected=\"selected\"":"") %>>新品</option>
        </select> <input type="text" runat="server" id="keyword" name="keyword" style="float: left; margin-right: 10px;" /><input type="submit" value="筛选" />
        <div class="clear">
        </div>
    </div>
    <ul>
        <asp:Repeater ID="repeater1" runat="server">
            <ItemTemplate>
                <li><input type="checkbox" id="id" name="id" value="<%#Eval("id") %>" /><a href="javascript:;" onclick="parent.aBox.close();parent.prodSel(<%#Eval("id") %>);"><%#Eval("name") %>(price:
                <%#Eval("price") %>, hits:
                <%#Eval("hits") %>, trades:
                <%#Eval("trades")%>, comments:
                <%#Eval("comments")%>)</a></li>
            </ItemTemplate>
        </asp:Repeater>
    </ul>
    <input type="button" value="确认" onclick="multiSel()" style="float: left; margin-right: 10px;" /><LMN:Pager ID="Pager1" runat="server" PageSize="20" CssClass="pager">
    </LMN:Pager>
    <i>注意：单个产品点击产品名称选择，多个产品勾选后点击确认。</i>
</form>
<script type="text/javascript">
<!--
    function multiSel() {
        if ($("input[type=checkbox]:checked").length == 0) {
            alert("没有选择任何项目！");
            return;
        }
        var str = "";
        $("input[type=checkbox]:checked").each(function() {
            str += (str == "" ? "" : ",") + $(this).val();
        });
        parent.aBox.close();
        parent.prodSel(str);
        return;
    }
//-->
</script>
</body>
</html>
