<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProductEdition.aspx.cs" Inherits="Admin_Product_ProductEdition"
    EnableViewState="true" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<%@ Register Src="../Controls/EditionItem.ascx" TagName="EditionItem" TagPrefix="uc2" %>
<!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="../Stylesheet/Main.css" rel="stylesheet" type="text/css" />

    <script src="../Javascript/Common.js" type="text/javascript" language="JavaScript"></script>

    <script language="javascript" type="text/javascript">
function showCustomAttribute()
{
	var itemCustomAttribute=document.getElementById("itemCustomAttribute");
	if(itemCustomAttribute!=null)
	{
	    itemCustomAttribute.style.display="";
	}
}

function addCustomAttribute()
{
	var boxCustomAttribute=document.getElementById("boxCustomAttribute");
	var itemCustomAttributeMb=document.getElementById("itemCustomAttributeMb");
	if(boxCustomAttribute!=null && itemCustomAttributeMb!=null)
	{
        var itemCustomAttribute=itemCustomAttributeMb.cloneNode(true);
        itemCustomAttribute.style.display="";
        boxCustomAttribute.appendChild(itemCustomAttribute);
	}
}

function subtractCustomAttribute(obj)
{
	var boxCustomAttribute=document.getElementById("boxCustomAttribute");
	if(boxCustomAttribute!=null && obj!=null && obj.parentNode!=null && obj.parentNode.parentNode!=null && obj.parentNode.parentNode.parentNode!=null)
	{
	    obj.parentNode.parentNode.style.display="none";
        obj.parentNode.parentNode.parentNode.removeChild(obj.parentNode.parentNode);
	}
}

    </script>

</head>
<body>
    <form id="form1" runat="server">
        <ul class="tool">
            <li onmousemove="this.className='tool_li_ac'" onmouseout="this.className=''">
                <img src="../Images/icon_add.gif" width="14" height="14" align="absmiddle" />
                <a href="Product.aspx?ProductClassParentID=<%=ProductClassParentID %>" title="增加产品">
                    增加产品</a></li>
            <li onmousemove="this.className='tool_li_ac'" onmouseout="this.className=''" id="boxDel"
                runat="server" visible="false">
                <img src="../Images/icon_del.gif" width="12" height="12" align="absmiddle" />
                <asp:LinkButton ID="lbtnDel" runat="server" OnClick="lbtnDel_Click" OnClientClick="return confirm('当产品放入回收站时，同时将当前产品所在全部语言版本的产品也将放入回收站，确定要操作吗？')"
                    ToolTip="将当前产品放入回收站">放入回收站</asp:LinkButton>
            </li>
            <li>
                <div class="tool_back">
                    <a href="javaScript:history.back(-1)">返回上一步</a></div>
            </li>
        </ul>
        <div class="main_body">
            <h1>
                <asp:Literal ID="litTitle" runat="server" Text="增加产品：填写产品不同语言版本资料"></asp:Literal>
            </h1>
            <div class="item">
                <ul class="item_list">
                    <li class="item_list_cell margin_left_2px">
                        <div>
                            <a href="Product.aspx?ID=<%=ProductBaseID %>&ProductClassParentID=<%=ProductClassParentID %>&EditionID=<%=EditionID %>">
                                第一步：产品基本资料</a>
                        </div>
                    </li>
                    <li class="item_list_cell_ac">
                        <div>
                            <a href="ProductEdition.aspx?ID=<%=ProductBaseID %>&ProductClassParentID=<%=ProductClassParentID %>&EditionID=<%=EditionID %>">
                                第二步：填写产品不同语言版本资料</a>
                        </div>
                    </li>
                    <li class="item_list_cell" id="boxProductOtherPic" runat="server">
                        <div>
                            <a href="ProductPic.aspx?ID=<%=ProductBaseID %>&ProductClassParentID=<%=ProductClassParentID %>&EditionID=<%=EditionID %>">
                                产品其它相关图片</a>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="item_body">
                <div class="ht2">
                </div>
                <div class="margin_left_2px">
                    <uc2:EditionItem ID="EditionItem1" runat="server" />
                </div>
                <ul class="item_body_list" id="item_body_list">
                    <li><span class="item_body_list_left">所属分类：</span> <span class="item_body_list_right">
                        <asp:DropDownList ID="dropClass" runat="server" DataTextField="TreeMode" DataValueField="ID">
                        </asp:DropDownList>
                        * </span></li>
                    <li><span class="item_body_list_left">产品名称：</span> <span class="item_body_list_right">
                        <asp:TextBox ID="txtProductName" runat="server" Width="300px" MaxLength="100"></asp:TextBox>
                        * </span></li>
                    <li><span class="item_body_list_left">产品型号：</span> <span class="item_body_list_right">
                        <asp:TextBox ID="txtProductModel" runat="server" Width="300px" MaxLength="100"></asp:TextBox>
                    </span></li>
                    <asp:Repeater ID="rptAttributeList" runat="server" OnItemDataBound="rptAttributeList_ItemDataBound">
                        <ItemTemplate>
                            <li><span class="item_body_list_left">
                                <asp:Literal ID="litAttributeID" runat="server" Text='<%#Eval("ID")%>' Visible="false"></asp:Literal>
                                <%#Eval("AttributeName")%>
                                ：</span> <span class="item_body_list_right">
                                    <asp:TextBox ID="txtAttributeValue" runat="server" TextMode="MultiLine" Visible="false"
                                        Width="300px"></asp:TextBox>
                                </span></li>
                        </ItemTemplate>
                    </asp:Repeater>
<%--                    <dd id="boxCustomAttribute" runat="server">
                        <li id="itemCustomAttributeMb" style="display: none;"><span class="item_body_list_left">
                            参数名称：
                            <asp:TextBox ID="txtCustomAttributeName" runat="server" Width="60px" Text="0"></asp:TextBox>
                        </span><span class="item_body_list_right">&nbsp;参数值：<asp:TextBox ID="txtCustomAttributeValue"
                            runat="server" TextMode="MultiLine" Width="180px"></asp:TextBox>
                            <span onclick="javascript:subtractCustomAttribute(this)" style="cursor: pointer;">-</span>
                        </span></li>
                    </dd>
                    <li id="boxCustomAttribute2" runat="server"><span class="item_body_list_left"></span><span class="item_body_list_right" onclick="addCustomAttribute()"
                        style="cursor: pointer;"><u>增加产品参数>></u> (如果产品有更多的参数，您可以增加产品参数)</span></li>--%>
                    <li id="pnlPrice" runat="server"><span class="item_body_list_left">销售价格：</span> <span
                        class="item_body_list_right">
                        <asp:TextBox ID="txtPrice" runat="server" Width="100px"></asp:TextBox>
                    </span></li>
                    <li><span class="item_body_list_left">排序：</span> <span class="item_body_list_right">
                        <asp:TextBox ID="txtSortOrder" runat="server" Width="60px" Text="0"></asp:TextBox>
                    </span></li>
                    <li><span class="item_body_list_left">简述/摘要：</span> <span class="item_body_list_right">
                    </span></li>
                    <li>
                        <asp:TextBox ID="txtSummary" runat="server" Width="100%" TextMode="MultiLine" Height="89px"></asp:TextBox>
                    </li>
                    <li><span class="item_body_list_left">产品介绍：</span></li>
                    <li class="align_center" id="boxProductIntro" runat="server">
                        <FCKeditorV2:FCKeditor ID="txtBody" runat="server" Height="300px" Width="99%">
                        </FCKeditorV2:FCKeditor>
                    </li>
                    <li runat="server" id="boxUserLevelIDList" visible="false"><span class="item_body_list_left">
                        * 查看权限：</span> <span class="item_body_list_right input_no">
                            <asp:CheckBoxList ID="cblUserLevelIDList" runat="server" DataTextField="LevelName"
                                DataValueField="ID" RepeatDirection="Horizontal" RepeatLayout="Flow">
                            </asp:CheckBoxList>
                            (不选则为全部) </span></li>
                    <li><span class="item_body_list_left">* 状态：</span> <span class="item_body_list_right">
                        <asp:DropDownList ID="dropState" runat="server">
                            <asp:ListItem Value="1">启用</asp:ListItem>
                            <asp:ListItem Value="0">不启用</asp:ListItem>
                        </asp:DropDownList>
                    </span></li>
                </ul>
                <div class="padding8px align_center font_bold ht_color">
                    <asp:LinkButton ID="lbtnOk" runat="server" CssClass="btn_bg" OnClick="lbtnOk_Click">保存产品当前语言版本资料</asp:LinkButton>
                </div>
            </div>
            <div class="ht">
            </div>
            <div class="ht">
            </div>
            <ul class="ac_intro" runat="server" id="boxPageExplain">
                <li class="ac_intro_title">说明：</li>
                <li class="ac_intro_item">增加产品共分为三步，如下：</li>
                <li class="ac_intro_item">1. 上传产品基础资料；</li>
                <li class="ac_intro_item">2. 填写产品不同语言版本资料；</li>
                <li class="ac_intro_item">3. 产品如果存在其它相关图片，请在“产品其它相关图片”项上传图片；</li>
            </ul>
        </div>
    </form>
</body>

<script language="javascript" type="text/javascript">
        LiColor("item_body_list");
</script>

</html>
