<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeiXinPage_Form.aspx.cs"
    Inherits="RM.Web.WeiXin.WeiXinPage_Form" %>

<!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 id="Head1" runat="server">
    <title><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("WeiXinPage_Form_Title")%></title>
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="../../Themes/Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/artDialog.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/iframeTools.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <style type="text/css">
        #promptBg ul, #promptBg li { padding: 0; margin: 0; list-style: none; }
        .promptLink { display: block; padding: 0 3px; font-size: 10pt; }
        .activeLink { background-color: #e0f5bc; }
        .activePrompt { background-color: #E0ECCC; }
    </style>
    <script type="text/javascript">
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" class="frm">
        <tr>
            <th>
            </th>
            <td>
                <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("WeiXinPage_Form_klddsbsydwlhsd")%>
            </td>
        </tr>
        <tr>
            <th>
                <span style="color: Red; padding: 0 2px;">*</span><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Mall_webtitle")%>:
            </th>
            <td>
                <input id="WeiXinPage_Title" maxlength="50" runat="server" class="txt" style="width: 665px" />
            </td>
            <%--            <td>
                <select id="WeiXinAutoAnswer_Type" class="select" runat="server" style="width: 228px;">
                    <option value="0">文字</option>
                    <option value="1">图文</option>
                </select>
            </td>--%>
        </tr>
        <tr>
            <th>
                <span style="color: Red; padding: 0 2px;">*</span><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Mall_webcontent")%>:
            </th>
            <td>
                <!--引用kindeditor js-->
                <script src="/Themes/Scripts/kindeditor/kindeditor-min.js" type="text/javascript"></script>
                <script type="text/javascript">
                    var editor;
                    //初始化kindeditor
                    KindEditor.ready(function (K) {
                        //kindeditor配置参数，文档：http://kindeditor.net/docs/option.html
                        editor = K.create('#WeiXinPage_Context', {
                            allowFileManager: true,
                            allowUpload: true,  //是否允许上传文件
                            uploadJson: '/WeiXin/UploadImage.ashx', //上传图片的处理程序
                            minHeight: 300
                        });
                    });
                </script>
                <textarea id="WeiXinPage_Context" runat="server" style="width: 670px;" />
            </td>
        </tr>
    </table>
    <div class="frmbottom" style="margin-top: 30px;">
        <asp:LinkButton ID="Save" runat="server" class="l-btn" OnClientClick="return checkedData()"
            OnClick="Save_Click"><span class="l-btn-left">
            <img src="/Themes/Images/disk.png" alt="" /><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Save")%></span></asp:LinkButton>
        <a class="l-btn" href="javascript:void(0)" onclick="OpenClose();"><span class="l-btn-left">
            <img src="/Themes/Images/cancel.png" alt="" /><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Close")%></span></a>
    </div>
    </form>
    <script type="text/javascript">
        function checkedData() {
            if (jQuery.trim($("#WeiXinPage_Title").val()).length < 1) {
                showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Mall_intitle")%>', 1500, 3);
                return false;
            }
            //判断输入是否有内容
            if (editor.isEmpty()) {
                showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Ques_qsrnr")%>', 1500, 3);
                return false;
            }
            //同步数据到文本框，如果有异步提交的话需要手动同步一下内容到editor控件中
            editor.sync();
            //获取数据 文档：http://kindeditor.net/docs/usage.html
            //editor.val();
            return true;
        }
    </script>
</body>
</html>
