<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="collection.aspx.cs" Inherits="TW.UI.memb.collection" %>

<!DOCTYPE html>
<html>
<head lang="en">
	
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv=X-UA-Compatible content=IE=EmulateIE9 />
<script type="text/javascript" src="/static/card/js/configweb.js"></script>
	<title><%=Pagefn %>我收藏的商品_<%=config.SiteName %></title>
	<link rel="stylesheet" href="/static/card/css/public.css" />
    <link rel="stylesheet" href="/static/card/css/userCenter.css" />
    <script type="text/javascript" src="/static/card/js/jquery-1.11.3.js"></script>
    <script type="text/javascript" src="/static/card/js/tools.js"></script>
	<link rel="stylesheet" href="/static/card/css/public.css" />
    <link rel="stylesheet" href="/static/card/css/userCenter.css" />
    <link rel="stylesheet" href="/static/card/css/userCenterNew.css" />
    <script type="text/javascript">
        $(function () {
            $(".all-select i").click(function () {
                var className = $(this).attr("class");
                if (className.indexOf("icon-no-check-square") >= 0) {
                    $('.check-label i').attr('class', 'icon icon-checked-square');
                    $("input[type='checkbox'][name*='chkBox']").prop("checked",true);
                } else {
                    $('.check-label i').attr('class', 'icon icon-no-check-square');
                    $("input[type='checkbox'][name*='chkBox']").prop("checked", false);
                }
            });
            $(".simple-select i").click(function () {
                var className = $(this).attr("class"); 
                if (className.indexOf("icon-no-check-square") >= 0) {
                    $(this).attr('class', 'icon icon-checked-square');
                    $(this).parent().prev().prop("checked", true);
                } else {
                    $(this).attr('class', 'icon icon-no-check-square');
                    $(this).parent().prev().prop("checked", false);
                }
            });
        });
        function CheckCollectLen() {
            if ($("input[type='checkbox'][name*='chkBox']:checked").length <= 0) {
                alert("请勾选要处理的项目");
                return false;
            }
            return true;
        }
    </script>
</head>
<body>
<form id="form1" runat=server>
<TW:Header ID="Header1" runat="server" />
<div class="content">
    <div class="container">
        <TW:UserHeader ID="UserHeader1" runat="server" />
        <div class="user-content clearfix">
            <TW:UserLeft ID="UserLeft1" runat="server" MenuId=4 SelLi=1 />
            
            <div class="user-right pull-left">
                <div class="collection-table clearfix">
                    <div class="table-head clearfix">
                        <div class="check-label all-select">全选 <i class="icon icon-no-check-square"></i></div>
                        <div class="head-label">
                            <ul>
                                <li class="pic">图片</li>
                                <li class="name">商品名称</li>
                                <li class="price">价格</li>
                                <li class="opera">操作</li>
                            </ul>
                        </div>
                    </div>
                    <div id="pageListTable">
                        <asp:Repeater ID="Repeater1" runat="server" 
                            onitemdatabound="Repeater1_ItemDataBound" 
                            onitemcommand="Repeater1_ItemCommand">
                        <ItemTemplate>
                        <asp:HiddenField ID="hidItemId" Value='<%#Eval("Id") %>' runat="server" />
                        <div class="table-item clearfix">
                            <asp:CheckBox ID="chkBox" runat="server" CssClass="disnone" />
                            <div class="check-label simple-select"><i class="icon icon-no-check-square" value="30"></i></div>
                            <div class="item-label">
                                <ul>
                                    <li class="pic"><asp:Image ID="imgThumb" runat="server" /></li>
                                    <li class="name"><asp:Literal ID="litGoodsTit" runat="server"></asp:Literal></li>
                                    <li class="price">￥<asp:Literal ID="litPrice" runat="server"></asp:Literal></li>
                                    <li class="opera"> 
                                        <a class="vice-btn abtn" href="/goodsview.aspx?id=<%#Eval("Id") %>">购买</a>
                                        <asp:LinkButton ID="lbdel" CssClass="vice-btn abtn" runat="server" CommandName="del" OnClientClick="return confirm('确定删除?')">删除</asp:LinkButton>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        </ItemTemplate>
                        </asp:Repeater>
                    </div>
                    <div class="table-bottom clearfix">
                        <div class="check-label all-select">全选 <i class="icon icon-no-check-square"></i></div>
                        <div class="bottom-label">
                            <asp:Button ID="btnDelBatch" runat="server" CssClass="vice-btn padw1h6" Text="删除所选" OnClientClick="return (CheckCollectLen()&&confirm('确定删除?'));" 
                                onclick="btnDelBatch_Click" />
                        </div>
                    </div>
                    <div class="text-right">
                        <ul id="collection-pagination" class="pagination-sm pagination">
                            <link rel="stylesheet" type="text/css" href="/images/page.css">
                            <%=pager %>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<TW:Footer ID="Footer1" runat="server" />
</form>
</body>
</html>