<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="controlOptions.aspx.cs" Inherits="PPFOR.Admin.DesignCenter.Label.controlOptions" %>

<!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">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <script src="/ckeditor/ckeditor.js" type="text/javascript" ></script>
    <script src="../../JS/label.js" type="text/javascript"></script>   
    <link href="../../Css/global.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript">
    var controlType="Single";
    function saveContent()
    {
        var fStr=",<br />&nbsp;";
        var data=formatContent("[PPFOR:UnLoop","") + fStr + formatContent("PPFOR:Class","Control");
        
        data+=fStr +  formatContent("PPFOR:Type",(controlType!=null && controlType.toLowerCase()=='pageslider') ? 'PageSlider' : 'Single');         
        
        data+=formatContent("]","") + "<br />" + ckEditor.getData() + "<br />" + formatContent("[/PPFOR:UnLoop]","");
        
        parent.window.resetHTML(data);
        parent.popup_close();
    }
    </script>
    <title>控件参数设置</title>
</head>
<body>
    <form id="form1" runat="server" onsubmit="saveContent();return false;">
    <table width="98%" cellpadding="0" cellspacing="0" class="fortable" style="margin:6px;">
    <thead>
      <tr>
        <td colspan="2" align="center">选择标签参数--控件类</td>
      </tr>  
    </thead>    
      <tr>
        <td align="right" style="width:15%">控件参数：</td>
        <td align="left">
            <asp:DropDownList ID="PPFOR_xmlControlList" runat="server">
            <asp:ListItem Text="--系统内置标签--" Value=""></asp:ListItem>
            </asp:DropDownList>
            <br />
            <asp:TextBox ID="PPFOR_controlOptionContent" runat="server" TextMode="MultiLine" Rows="5" Width="98%"></asp:TextBox>
           <script type="text/javascript">
            var ckEditor=CKEDITOR.replace("<%=PPFOR_controlOptionContent.ClientID%>", {
             toolbar:'EditLabelOptions',
             height:'180'
            });            
            function resetHTML(obj)
            {
                controlType=obj.options[obj.selectedIndex].getAttribute('cType');
                ckEditor.setData(obj.value);                
                ckEditor.focus();                   
            } 
            </script>
         </td>
      </tr>    
      <tr style="display:none;">
        <td align="center" colspan="2" valign="middle" style="height:50px">            
            <asp:Button ID="PPFOR_setPageOptions" CssClass="inputbutton" runat="server" Text="确定" OnClick="PPFOR_setPageOptionsClick"/>
            <input name="reset" id="reset1" type="reset" class="inputbutton" onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'" value="重置" />
            <script type="text/javascript"> 
                parent.popup_clearButtons();
                parent.popup_addButton(document.getElementById('PPFOR_setPageOptions'));
                parent.popup_addButton(document.getElementById('reset1'));
             </script>
        </td>
      </tr>      
    </table>
    </form>
</body>
</html>
