<%@ Page Language="c#" Inherits="Web.Wpdcc.editCss" CodeBehind="editCss.aspx.cs" %>
<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>编辑栏目CSS文件</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/head.htm" -->


</head>
<body>
    <div class="edit-func-box func-box">
        <div class="hd">
            栏目默认样式管理 <font color="maroon">（非专业前端工程师请谨慎修改！）</font></div>
        <form id="frmEditCss" method="post" runat="server">
        <table class="border" cellspacing="1" cellpadding="2" width="100%" align="center"
            border="0">
            <tr class="tdbg">
                <td valign="top" width="50%">
                    <table class="border" cellspacing="1" cellpadding="0" width="100%" border="0" class="edit-table">
                        <tr>
                            <td>
                                <asp:TextBox ID="cssTextBox" runat="server" Height="510px" Rows="10" TextMode="MultiLine"
                                    Width="98%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="center">
                                <asp:Button ID="btnReload" runat="server" class="btn btn-sm btn-primary" Text="样式重置" OnClientClick="return reloadConfirm();"
                                    OnClick="Btn_Click" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Button ID="btnSave" runat="server" Text="保存" CssClass="btn btn-sm btn-primary" OnClientClick="return saveConfirm();"
                                    OnClick="Btn_Click"></asp:Button>
                                
                            </td>
                        </tr>
                    </table>
                </td>
                <td valign="top" width="50%">
                    <iframe src="cssIntro.html" width="100%" height="520px" frameborder="0" scrolling="yes">
                    </iframe>
                    <p style="text-align:right"><input onclick="javascript:parent.$.fancybox.close();" type="button" class="btn btn-sm btn-primary" value="关闭" /></p>
                </td>
            </tr>
        </table>
        </form>
    </div>
        <!--#include file = "../Css/foot.htm" -->
    <script type="text/javascript">
        var saveConfirm = function () {
            if (document.getElementById("cssTextBox").value.trim() == "") {
                alert("改样式表不能为空，请先编辑栏目CSS样式");
                return false;
            }
            else {
                return confirm("栏目默认样式的修改将影响到所有引用该样式名的栏目显示，您确定要保存这些修改吗？");
            }
        };
        var reloadConfirm = function () {
            return confirm("要还原为系统默认样式吗？（在保存后起作用）");
        };
    </script>
</body>
</html>
