<%@ page language="C#" autoeventwireup="true" inherits="Admin_GoodsManagement_AddGoodsClassFilter, ShopWe" %>

<!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>
    <link href="../css/my.css" rel="stylesheet" type="text/css" />

    <script src="../css/admin.js" type="text/javascript"></script>

    <script type="text/javascript">
    function FilterClear()
{
var div=document.getElementById("FilterGroup");
div.innerHTML="";
}
    
    function AddFilter()
    {
       var ObjID=generateMixed(10);
       var newDiv = document.createElement("div");
       newDiv.innerHTML="<div id=\"Filter"+ObjID+"\" class=\"din_all_body\"><div class=\"din_all_title\"><h1>筛选组名称：</h1>"+
                       "<input name=\"FilterName\" style=\"width:15%\" class=\"input\" />"+
                       "<h1>筛选值（逗号分割）：</h1>"+
                       "<input name=\"FilterValue\" style=\"width:35%\" class=\"input\" />"+
                       "<div class=\"img_button\"><img src=\"../Themes/Default/Images/del_imgred.gif\" alt=\"删除\" /><a href='javascript:Delete(\"Filter"+ObjID+"\")' class=\"grey\">删除</a></div>"+
                       "</div></div></div>";
                      
       document.getElementById("FilterGroup").appendChild(newDiv);
     }
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="all">
            <div class="come_title_3">
                <table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <h2>
                                添加筛选项:</h2>
                            <input type="button" value="添加筛选组" class="butt_tle" onclick="AddFilter();HideDiv('AttributeTip');"
                                style="height: 20px; width: 70px" />
                            <input type="button" value="全部清空" class="butt_tle" onclick="FilterClear()" style="height: 20px;
                                width: 70px" />
                        </td>
                        <td style="width: 290px">
                            <asp:TextBox ID="SelectGroupName" runat="server" CssClass="input" Width="150" Height="18"
                                Text="添加快速选择组" MaxLength="7"></asp:TextBox>
                            <asp:Button ID="AddGroup" runat="server" CssClass="butt_tle" Height="20px" Width="120px"
                                CausesValidation="false" Text="添加到快速选择组" OnClick="AddGroup_Click" />
                        </td>
                    </tr>
                </table>
            </div>
            <div class="k_all1">
                <asp:Repeater ID="RepeaterSelectGroup" runat="server" OnItemCommand="RepeaterSelectGroup_ItemCommand">
                    <ItemTemplate>
                        <div class="Template2_button">
                            <asp:ImageButton ID="DeleteGroup" runat="server" ImageUrl="~/Admin/css/images/del_imgred.gif"
                                CommandName="Delete" CommandArgument='<%# Eval("File") %>' CausesValidation="false"
                                ToolTip="删除" OnClientClick="return confirm('你真的要删除?');" /><asp:LinkButton ID="LinkButtonSelectGroup"
                                    runat="server" CssClass="blue" CommandName="Select" CommandArgument='<%# Eval("File") %>'
                                    CausesValidation="false"><%# Eval("Name") %></asp:LinkButton>
                        </div>
                        <!--<img src="../css/images/bj.png" alt="导出" />
                <a href='../xml/Attribute/<%# Eval("File")%>' class="grey" target="_blank">导出</a>-->
                    </ItemTemplate>
                </asp:Repeater>
            </div>
            <div class="k_all6" id="FilterGroup">
                <asp:Panel ID="PanelTip" runat="server">
                    <div id="AttributeTip">
                        <div class="ys_bf_eeor">
                            <table>
                                <tr>
                                    <td align="center" style="height: 30px">
                                        你还未添加筛选组，请<a href="#" onclick="AddFilter();HideDiv('AttributeTip');" class="blue"> 添加一个筛选组
                                        </a>。</td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </asp:Panel>
                </asp:Panel>
                <asp:Literal ID="LiteralBody" runat="server"></asp:Literal>
            </div>
        </div>
        <div class="sub">
            <asp:Button ID="Submit" runat="server" Text="确认提交" OnClick="Submit_Click" CssClass="but_add" />
        </div>
    </form>
</body>
</html>
