<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ContentType.ascx.cs"
    Inherits="PowerEasy.Module.General.WebSite.Admin.Controls.FieldControl.ContentType" %>
<div class="DivWordBreak">
    <pe:UEditor ID="EditorContent" runat="server" Width="580px" Height="400px" FileRecord="true">
    </pe:UEditor>
    <pe:UEditorValidator ID="ValrContent" runat="server" ControlToValidate="EditorContent" ShowRequiredText="false"
        ErrorMessage="<%$ Res : Controls_FieldControl_ContentType_ValrContent, 内容不能为空 %>" Display="Dynamic" Visible="false"></pe:UEditorValidator>
    <br />
    <asp:CheckBox ID="ChkSaveRemotePic" runat="server" Checked="true" />
    <asp:Literal ID="Literal1" runat="server" Text="<%$ Res : Controls_FieldControl_ContentType_Literal1, 自动下载内容里的图片 %>"></asp:Literal><br />
            <span style="color: #006600"><asp:Literal ID="Literal2" Text="<%$ Res : Controls_FieldControl_ContentType_Literal2, 启用此功能后，如果从其它网站上复制内容到右边的编辑器中，并且内容中包含有图片，本系统会在保存文章时 %>" runat="server"></asp:Literal><br /><asp:Literal ID="Literal3" Text="<%$ Res : Controls_FieldControl_ContentType_Literal3, 自动把相关图片复制到本站服务器上。系统会因所下载图片的大小而影响速度，建议图片较多时不要使用此功能。 %>" runat="server"></asp:Literal></span>
   
</div>

<script language="JavaScript" type="text/javascript">
<!--
function AddItem(strFileName){    
    try
    {
        setTimeout("try{homeImageAssignment2('" + strFileName + "','<%=IsCreateThumbnail %>')}catch(e){}", 1000);
    }
    catch(e)
    {
    }
}
function setpic(strFileName){
    var imgpath = "<%=m_UploadDir%>"
    var imgpath = "";
    
    if (strFileName.length > 7 && strFileName.substring(0,7).toLowerCase() == "http://") {
        imgpath = strFileName;
    }
    else
    {   
        imgpath += strFileName;
    }
    setTimeout("imgPreview('" + imgpath + "')", 1000);
}
function SetUrl(url){
   setTimeout("imgPreview('" + url + "')", 1000);
   var strFilter = "<%=m_UploadDir%>";
   strFilter = strFilter.replace("//","/");
   var iurl = url.replace(strFilter,"");
   AddItem(iurl);
}	
function imgPreview(url) {
    try{eImgPreview.src = url;}catch(e){setTimeout("imgPreview(' "+ url + "')",2000);}
}
//-->
</script>

