@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">
|
@if(language==1){
|
<li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">用户指南设置</a></li>
|
@}
|
@if(language==2){
|
<li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">User guide settings</a></li>
|
@}
|
@if(language==3){
|
<li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">Pengaturan Panduan Pengguna</a></li>
|
@}
|
|
</ul>
|
@if(language==1){
|
<div>
|
<select id="yy" style="width: 100px;margin-left: 20px;height: 30px;" onclick="changeType()">
|
<option value="1" checked>中文</option>
|
<option value="2">英文</option>
|
<option value="3">印尼文</option>
|
</select>
|
</div>
|
|
@}
|
@if(language==2){
|
<div>
|
<select id="yy" style="width: 100px;margin-left: 20px;height: 30px;" onclick="changeType()">
|
<option value="1" checked>Chinese</option>
|
<option value="2">English</option>
|
<option value="3">Indonesian</option>
|
</select>
|
</div>
|
@}
|
@if(language==3){
|
<div>
|
<select id="yy" style="width: 100px;margin-left: 20px;height: 30px;" onclick="changeType()">
|
<option value="1" checked>Cina</option>
|
<option value="2">Inggris</option>
|
<option value="3">Indonesia</option>
|
</select>
|
</div>
|
@}
|
<div class="tab-content">
|
<div id="tab-1" class="tab-pane active">
|
<div class="panel-body">
|
<textarea id="editor_1" type="text/plain" style="width:1200px;height:400px;display: block" contenteditable="true" > ${one.content}</textarea>
|
<textarea id="editor_2" type="text/plain" style="width:1200px;height:400px;display: none" contenteditable="true" > ${one1.content}</textarea>
|
<textarea id="editor_3" type="text/plain" style="width:1200px;height:400px;display: none" contenteditable="true"> ${one2.content}</textarea>
|
<div class="row btn-group-m-t">
|
<div class="col-sm-10 col-sm-offset-5" id="save1" style="display: block">
|
@if(language==1){
|
<#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="update_1(${one.id});"/>
|
@}
|
@if(language==2){
|
<#button btnCss="info" name="Save" id="ensure" icon="fa-check" clickFun="update_1(${one.id});"/>
|
@}
|
@if(language==3){
|
<#button btnCss="info" name="Save" id="ensure" icon="fa-check" clickFun="update_1(${one.id});"/>
|
@}
|
</div>
|
<div class="col-sm-10 col-sm-offset-5" id="save2" style="display: none">
|
@if(language==1){
|
<#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="update_2(${one1.id});"/>
|
@}
|
@if(language==2){
|
<#button btnCss="info" name="Save" id="ensure" icon="fa-check" clickFun="update_2(${one1.id});"/>
|
@}
|
@if(language==3){
|
<#button btnCss="info" name="Save" id="ensure" icon="fa-check" clickFun="update_2(${one1.id});"/>
|
@}
|
</div>
|
<div class="col-sm-10 col-sm-offset-5" id="save3" style="display: none">
|
@if(language==1){
|
<#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="update_3(${one2.id});"/>
|
@}
|
@if(language==2){
|
<#button btnCss="info" name="Save" id="ensure" icon="fa-check" clickFun="update_3(${one2.id});"/>
|
@}
|
@if(language==3){
|
<#button btnCss="info" name="Save" id="ensure" icon="fa-check" clickFun="update_3(${one2.id});"/>
|
@}
|
</div>
|
</div>
|
</div>
|
</div>
|
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
|
<script type="text/javascript">
|
|
function changeType() {
|
let type = $("#yy").val()
|
if(type==1){
|
$("#editor_1").show()
|
$("#save1").show()
|
$("#editor_2").hide()
|
$("#save2").hide()
|
$("#editor_3").hide()
|
$("#save3").hide()
|
}else if(type==2){
|
$("#editor_1").hide()
|
$("#save1").hide()
|
$("#editor_2").show()
|
$("#save2").show()
|
$("#editor_3").hide()
|
$("#save3").hide()
|
}else {
|
$("#editor_1").hide()
|
$("#save1").hide()
|
$("#editor_2").hide()
|
$("#save2").hide()
|
$("#editor_3").show()
|
$("#save3").show()
|
}
|
}
|
|
var editor_1 = null;
|
$(function () {
|
//初始化编辑器
|
editor_1 = UE.getEditor('editor_1');
|
editor_2 = UE.getEditor('editor_2');
|
editor_3 = UE.getEditor('editor_3');
|
});
|
|
function update_1(id){
|
if (editor_1.getContentTxt() == ""){
|
if($("#language").val()==1){
|
Feng.error("内容不能为空!");
|
}
|
if($("#language").val()==2){
|
Feng.error("Content cannot be empty!");
|
}
|
if($("#language").val()==3){
|
Feng.error("内容不能为空!");
|
}
|
return;
|
}
|
submitData(editor_1.getContent(),id);
|
}
|
|
function update_2(id){
|
if (editor_2.getContentTxt() == ""){
|
if($("#language").val()==1){
|
Feng.error("内容不能为空!");
|
}
|
if($("#language").val()==2){
|
Feng.error("Content cannot be empty!");
|
}
|
if($("#language").val()==3){
|
Feng.error("内容不能为空!");
|
}
|
return;
|
}
|
submitData(editor_2.getContent(),id);
|
}
|
|
function update_3(id){
|
if (editor_3.getContentTxt() == ""){
|
if($("#language").val()==1){
|
Feng.error("内容不能为空!");
|
}
|
if($("#language").val()==2){
|
Feng.error("Content cannot be empty!");
|
}
|
if($("#language").val()==3){
|
Feng.error("内容不能为空!");
|
}
|
return;
|
}
|
submitData(editor_3.getContent(),id);
|
}
|
|
function submitData(content,id) {
|
//提交信息
|
var ajax = new $ax(Feng.ctxPath + "/tAgreement/updateAppParam", function(data){
|
if($("#language").val()==1){
|
Feng.success("编辑成功!");
|
}
|
if($("#language").val()==2){
|
Feng.success("Edit succeessfully!");
|
}
|
if($("#language").val()==3){
|
Feng.success("编辑成功!");
|
}
|
},function(data){
|
if($("#language").val()==1){
|
Feng.error("编辑失败!" + data.responseJSON.message + "!");
|
}
|
if($("#language").val()==2){
|
Feng.error("Edit fail!" + data.responseJSON.message + "!");
|
}
|
if($("#language").val()==3){
|
Feng.error("编辑失败!" + data.responseJSON.message + "!");
|
}
|
});
|
ajax.set("context", content);
|
ajax.set("id", id);
|
ajax.start();
|
}
|
</script>
|
@}
|