| @layout("/common/_container.html"){ | 
| <style> | 
|     .newWidth, .single-line{ | 
|         max-width:350px !important;display: initial !important; | 
|     } | 
| </style> | 
| <div class="row"> | 
|     <div class="col-sm-12"> | 
|         <div class="ibox float-e-margins"> | 
|             <div class="ibox-content"> | 
|                 <div class="row row-lg"> | 
|                     <div class="col-sm-12"> | 
|                         <div class="tabs-container"> | 
|                             <ul class="nav nav-tabs"> | 
|                                 <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">注册协议</a></li> | 
|                                 <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">用户协议</a></li> | 
|                                 <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">隐私协议</a></li> | 
|                             </ul> | 
|                             <div class="tab-content"> | 
|                                 <div id="tab-1" class="tab-pane active"> | 
|                                     <input type="hidden" id="id1" value="${one.id}"> | 
|                                     <div class="col-sm-3" style="padding-top: 10px;"> | 
|                                         <div class="input-group" style="width: 100%;"> | 
|                                             <select class="form-control" id="language1"> | 
|                                                 <option value="1">中文</option> | 
|                                                 <option value="2">英文</option> | 
|                                                 <option value="3">法文</option> | 
|                                             </select> | 
|                                         </div> | 
|                                     </div> | 
|                                     <div class="panel-body" style="padding-top: 60px;"> | 
|                                         <textarea id="editor_1" type="text/plain" style="width:1200px;height:400px;">${one.content}</textarea> | 
|                                         <div class="row btn-group-m-t"> | 
|                                             <div class="col-sm-10 col-sm-offset-5"> | 
|                                                 <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="update_1(${one.id});"/> | 
|                                             </div> | 
|                                         </div> | 
|                                     </div> | 
|                                 </div> | 
|                                 <div id="tab-2" class="tab-pane"> | 
|                                     <input type="hidden" id="id2" value="${two.id}"> | 
|                                     <div class="col-sm-3" style="padding-top: 10px;"> | 
|                                         <div class="input-group" style="width: 100%;"> | 
|                                             <select class="form-control" id="language2"> | 
|                                                 <option value="1">中文</option> | 
|                                                 <option value="2">英文</option> | 
|                                                 <option value="3">法文</option> | 
|                                             </select> | 
|                                         </div> | 
|                                     </div> | 
|                                     <div class="panel-body" style="padding-top: 60px;"> | 
|                                         <textarea type="text/plain" id="editor_2" style="width:1200px;height:400px;">${two.content}</textarea> | 
|                                         <div class="row btn-group-m-t"> | 
|                                             <div class="col-sm-10 col-sm-offset-5"> | 
|                                                 <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="update_2(${two.id});"/> | 
|                                             </div> | 
|                                         </div> | 
|                                     </div> | 
|                                 </div> | 
|                                 <div id="tab-3" class="tab-pane"> | 
|                                     <input type="hidden" id="id3" value="${three.id}"> | 
|                                     <div class="col-sm-3" style="padding-top: 10px;"> | 
|                                         <div class="input-group" style="width: 100%;"> | 
|                                             <select class="form-control" id="language3"> | 
|                                                 <option value="1">中文</option> | 
|                                                 <option value="2">英文</option> | 
|                                                 <option value="3">法文</option> | 
|                                             </select> | 
|                                         </div> | 
|                                     </div> | 
|                                     <div class="panel-body" style="padding-top: 60px;"> | 
|                                         <textarea type="text/plain" id="editor_3" style="width:1200px;height:400px;">${three.content}</textarea> | 
|                                         <div class="row btn-group-m-t"> | 
|                                             <div class="col-sm-10 col-sm-offset-5"> | 
|                                                 <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="update_3(${three.id});"/> | 
|                                             </div> | 
|                                         </div> | 
|                                     </div> | 
|                                 </div> | 
|   | 
|                             </div> | 
|                         </div> | 
|                     </div> | 
|                 </div> | 
|             </div> | 
|         </div> | 
|     </div> | 
| </div> | 
|   | 
| <script type="text/javascript"> | 
|     var editor_1 = null; | 
|     var editor_2 = null; | 
|     var editor_3 = null; | 
|     $(function () { | 
|         //初始化编辑器 | 
|         editor_1 = UE.getEditor('editor_1'); | 
|         editor_2 = UE.getEditor('editor_2'); | 
|         editor_3 = UE.getEditor('editor_3'); | 
|   | 
|         $('#language1').on('change', function () { | 
|             var ajax = new $ax(Feng.ctxPath + "/tAgreement/getAgreement", function(data){ | 
|                 if(null != data){ | 
|                     editor_1.setContent(data.content); | 
|                     $('#id1').val(data.id); | 
|                 } | 
|             },function(data){ | 
|                 Feng.error("编辑失败!" + data.responseJSON.message + "!"); | 
|             }); | 
|             ajax.set("language", $(this).val()); | 
|             ajax.set("type", 6); | 
|             ajax.set("useType", 2); | 
|             ajax.start(); | 
|         }) | 
|         $('#language2').on('change', function () { | 
|             var ajax = new $ax(Feng.ctxPath + "/tAgreement/getAgreement", function(data){ | 
|                 if(null != data){ | 
|                     editor_2.setContent(data.content); | 
|                     $('#id2').val(data.id); | 
|                 } | 
|             },function(data){ | 
|                 Feng.error("编辑失败!" + data.responseJSON.message + "!"); | 
|             }); | 
|             ajax.set("language", $(this).val()); | 
|             ajax.set("type", 2); | 
|             ajax.set("useType", 2); | 
|             ajax.start(); | 
|         }) | 
|         $('#language3').on('change', function () { | 
|             var ajax = new $ax(Feng.ctxPath + "/tAgreement/getAgreement", function(data){ | 
|                 if(null != data){ | 
|                     editor_3.setContent(data.content); | 
|                     $('#id3').val(data.id); | 
|                 } | 
|             },function(data){ | 
|                 Feng.error("编辑失败!" + data.responseJSON.message + "!"); | 
|             }); | 
|             ajax.set("language", $(this).val()); | 
|             ajax.set("type", 1); | 
|             ajax.set("useType", 2); | 
|             ajax.start(); | 
|         }) | 
|     }); | 
|   | 
|     function update_1(id){ | 
|         if (editor_1.getContentTxt() == ""){ | 
|             Feng.error("内容不能为空!"); | 
|             return; | 
|         } | 
|         submitData(editor_1.getContent(),$('#id1').val()); | 
|     } | 
|     function update_2(id){ | 
|         if (editor_2.getContentTxt() == ""){ | 
|             Feng.error("内容不能为空!"); | 
|             return; | 
|         } | 
|         submitData(editor_2.getContent(),$('#id2').val()); | 
|     } | 
|     function update_3(id){ | 
|         if (editor_3.getContentTxt() == ""){ | 
|             Feng.error("内容不能为空!"); | 
|             return; | 
|         } | 
|         submitData(editor_3.getContent(),$('#id3').val()); | 
|     } | 
|   | 
|     function submitData(content,id) { | 
|         //提交信息 | 
|         var ajax = new $ax(Feng.ctxPath + "/tAgreement/updateAppParam", function(data){ | 
|             Feng.success("编辑成功!"); | 
|         },function(data){ | 
|             Feng.error("编辑失败!" + data.responseJSON.message + "!"); | 
|         }); | 
|         ajax.set("context", content); | 
|         ajax.set("id", id); | 
|         ajax.start(); | 
|     } | 
| </script> | 
| @} |