| | |
| | | </ul> |
| | | <div class="tab-content"> |
| | | <div id="tab-1" class="tab-pane active"> |
| | | <div class="panel-body"> |
| | | <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"> |
| | |
| | | </div> |
| | | </div> |
| | | <div id="tab-2" class="tab-pane"> |
| | | <div class="panel-body"> |
| | | <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"> |
| | |
| | | </div> |
| | | </div> |
| | | <div id="tab-3" class="tab-pane"> |
| | | <div class="panel-body"> |
| | | <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"> |
| | |
| | | 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", 1); |
| | | 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", 1); |
| | | 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", 1); |
| | | ajax.start(); |
| | | }) |
| | | }); |
| | | |
| | | function update_1(id){ |
| | |
| | | Feng.error("内容不能为空!"); |
| | | return; |
| | | } |
| | | submitData(editor_1.getContent(),id); |
| | | submitData(editor_1.getContent(),$('#id1').val()); |
| | | } |
| | | function update_2(id){ |
| | | if (editor_2.getContentTxt() == ""){ |
| | | Feng.error("内容不能为空!"); |
| | | return; |
| | | } |
| | | submitData(editor_2.getContent(),id); |
| | | submitData(editor_2.getContent(),$('#id2').val()); |
| | | } |
| | | function update_3(id){ |
| | | if (editor_3.getContentTxt() == ""){ |
| | | Feng.error("内容不能为空!"); |
| | | return; |
| | | } |
| | | submitData(editor_3.getContent(),id); |
| | | submitData(editor_3.getContent(),$('#id3').val()); |
| | | } |
| | | |
| | | function submitData(content,id) { |