<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="announcementedit.aspx.cs" Inherits="LawOA.Web.lawoa.announcementedit" ValidateRequest="false" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
  <title>律师事务所管理系统</title>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="stylesheet" href="images/bootstrap.min.css">
  <link rel="stylesheet" href="images/font-awesome.min.css">
  <link rel="stylesheet" href="images/ionicons.min.css">
  <link rel="stylesheet" href="images/AdminLTE.css">
  <link rel="stylesheet" href="images/skin-blue.min.css">
  <link rel="stylesheet" href="images/blue.css">
  <link href="umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
  <script src="images/jquery.min.js"></script>
  <script src="images/bootstrap.min.js"></script>
  <script src="validate/jquery.validate.min.js"></script>
 <script src="validate/messages_zh.js"></script>
   <script type="text/javascript" charset="utf-8" src="umeditor/umeditor.config.js"></script>
  <script type="text/javascript" charset="utf-8" src="umeditor/umeditor.js"></script>
  <script type="text/javascript" src="umeditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
  <header class="main-header">
    <a class="logo">
      <span class="logo-mini"><b><%= OAConfig.SysShortTitle %></b></span>
      <span class="logo-lg"><b><%= OAConfig.SysTitle %></b></span>
    </a>

    <nav class="navbar navbar-static-top" role="navigation">
      <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">菜单</span>
      </a>
      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <li class="dropdown user user-menu">
              <a class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user-circle"></i>欢迎您：<%= loginLawyer.username %>（<%= LawyerLevelView(loginLawyer.userlevel) %>）</a>
              <ul class="dropdown-menu">
              <li>
                <ul class="menu nav" style="background-color:#3c8dbc">
                    <li><a href="modifypwd.aspx" class="dropdown-toggle"><i class="fa fa-file-text-o"></i> 修改密码</a></li>
                </ul>
              </li>
            </ul>
          </li>
          <li class="dropdown user user-menu">
            <a href="logout.aspx" class="dropdown-toggle">
              <i class="fa fa-power-off"></i>退出系统
            </a>
          </li>
        </ul>
      </div>
    </nav>
  </header>
  <aside class="main-sidebar">
    <section class="sidebar">
<script>
    $(function () {
        $(".sidebar-menu li").click(function () {
            $(this).siblings('li').removeClass('active');  //删除其他兄弟元素的样式
            $(this).addClass('active');//添加当前元素的样式
        });
    });
    $().ready(function () {
        $("#clientForm").validate();
    });

$(document).ready(function(){
   $(".sidebar-menu").tree();
   $(".sidebar-menu").filter(".menu-open").removeClass("menu-open");
   $(".sidebar-menu").filter(".active").removeClass("active");
   var a;
   $(".sidebar-menu a").each(function(i){
         if($(this).attr('href').startsWith("announcementlist.aspx")) {
              a=$(this);
          }
    });
    a.parent().addClass("active");
    a.parent().parent().parent().addClass("active");
    a.parent().parent().parent().addClass("menu-open");
})
</script>
        <%= OutputLeftMenu() %>
    </section>
  </aside>

<!-- 右侧内容s -->
  <div class="content-wrapper">
    <section class="content-header">
      <h1><small>发布/编辑通知公告</small></h1>
      <ol class="breadcrumb">
        <li><i class="fa fa-home"></i> <%= OAConfig.SysTitle %></li>
        <li class="active">通知公告</li>
      </ol>
    </section>
<section class="content container-fluid">
      
<div class="box box-body casepage">
<form name="clientForm" action="?action=save&t=<%= paget %>&aid=<%= pageid %>" method="post">
<table class="table">
                  <tbody>
                    <tr>
                      <td><strong>标题</strong> ：</td>
                      <td><input type="text" name="title" class="myinput" placeholder="请输入通知公告标题" value="<%= pageInfo.title %>" style="width:70%;" required></td>
                    </tr>
                    <tr>
                      <td><strong>置顶</strong> ：</td>
                      <td>
                          <select name="topnum" class="myinput">
                              <option value='999'<%= pageInfo.topnum == 999 ? " selected='selected'" : "" %>>不置顶</option>
                              <option value='1'<%= pageInfo.topnum == 1 ? " selected='selected'" : "" %>>置顶第1</option>
                              <option value='2'<%= pageInfo.topnum == 2 ? " selected='selected'" : "" %>>置顶第2</option>
                              <option value='3'<%= pageInfo.topnum == 3 ? " selected='selected'" : "" %>>置顶第3</option>
                          </select>
                      </td>
                    </tr>
                    <tr>
                      <td><strong>内容</strong>：</td>
                      <td>
                          <textarea name="editorcontent" id="editorcontent"  runat="server" enableviewstate="false" style="width:70%;height:300px;"><%= pageInfo.content %></textarea>
                      </td>
                    </tr>                
                  </tbody>
                </table>

<p style="text-align:center">
<button type="submit" class="btn btn-danger"><i class="fa fa-save"></i> 保 存</button>
</p>
</form>
</div>

</section>
</div>
<!-- 右侧内容e -->
</div>

<!-- 页面中的弹层代码 -->
<div class="modal" id="modal">
    <div class="modal-dialog" style="width:96%; margin:6% auto 0 auto; max-width:1200px">
        <div class="modal-content"></div>
    </div>
</div>

<script src="images/adminlte.min.js"></script>
<script src="images/demo.js"></script>
<script>
    //实例化编辑器
    window.UMEDITOR_HOME_URL = "/lawoa/umeditor/";
    var um = UM.getEditor('editorcontent');
    //$(document).ready(function () {
    //    $('#editorcontent').summernote({
    //        disableDragAndDrop: false,
    //        shortcuts: true,
    //        height:250,
    //        width:600,
    //        lang: 'zh-CN',
    //        toolbar: [
    //            ['style', ['bold', 'italic', 'underline', 'clear']],
    //            ['fontsize', ['fontsize']],
    //            ['color', ['color']],
    //            ['para', ['ul', 'ol', 'paragraph']],
    //            ['height', ['height']],
    //            ['insert', ['picture']]
    //        ],
    //        callbacks: {
    //            onImageUpload: function (files) {
    //                sendFile(files[0]);
    //            }
    //        }
    //    });
    //});
</script>
</body>
</html>