<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="manageBannerEditor.aspx.cs" Inherits="Web.Wpdcc.manageBannerEditor" %>
<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>横幅模板管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/head.htm" -->
    <style>
        .edit-table {
            margin-top:0px;
        }
    </style>
    <link rel="stylesheet" href="../Wpedt/WpdccEditor/themes/default/default.css" />
    <script type="text/javascript" src="../Wpedt/WpdccEditor/kindeditor.js"></script>
    <script type="text/javascript" src="../Wpedt/WpdccEditor/lang/zh_CN.js" charset="utf-8"></script>

    <script type="text/javascript" language="javascript">
        //自定义上传图片控件加载，支持自定义上传图片功能需先引用三个文件，[themes/default/default.css] [kindeditor.js] [lang/zh_CN.js]
        KindEditor.ready(function (K) {
            var editor = K.editor({
                uploadJson: '../Wpedt/WpdccEditor/aspnet/upload_json.ashx',
                fileManagerJson: '../Wpedt/WpdccEditor/aspnet/file_manager_json.ashx',
                allowFileManager: true
            });
            K('#uploadimg').click(function () {
                editor.loadPlugin('zdybanner', function () {
                    editor.plugin.zdybannerDialog({
                        zdybannerUrl: K('#bannerMaterial').val(),
                        clickFn: function (url) {
                            K('#bannerMaterial').val(url);
                            editor.hideDialog();

                        }
                    });
                });
            });
            K('#uploadswf').click(function () {
                editor.loadPlugin('zdybannerswf', function () {
                    editor.plugin.zdybannerswfDialog({
                        zdybannerswfUrl: K('#bannerMaterial').val(),
                        clickFn: function (url) {
                            K('#bannerMaterial').val(url);
                            editor.hideDialog();

                        }
                    });
                });
            });

        });
    </script>
    <script type="text/javascript">
        function checkall() {
            //验证
            if (checkAllValidate()) {
                return true;
            }
            else {
                return false;
            }
        }
    </script>
</head>
<body>
    <div class="edit-func-box func-box">
        <form id="Form1" method="post" runat="server">
        <div class="bd" style="max-height:300px">
            <table class="edit-table">
                <tr>
                    <th>
                        横幅名称：
                    </th>
                    <td>
                        <asp:TextBox ID="bannerName" CssClass="input-md" runat="server"
                            notNull="true" msgName="横幅名称" MaxLength="100"></asp:TextBox>&nbsp;&nbsp;
                    </td>
                </tr>
                <tr>
                    <th>说&emsp;&emsp;明：</th>
                    <td>
                        <asp:TextBox ID="bannerExplain" runat="server"
                            CssClass="input-md" MaxLength="50"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th>分组显示：</th>
                    <td>
                        <asp:TextBox ID="bannerGrouping" runat="server" notNull="true" CssClass="input-md"
                            dataType="integer" maxValue="99999" minValue="0" msgName="分组显示">0</asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th>链接地址：</th>
                    <td>
                        <asp:TextBox ID="bannerUrl" runat="server" CssClass="input-md"></asp:TextBox>
                        <span class="tip">外链需加上http://，内链可用相对路径，#表示空链接</span>
                    </td>
                </tr>
                <tr>
                    <th>横幅图片：</th>
                    <td>
                        <asp:TextBox ID="bannerMaterial" runat="server" notNull="true" CssClass="input-md"
                            msgName="横幅图片或者flash"></asp:TextBox>
                        <a id="uploadimg" href="#" style="color: #0094ff">上传图片</a>&nbsp; <a id="uploadswf"
                            href="#" style="color: #0094ff">上传flash</a>&nbsp;
                    </td>
                </tr>
            </table>
        </div>
        <div class="ft">
            <div class="action-field btn-pl">
                <asp:HiddenField ID="HiddenFieldBannerId" runat="server" />&nbsp;
                <asp:Button ID="save" class="btn btn-sm btn-primary" runat="server" Text="保 存" OnClientClick="return checkall()"
                    OnClick="save_Click"></asp:Button>          
            </div>
        </div>
        </form>
    </div>
</body>
</html>
