<%@ Page Language="C#" MasterPageFile="~/Admin/MainPage.Master" AutoEventWireup="true"
    Codebehind="ProductSet.aspx.cs" Inherits="PPFOR.Admin.ContentArea.Product.ProductSet"
    Title="产品设置" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PPFOR_mainContent" runat="server">
    <script type="text/javascript" src="../../JS/table.js"></script>
    <script language="javascript" type="text/javascript">
    function setControlDisplay(idObj,dValue,idText)
    {
        var obj=document.getElementById(idObj);
        if(obj!=null && obj.style.display!=dValue)
        {
            obj.style.display=dValue;
            if(dValue=="none" && idText!="")
            {
                var objText=document.getElementById(idText);
                if(objText.value!=objText.getAttribute("defaultValue"))
                {
                    objText.setAttribute("defaultValue",objText.value);
                }
                objText.value="";
            }
            else if(dValue=="" && idText!="")
            {
                var objText=document.getElementById(idText);
                if(objText.value=="")
                {
                    objText.value=objText.getAttribute("defaultValue");
                }
            }
        }
    }
    function showOrhidden()
    {
        var obj = document.getElementById("<%=PPFOR_moreImage.ClientID %>");
        var mDisplay='none';
        if(obj.checked)
        {
            mDisplay='';
        }       
        setControlDisplay("proWidth",mDisplay,"<%=PPFOR_proWidth.ClientID %>");
        setControlDisplay("proHeight",mDisplay,"<%=PPFOR_proHeight.ClientID %>");  
    }        
    </script>

    <form action="ProductSet.aspx" id="form1" runat="server">
        <asp:Label ID="PPFOR_productTypeBelongLan" runat="server" Enabled="false" Visible="false"></asp:Label>
        <table width="100%" border="0" cellpadding="0" cellspacing="0"  class="fortable">
        <thead>
            <tr>
                <td align="center" colspan="2">产品设置</td>
            </tr>
        </thead>
            <tr>
                <td style="width: 15%;" align="right">
                    扩展参数：</td>
                <td>
                    <table id="paramTable" class="innertable">
                        <tr>
                            <td colspan="2" align="left"><a onclick="addParam();" href="javascript:void('添加扩展参数');">[+]&nbsp;添加扩展参数</a></td>
                        </tr>
                        <%=PPFOR_paramTRList %>
                    </table>                
                </td>
            </tr>
            <tr>
                <td align="right">
                    扩展内容：</td>
                <td>
                    <table id="contentTable" class="innertable">
                        <tr>
                            <td colspan="2" align="left"><a onclick="addContent();" href="javascript:void('添加扩展内容');">[+]&nbsp;添加扩展内容</a></td>
                        </tr>
                        <%=PPFOR_contentTRList %>
                    </table>                
                </td>
            </tr>
            <tr>
                <td align="right">
                    多图（相关图片）：</td>
                <td>
                    <asp:CheckBox ID="PPFOR_moreImage" runat="server" Text="启用" Checked="true"/></td>
            </tr>
            <tr id="proWidth">
                <td align="right">
                    多图缩略图宽度：
                </td>
                <td>
                    <asp:TextBox ID="PPFOR_proWidth" runat="server" Text="50" MaxLength="3" Width="50px"></asp:TextBox> px &nbsp;
                    <asp:RangeValidator ID="RangeValidator2" ControlToValidate="PPFOR_proWidth" Type="Integer" MinimumValue="30" MaximumValue="150" runat="server" Display="Dynamic" SetFocusOnError="true">多图缩略图宽度必须为30-150之间的整数</asp:RangeValidator></td>
            </tr>
            <tr id="proHeight">
                <td align="right">
                    多图缩略图高度：
                </td>
                <td>
                    <asp:TextBox ID="PPFOR_proHeight" runat="server" Text="50" MaxLength="3" Width="50px"></asp:TextBox> px &nbsp;
                    <asp:RangeValidator ID="RangeValidator1" ControlToValidate="PPFOR_proHeight" Type="Integer" MinimumValue="30" MaximumValue="150" runat="server" Display="Dynamic" SetFocusOnError="true">多图缩略图宽度必须为30-150之间的整数</asp:RangeValidator></td>
            </tr>
            <tr>
                <td align="right">
                    缩略图宽度：
                </td>
                <td>
                    <asp:TextBox ID="PPFOR_imageWidth" runat="server" Text="90" MaxLength="3" Width="50px"></asp:TextBox> px &nbsp;
                    <asp:RangeValidator ID="RangeValidator3" ControlToValidate="PPFOR_imageWidth" Type="Integer" MinimumValue="30" MaximumValue="150" runat="server" Display="Dynamic" SetFocusOnError="true">缩略图宽度必须为30-150之间的整数</asp:RangeValidator></td>
            </tr>
            <tr>
                <td align="right">
                    缩略图高度：
                </td>
                <td>
                    <asp:TextBox ID="PPFOR_imageHeight" runat="server" Text="90" MaxLength="3" Width="50px"></asp:TextBox> px &nbsp;
                    <asp:RangeValidator ID="RangeValidator4" ControlToValidate="PPFOR_imageHeight" Type="Integer" MinimumValue="30" MaximumValue="150" runat="server" Display="Dynamic" SetFocusOnError="true">缩略图宽度必须为30-150之间的整数</asp:RangeValidator></td>
            </tr>
            <tr>
                <td align="right">
                    推荐属性：
                </td>
                <td>
                    <asp:CheckBox ID="PPFOR_isNew" runat="server" Text="最新" />&nbsp;
                    <asp:CheckBox ID="PPFOR_recommended" runat="server" Text="推荐" />&nbsp;                    
                    <asp:CheckBox ID="PPFOR_hot" runat="server" Text="热点" />&nbsp;
                    <asp:CheckBox ID="PPFOR_slide" runat="server" Text="幻灯片" />
                </td>
            </tr>
            <tr style="display:none">
                <td align="right">
                    文件下载：</td>
                <td>
                    <asp:CheckBox ID="PPFOR_download" runat="server" Text="启用" />
                </td>
            </tr>            
            <tr>
                <td align="right">
                    购物车：
                </td>
                <td>
                    <input type="checkbox" id="PPFOR_shop" name="PPFOR_Shop" runat="server" />启用<br />
                </td>
            </tr>
            <tr>
                <td colspan="2" style="width:100%; height:50px; display:none" align="center" valign="middle">
                    <asp:Button ID="PPFOR_setProductParametes" CssClass="inputbutton" runat="server" Text="保存设置" OnClick="PPFOR_setProductParametesClick"/>
                    <input name="reset" type="reset" id="reset1" class="inputbutton" onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'" onclick="location.reload();" value="重置" />
                    <script type="text/javascript">
                        addButtonArray("<%= PPFOR_setProductParametes.ClientID %>","reset1");
                    </script> 
                </td>               
            </tr>
        </table>
    </form>
</asp:Content>
