    <!-- 加载编辑器的容器 -->
    <link rel="stylesheet" type="text/css" href="<?php echo asset_url('css/wendor/bootstrap-overrides.css');?>">
    <link rel="stylesheet" type="text/css" href="<?php echo asset_url('css/wendor/style.css');?>">
    <style>
    .editor-cont{margin-left: 300px;margin-top: 50px;}
     .bt-postion{  margin-top: 20px;margin-left: 350px;}
    .modal{position: fixed!important;top:20%!important;width: 450px!important;height: 235px!important;background-color: transparent!important;}
     .modal-dialog{margin: 0!important;padding: 0!important;border-radius: 6px!important;}
     .row-fluid input{margin: 10px 0px;}
	 .edit_box {
    width: 775px;
    margin-left: 30px;
    margin-top: 20px;}
	.t-e {
    margin-left: 30px;
    overflow: hidden;
    margin-bottom: 15px;
    margin-top: 5px;}
 </style>


 <script type="text/javascript" src="<?php echo asset_url('js/summernote.min.js')?>"></script>
<link href="<?php echo asset_url('css/wendor/summernote.css')?>" media="all" rel="stylesheet" type="text/css"/>
<div class="col-md-10" role="main">
    <nav class="breadcrumb"></i> 客户端功能配置<span class="c-gray en">&gt;</span>关于我们配置</nav>
    <div class="title-box">
        <p class="t-p" style="font-size: 28px; color: #7d7d7d;vertical-align: middle; padding-top: 15px; padding-bottom: 15px;">关于我们配置</p>
        <div class="t-e">
            <img src="<?php echo asset_url('images/explain.png');?>" alt="">
            <span>说明：用于控制客户端中的关于我们部分内容。</span>
        </div>
    </div>
        <!-- 添加编辑器区域 -->
        <div class="edit_box">
            <form action="<?php echo site_url('mocuz/client/about_us_set');?>" method="post" class="regiswidth" enctype="multipart/form-data"> 
                <input name="message" type="hidden" value=""/>
                <div id="summernote" class="setEdit"><?php echo !empty($about_us)?$about_us:'';?></div>
                <button type="submit" id="save" class="edit_btn">保存修改</button>
            </form>
        </div>
        
    </div>
    <script>
        $(document).ready(function() {
            $('#summernote').summernote({
                height: 300,
                onImageUpload: function(files, editor, welEditable) {
                    sendFile(files[0],editor,welEditable);
                }      
            });
            $('#save').on('click', function(event) {
                event.preventDefault();
                /* Act on the event */
                var postValue = $('#summernote').code();
                var str = new RegExp("^<p><br></p>$");
                var result = str.test(postValue); 
                if(result == true)
                {
                    alert("请输入内容");
                    return false;
                }
                $("input[name=message]").val(postValue);
                $('form').submit();
            });      
        });
        function sendFile(file,editor,welEditable) {
            data = new FormData();
            data.append("file", file);
            $.ajax({
                data: data,
                type: "POST",
                url: "<?php echo site_url('mocuz/client/upload');?>",
                cache: false,
                contentType: false,
                processData: false,
                success: function(url) {
                        editor.insertImage(welEditable, url);
                }
            });
        }
    </script>
